HID: playstation: DS4: Fix LED blinking
authorMax Staudt <max@enpas.org>
Wed, 7 Feb 2024 16:36:43 +0000 (01:36 +0900)
committerJiri Kosina <jkosina@suse.com>
Wed, 3 Apr 2024 19:53:39 +0000 (21:53 +0200)
commit8f39af37eb18b03cbd5ea3b01c8eea26280b3b3f
treec44b9b6395a69069ea0a26a3c82bd603c335a70d
parent3e78a6c0d3e02e4cf881dc84c5127e9990f939d6
HID: playstation: DS4: Fix LED blinking

There was no way to disable blinking once enabled.
Disable it on brightness = 0, as per the Linux LED spec.

The driver reports back the values it sends to the controller, but they
need to be scaled back to milliseconds. Setting the LED blinking via
sysfs works as expected now.

Signed-off-by: Max Staudt <max@enpas.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-playstation.c