mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0
commit176a7fca81upstream. Some of ASUS laptops like UX431FL keyboard backlight cannot be set to brightness 0. According to ASUS' information, the brightness should be 0x80 ~ 0x83. This patch fixes it by following the logic. Fixes:e9809c0b96("asus-wmi: add keyboard backlight support") Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com> Reviewed-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e61a25a897
commit
d847154df4
|
|
@ -463,13 +463,7 @@ static void kbd_led_update(struct work_struct *work)
|
|||
|
||||
asus = container_of(work, struct asus_wmi, kbd_led_work);
|
||||
|
||||
/*
|
||||
* bits 0-2: level
|
||||
* bit 7: light on/off
|
||||
*/
|
||||
if (asus->kbd_led_wk > 0)
|
||||
ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F);
|
||||
|
||||
ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F);
|
||||
asus_wmi_set_devstate(ASUS_WMI_DEVID_KBD_BACKLIGHT, ctrl_param, NULL);
|
||||
led_classdev_notify_brightness_hw_changed(&asus->kbd_led, asus->kbd_led_wk);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user