OSDN Git Service

platform/x86: toshiba_acpi: Update KBD backlight LED on second gen laptops
authorAzael Avalos <coproscefalo@gmail.com>
Fri, 15 Jun 2018 17:46:27 +0000 (11:46 -0600)
committerDarren Hart (VMware) <dvhart@infradead.org>
Tue, 26 Jun 2018 21:51:38 +0000 (14:51 -0700)
commit147288e63de8188c4f6d6653a0e1aa91066ccfbe
tree43479e105f39e1ff6e32e67b5ca8b8f11bd05ef0
parent6fb741076a9fc53355e56dff2e2b46782b3a46d3
platform/x86: toshiba_acpi: Update KBD backlight LED on second gen laptops

Second generation keyboard backlight (type 2) laptops can switch
on the keyboard LED on their own via hardware/firmware, but the
LED subsystem is unaware of such change since the LED interface
was only being created on first generation keyboard backlight
(type 1) laptops.

This patch creates the LED interface for second gen keyboards
and calls the *_hw_changed API whenever userspace changes the
state of the keyboard backlight LED.

While we are at it, remove an unneeded asignment to the acpi_dev
struct under *_kbd_bl_work, and also update the kbd_event_generated
variable in the main toshiba struct instead of the global struct.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
[dvhart: correct int* and int compare with dev->kbd_mode]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/toshiba_acpi.c