]> git.baikalelectronics.ru Git - kernel.git/commit
platform: x86: dell-laptop: Add support for keyboard backlight
authorPali Rohár <pali.rohar@gmail.com>
Fri, 5 Dec 2014 11:53:31 +0000 (12:53 +0100)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 3 Dec 2014 18:10:18 +0000 (10:10 -0800)
commit615483e3253cf90e5ae5e30b43443c23d716a67a
tree8d6a31fef8d4787faf70963a3bf46c314437e58a
parente164053c2880d2d15e2d23da9cbd7deec24d1629
platform: x86: dell-laptop: Add support for keyboard backlight

This patch adds support for configuring keyboard backlight settings on supported
Dell laptops. It exports kernel leds interface and uses Dell SMBIOS tokens or
keyboard class interface.

With this patch it is possible to set:
* keyboard backlight level
* timeout after which will be backlight automatically turned off
* input activity triggers (keyboard, touchpad, mouse) which enable backlight
* ambient light settings

Settings are exported via sysfs:
/sys/class/leds/dell::kbd_backlight/

Code is based on newly released documentation by Dell in libsmbios project.

Thanks to Dan Carpenter who reported bug about unpredictable results in
quirks->kbd_timeouts for loop. His fix adds needs_kbd_timeouts flag to
quirk structure to indicate if kbd_timeouts array is empty or not.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Minor English corrections to comments.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/dell-laptop.c