diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2020-10-22 11:17:25 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-29 01:53:23 +0000 |
commit | b01892bbe5cf36ea8d748cd157764bde51f1c7de (patch) | |
tree | 146f520a38e1a3a8e65d73750017f39e8172e05d /board/elemi | |
parent | 8cd87e78c73a43b6a11919e4b9d9f2a7e063d429 (diff) | |
download | chrome-ec-b01892bbe5cf36ea8d748cd157764bde51f1c7de.tar.gz |
elemi: Enable keyboard backlightstabilize-rust-13562.B-master
BUG=b:169409487
BRANCH=firmware-volteer-13521.B-master
TEST=make sure ec console kblight can adjust keyboard backlight
brightness.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: Ifbb31e76dec8b595e13717b382eef229b9dd934c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2491582
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/elemi')
-rw-r--r-- | board/elemi/board.c | 12 | ||||
-rw-r--r-- | board/elemi/gpio.inc | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/board/elemi/board.c b/board/elemi/board.c index 82ddcca710..1533207759 100644 --- a/board/elemi/board.c +++ b/board/elemi/board.c @@ -278,6 +278,18 @@ const struct pwm_t pwm_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); +static void kb_backlight_enable(void) +{ + gpio_set_level(GPIO_EC_KB_BL_EN, 1); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, kb_backlight_enable, HOOK_PRIO_DEFAULT); + +static void kb_backlight_disable(void) +{ + gpio_set_level(GPIO_EC_KB_BL_EN, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, kb_backlight_disable, HOOK_PRIO_DEFAULT); + /******************************************************************************/ /* Volteer specific USB daughter-board configuration */ diff --git a/board/elemi/gpio.inc b/board/elemi/gpio.inc index aa4dbba6f7..a858a33a12 100644 --- a/board/elemi/gpio.inc +++ b/board/elemi/gpio.inc @@ -95,6 +95,7 @@ UNIMPLEMENTED(USB_C1_LS_EN) /* Misc Signals */ GPIO(EC_H1_PACKET_MODE, PIN(7, 5), GPIO_OUT_LOW) /* H1 Packet Mode */ +GPIO(EC_KB_BL_EN, PIN(8, 6), GPIO_OUT_LOW) /* Keyboard backlight enable */ /* * Despite their names, M2_SSD_PLN and M2_SSD_PLA are active-low, and M2_SSD_PLN * is open-drain. |