summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJian-Hong Pan <jian-hong@endlessm.com>2019-12-30 16:30:45 +0800
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-01-13 11:50:59 +0200
commit176a7fca81c5090a7240664e3002c106d296bf31 (patch)
treee856a0f4043221d44cce2fabeb084be545dc24b4 /drivers
parent515ff674bb9bf06186052e352c4587dab8defaf0 (diff)
downloadlinux-176a7fca81c5090a7240664e3002c106d296bf31.tar.bz2
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')
-rw-r--r--drivers/platform/x86/asus-wmi.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 821b08e01635..982f0cc8270c 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -512,13 +512,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);
}