summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Kristóf <timur.kristof@gmail.com>2018-06-01 12:32:56 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-06-04 12:30:09 +0300
commite6a7379fcb5702da681d7da8e9d9a2a26cc6fa85 (patch)
tree9cee2fc21553b21d6226eda9d6b1a0215a484145
parent64b824649b7787c9ac491015f16ffa4ad2ec287e (diff)
downloadop-kernel-dev-e6a7379fcb5702da681d7da8e9d9a2a26cc6fa85.zip
op-kernel-dev-e6a7379fcb5702da681d7da8e9d9a2a26cc6fa85.tar.gz
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: https://github.com/dell/libsmbios/issues/48 Signed-off-by: Timur Kristóf <venemo@fedoraproject.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--drivers/platform/x86/dell-laptop.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index c52c672..f1fa861 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -38,6 +38,7 @@
struct quirk_entry {
bool touchpad_led;
bool kbd_led_levels_off_1;
+ bool kbd_missing_ac_tag;
bool needs_kbd_timeouts;
/*
@@ -68,6 +69,10 @@ static struct quirk_entry quirk_dell_xps13_9333 = {
.kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 },
};
+static struct quirk_entry quirk_dell_xps13_9370 = {
+ .kbd_missing_ac_tag = true,
+};
+
static struct quirk_entry quirk_dell_latitude_e6410 = {
.kbd_led_levels_off_1 = true,
};
@@ -293,6 +298,15 @@ static const struct dmi_system_id dell_quirks[] __initconst = {
},
{
.callback = dmi_matched,
+ .ident = "Dell XPS 13 9370",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9370"),
+ },
+ .driver_data = &quirk_dell_xps13_9370,
+ },
+ {
+ .callback = dmi_matched,
.ident = "Dell Latitude E6410",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
@@ -1401,7 +1415,8 @@ static inline int kbd_init_info(void)
* timeout value which is shared for both battery and AC power
* settings. So do not try to set AC values on old models.
*/
- if (dell_smbios_find_token(KBD_LED_AC_TOKEN))
+ if ((quirks && quirks->kbd_missing_ac_tag) ||
+ dell_smbios_find_token(KBD_LED_AC_TOKEN))
kbd_timeout_ac_supported = true;
kbd_get_state(&state);
OpenPOWER on IntegriCloud