platform: x86: dell-laptop: Add support for keyboard backlight
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 <271b10744f2b592adf8fde144d536c86b011b93c@gmail.com>
Signed-off-by: Gabriele Mazzotta <e12f25739e09c234763987bb85389043078b2996@gmail.com>
Cc: Dan Carpenter <ff341aa343d564f9e53e9dcb6996be8c04859a66@oracle.com>
Minor English corrections to comments.
Signed-off-by: Darren Hart <38f9eaa30910c40b06f5a60020b1222f2a953801@linux.intel.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs