From ed230bf3f5ab05a2e09d4eb88d66cff4b3a856b2 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Tue, 2 Apr 2019 10:34:54 -0700 Subject: kblight: Remove dependency on PWM Keyboard backlight can be controlled either by PWM or an external controller. This patch decouples keyboard backlight common code and PWM based backlight control. Signed-off-by: Daisuke Nojiri BUG=none BRANCH=Nami TEST=Verify keyboard backlight can be adjusted on Ekko. Change-Id: I332b01a2a2b15bd37ce385b6c30591c90f078dfc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1549476 Reviewed-by: Daisuke Nojiri Commit-Queue: Daisuke Nojiri Tested-by: Daisuke Nojiri (cherry picked from commit e879713cee3212b4afffb3f0dd3c4dfbf8237c4a) Reviewed-on: https://chromium-review.googlesource.com/1549606 Commit-Ready: Daisuke Nojiri Reviewed-by: Aseda Aboagye --- include/config.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index 53d983f12b..5a62cb5728 100644 --- a/include/config.h +++ b/include/config.h @@ -2692,11 +2692,18 @@ /* Support PWM output to display backlight */ #undef CONFIG_PWM_DISPLIGHT +/* + * Support keyboard backlight control + * + * You need to define board_kblight_init unless CONFIG_PWM_KBLIGHT is used. + * For example, lm3509 can be registered as a driver in board_kblight_init. + */ +#undef CONFIG_KEYBOARD_BACKLIGHT + /* * Support PWM output to keyboard backlight * - * Optionally, lm3509 can be used as a keyboard backlight controller. - * TODO: Create CONFIG_KEYBOARD_BACKLIGHT to allow lm3509 is used without PWM. + * This implies CONFIG_KEYBOARD_BACKLIGHT. */ #undef CONFIG_PWM_KBLIGHT @@ -4391,4 +4398,8 @@ #define CONFIG_SLEEP_TIMEOUT_MS 10000 #endif +#ifdef CONFIG_PWM_KBLIGHT +#define CONFIG_KEYBOARD_BACKLIGHT +#endif + #endif /* __CROS_EC_CONFIG_H */ -- cgit v1.2.1