diff options
author | David Huang <david.huang@quanta.corp-partner.google.com> | 2020-11-13 14:45:34 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-18 18:36:20 +0000 |
commit | 121d24b6bd27f966cedfdcbc3f2cb5bd46e5bd7e (patch) | |
tree | 065edbcb0a827d3ddf7ef168619889d2ca2ba54e /board/voema/board.c | |
parent | e870022baabead9cd900b24fae8c4cd3685e1bd7 (diff) | |
download | chrome-ec-121d24b6bd27f966cedfdcbc3f2cb5bd46e5bd7e.tar.gz |
voema: Enable/disable keyboard backlight when enter/leave S0
Use EC_KB_BL_EN to enable/disable keyboard backlight when enter/leave
S0.
BUG=b:169356808
BRANCH=master
TEST=Check keyboard backlight status in S0/S3.
Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com>
Change-Id: I6f9288963cec676a155e6d5a47604d3a08a30818
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2537527
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/voema/board.c')
-rw-r--r-- | board/voema/board.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/voema/board.c b/board/voema/board.c index 2fe9175a31..b67b9abc4f 100644 --- a/board/voema/board.c +++ b/board/voema/board.c @@ -553,3 +553,15 @@ int ppc_get_alert_status(int port) else return gpio_get_level(GPIO_USB_C1_PPC_INT_ODL) == 0; } + +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); |