]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
platform/x86: dell-laptop: Add keyboard backlight timeout AC settings
authorPali Rohár <pali.rohar@gmail.com>
Thu, 25 May 2017 03:29:43 +0000 (11:29 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:45:48 +0000 (10:45 +0200)
commit258e838dfdd14328e16c575a5d85eb1de814f2ed
tree2b381eef13d5cd0a0e69d14665f0f3cb37ad9233
parentcf38b01fbe1f8efe3567a69a8cb7dda27f561d6b
platform/x86: dell-laptop: Add keyboard backlight timeout AC settings

BugLink: https://bugs.launchpad.net/bugs/1693126
When changing keyboard backlight state on new Dell laptops, firmware
expects a new timeout AC value filled in Set New State SMBIOS call.

Without it any change of keyboard backlight state on new Dell laptops
fails. And user can see following error message in dmesg:

  dell_laptop: Setting old previous keyboard state failed
  leds dell::kbd_backlight: Setting an LED's brightness failed (-6)

This patch adds support for retrieving current timeout AC values and also
updating them. Current timeout value in sysfs is displayed based on current
AC status, like current display brightness value.

Detection if Dell laptop supports or not new timeout AC settings is done by
checking existence of Keyboard Backlight with AC SMBIOS token (0x0451).

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Mario Limonciello <mario.limonciello@dell.com>
Tested-by: Arcadiy Ivanov <arcadiy@ivanov.biz>
[andy: fixed merge conflict with defined constants]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(backported from commit 9216e0dcb5533a999d544d0af8661118e0588e1d)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/platform/x86/dell-laptop.c