]> git.baikalelectronics.ru Git - kernel.git/commit
HID: hid-sony: report actual brightness value when reading LED
authorSimon Wood <simon@mungewell.org>
Wed, 5 Feb 2014 19:34:18 +0000 (12:34 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 6 Feb 2014 08:44:39 +0000 (09:44 +0100)
commit5feea647c4d52ec7f5508a72eb241e93b426be94
tree6878c5782e75c904183dba3ce78109d1a0ca6e2d
parent33ec21a29cafd4d86f26b82ddce2c802ce224cec
HID: hid-sony: report actual brightness value when reading LED

The Dualshock4 controller contains a RGB LED, which is enabled via
the '/sys/class/leds' interface. At present the driver only returns
whether each of the RGB LEDs is lit (ie not off), but no indication
of it's brightness.

This patch fixes the reading of the current brightnes so that it
returns the value (rather than just off=0, on=LED_FULL).

Tested on the DS4 and SixAxis (for compatibility).

Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c