HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs
authorFrank Praznik <frank.praznik@oh.rr.com>
Mon, 14 Apr 2014 14:11:36 +0000 (10:11 -0400)
committerJiri Kosina <jkosina@suse.cz>
Thu, 24 Apr 2014 16:53:41 +0000 (18:53 +0200)
commitb3ed458c1c24bac3796849ee8ec681fb3b6cbf46
treed31bd4d39215c591c430528d2903d35323b1bcad
parent8025087acf9d2b941bae93b3e0967560e7e03e87
HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs

Add support for setting the blink rate of the LEDs.  The Sixaxis allows control
over each individual LED, but the Dualshock 4 only has one global control for
controlling the hardware blink rate so individual colors will fall back to
software timers.

Setting the brightness cancels the blinking as per the LED class specifications.

The Sixaxis and Dualshock 4 controllers accept delays in decisecond increments
from 0 to 255 (2550 milliseconds).

The value at index 1 of the DualShock 4 USB output report must be 0xFF or the
light bar won't blink.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c