summaryrefslogtreecommitdiff
path: root/board/grunt/board.c
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2018-01-12 11:17:22 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-14 18:38:27 -0800
commit66bc9c1082771e4da720f93e64aadfae23c1f22e (patch)
tree277814779f5fa7d7d7e9624347e486f3136bca28 /board/grunt/board.c
parentad59381ca31fb4728a1da24e28c3b17cf8468dc6 (diff)
downloadchrome-ec-66bc9c1082771e4da720f93e64aadfae23c1f22e.tar.gz
grunt: Fix ENABLE_BACKLIGHT to be active low
BUG=b:71806495 BRANCH=none TEST=backlight turns on in S0 Change-Id: Ib9271d6cbe9befdf4ed492a9c2b676452e5f4d9b Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/865155 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/grunt/board.c')
-rw-r--r--board/grunt/board.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/grunt/board.c b/board/grunt/board.c
index a485c70ca0..fa560cb265 100644
--- a/board/grunt/board.c
+++ b/board/grunt/board.c
@@ -203,6 +203,20 @@ static void board_init(void)
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
+static void board_chipset_resume(void)
+{
+ /* Turn on display backlight (active low GPIO). */
+ gpio_set_level(GPIO_ENABLE_BACKLIGHT_L, 0);
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
+
+static void board_chipset_suspend(void)
+{
+ /* Turn off display backlight (active low GPIO). */
+ gpio_set_level(GPIO_ENABLE_BACKLIGHT_L, 1);
+}
+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
+
/**
* Power on (or off) a single TCPC.
* minimum on/off delays are included.