Skip to content

Commit e6a7379

Browse files
Timur Kristófandy-shev
authored andcommitted
platform/x86: dell-laptop: Fix keyboard backlight timeout on XPS 13 9370
The XPS 13 9370 doesn't expose the necessary KBD_LED_AC_TOKEN in the BIOS, so the driver thinks it cannot adjust the AC keyboard backlight timeout. This patch adds a quirk to fix this until Dell adds the missing token to the BIOS. For further discussion, see: dell/libsmbios#48 Signed-off-by: Timur Kristóf <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 64b8246 commit e6a7379

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

drivers/platform/x86/dell-laptop.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
struct quirk_entry {
3939
bool touchpad_led;
4040
bool kbd_led_levels_off_1;
41+
bool kbd_missing_ac_tag;
4142

4243
bool needs_kbd_timeouts;
4344
/*
@@ -68,6 +69,10 @@ static struct quirk_entry quirk_dell_xps13_9333 = {
6869
.kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 },
6970
};
7071

72+
static struct quirk_entry quirk_dell_xps13_9370 = {
73+
.kbd_missing_ac_tag = true,
74+
};
75+
7176
static struct quirk_entry quirk_dell_latitude_e6410 = {
7277
.kbd_led_levels_off_1 = true,
7378
};
@@ -291,6 +296,15 @@ static const struct dmi_system_id dell_quirks[] __initconst = {
291296
},
292297
.driver_data = &quirk_dell_xps13_9333,
293298
},
299+
{
300+
.callback = dmi_matched,
301+
.ident = "Dell XPS 13 9370",
302+
.matches = {
303+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
304+
DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9370"),
305+
},
306+
.driver_data = &quirk_dell_xps13_9370,
307+
},
294308
{
295309
.callback = dmi_matched,
296310
.ident = "Dell Latitude E6410",
@@ -1401,7 +1415,8 @@ static inline int kbd_init_info(void)
14011415
* timeout value which is shared for both battery and AC power
14021416
* settings. So do not try to set AC values on old models.
14031417
*/
1404-
if (dell_smbios_find_token(KBD_LED_AC_TOKEN))
1418+
if ((quirks && quirks->kbd_missing_ac_tag) ||
1419+
dell_smbios_find_token(KBD_LED_AC_TOKEN))
14051420
kbd_timeout_ac_supported = true;
14061421

14071422
kbd_get_state(&state);

0 commit comments

Comments
 (0)