Commit eb60790f authored by Jian-Hong Pan's avatar Jian-Hong Pan Committed by Khalid Elmously

platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0

BugLink: https://bugs.launchpad.net/bugs/1860681

commit 176a7fca upstream.

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: e9809c0b ("asus-wmi: add keyboard backlight support")
Signed-off-by: default avatarJian-Hong Pan <jian-hong@endlessm.com>
Reviewed-by: default avatarDaniel Drake <drake@endlessm.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 75c59cd3
...@@ -452,13 +452,7 @@ static void kbd_led_update(struct work_struct *work) ...@@ -452,13 +452,7 @@ static void kbd_led_update(struct work_struct *work)
asus = container_of(work, struct asus_wmi, kbd_led_work); asus = container_of(work, struct asus_wmi, kbd_led_work);
/* ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F);
* bits 0-2: level
* bit 7: light on/off
*/
if (asus->kbd_led_wk > 0)
ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F);
asus_wmi_set_devstate(ASUS_WMI_DEVID_KBD_BACKLIGHT, ctrl_param, NULL); asus_wmi_set_devstate(ASUS_WMI_DEVID_KBD_BACKLIGHT, ctrl_param, NULL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment