diff options
author | Jian-Hong Pan <jian-hong@endlessm.com> | 2019-12-30 11:30:45 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-01-13 12:51:27 +0300 |
commit | 26e66a0cf258d413bd64095b0fea6e34f9e46587 (patch) | |
tree | 5ca41291ecff47ac76c86683a3ab3e84bfdfa91e /drivers/platform/x86/asus-wmi.c | |
parent | 4eedc97300fd7d4d5694c175e71855bff9731024 (diff) | |
download | linux-26e66a0cf258d413bd64095b0fea6e34f9e46587.tar.xz |
platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0
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: e9809c0b9670 ("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>
Diffstat (limited to 'drivers/platform/x86/asus-wmi.c')
-rw-r--r-- | drivers/platform/x86/asus-wmi.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 469f1a852719..43bb15e05529 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -520,13 +520,7 @@ static void kbd_led_update(struct asus_wmi *asus) { int ctrl_param = 0; - /* - * 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); } |