• Azael Avalos's avatar
    platform/x86: toshiba_acpi: Update KBD backlight LED on second gen laptops · 147288e6
    Azael Avalos authored
    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: default avatarAzael Avalos <coproscefalo@gmail.com>
    [dvhart: correct int* and int compare with dev->kbd_mode]
    Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
    147288e6
toshiba_acpi.c 82 KB