platform/x86: asus-wmi: Add keyboard backlight toggle support
authorChris Chiu <chiu@endlessm.com>
Wed, 20 Jun 2018 14:46:45 +0000 (22:46 +0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 2 Jul 2018 12:13:40 +0000 (15:13 +0300)
commited99d29b2b1562e5173953a5ea8b7861a4f29e2c
tree23c8dc208a3a6038cdca1c0470470b86d3ed6216
parentdbb3d78f61badeadc7448f9d88a070a76612860f
platform/x86: asus-wmi: Add keyboard backlight toggle support

Some ASUS laptops like UX550GE has hotkey (Fn+F7) for keyboard
backlight toggle which would emit the scan code 0xc7 each keypress.
On the UX550GE, the max keyboard brightness level is 3 so the
toggle would not be simply on/off the led but need to be cyclic.
Per ASUS spec, it should increment the brightness for each keypress,
then toggle(off) the LED when it already reached the max level.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/asus-wmi.c