From 194b5d989ae7545107c4fb664e58c17027facd68 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Mon, 18 Jan 2021 14:47:52 -0700 Subject: zephyr: Add keyboard backlight support Add KConfig options for keyboard backlight support. BUG=b:17760430, b:177851031 BRANCH=none TEST=make buildall, zmake testall TEST=Run "kblight" command on Volteer Signed-off-by: Keith Short Change-Id: I7da36a7a685285562152e560f3dbe5da1b1ba04f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2636483 Reviewed-by: Simon Glass --- zephyr/Kconfig.keyboard | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'zephyr/Kconfig.keyboard') diff --git a/zephyr/Kconfig.keyboard b/zephyr/Kconfig.keyboard index 5c4b161148..5faab1f444 100644 --- a/zephyr/Kconfig.keyboard +++ b/zephyr/Kconfig.keyboard @@ -63,4 +63,28 @@ config PLATFORM_EC_CONSOLE_CMD_KEYBOARD_8042 kblog - Print or toggle keyboard event log (current disabled) typematic - Get/set typematic delays +choice + prompt "Keyboard backlight" + optional + help + Enable support for EC control of a keyboard backlight. This enables + the "kblight" console command for manual control of the keyboard + backlight. This also enables the EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT and + EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT host commands for automatic control + by the AP. + + TODO: support CONFIG_IO_EXPANDER_IT8801 driver which provides + PWM keyboard support. + +config PLATFORM_EC_PWM_KBLIGHT + bool "PWM keyboard backlight" + depends on PLATFORM_EC_PWM + help + Enables a PWM-controlled keyboard backlight controlled by a PWM signal + connected directly to the EC chipset. The board files must define + the C reference PWM_CH_KBLIGHT to the PWM channel used for the + keyboard backlight control. + +endchoice # Keyboard backlight + endif # PLATFORM_EC_KEYBOARD -- cgit v1.2.1