]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: dell-laptop: Add keyboard backlight timeout AC settings
authorPali Rohár <pali.rohar@gmail.com>
Sun, 23 Apr 2017 19:40:47 +0000 (21:40 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 28 Apr 2017 18:51:26 +0000 (21:51 +0300)
commitd1b1465c6a0e1cf3221356b926ead0ac4183d844
tree3ac645ea3417e16c79e5ccc2e4864531e4542f9a
parentbb0ac1dff2f42c9e5653f201ff4e8a733e57c3e0
platform/x86: dell-laptop: Add keyboard backlight timeout AC settings

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>
drivers/platform/x86/dell-laptop.c