From 2055fa577493e70f0de3a2347cc2df8b62dd95a1 Mon Sep 17 00:00:00 2001 From: Christoffer Sandberg Date: Tue, 1 Sep 2020 10:37:11 +0200 Subject: [PATCH] Fix: write uw kbd bl on cable switch --- src/uniwill_keyboard.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/uniwill_keyboard.h b/src/uniwill_keyboard.h index c290790..fe6a0e3 100644 --- a/src/uniwill_keyboard.h +++ b/src/uniwill_keyboard.h @@ -343,6 +343,10 @@ static void uniwill_wmi_handle_event(u32 value, void *context, u32 guid_nr) kbd_led_state_uw.brightness = 0xc8; uniwill_write_kbd_bl_state(); break; + // Also refresh keyboard state on cable switch event + case 0xab: + uniwill_write_kbd_bl_state(); + break; } } } else { @@ -503,7 +507,9 @@ static int uw_kbd_bl_init(struct platform_device *dev) { int status = 0; - uniwill_kbd_bl_type_rgb_single_color = dmi_match(DMI_BOARD_NAME, "Polaris15I01"); + uniwill_kbd_bl_type_rgb_single_color = false + | dmi_match(DMI_BOARD_NAME, "Polaris15I01") + | dmi_match(DMI_BOARD_NAME, "Polaris15A01"); // Save previous enable state uniwill_kbd_bl_enable_state_on_start = uniwill_read_kbd_bl_enabled();