summaryrefslogtreecommitdiff
path: root/board/rammus
diff options
context:
space:
mode:
authormichael_chen <michael5_chen@pegatroncorp.com>2018-08-31 15:36:18 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-09-13 06:14:07 -0700
commit1918bb0ea138d9e3522e4f7ad6897a882c7cda50 (patch)
treebc5d11bfa0d892d7623c11d5f820b9b1a437bde7 /board/rammus
parentcb49a07fd350d9b513b019f755730d298bf719e7 (diff)
downloadchrome-ec-1918bb0ea138d9e3522e4f7ad6897a882c7cda50.tar.gz
rammus: Implement touch pad enable control
Implement touch pad enable control. Enable touch pad when system from S5 to S3. Disable touch pad when system form S3 to S5. BUG=None BRANCH=ToT TEST=Manual. Check touch pad can work under S0. Check touch pad can wake up system under suspend. Change-Id: Iccb06c3afeb458ea4504d4de971a49b1ab7bbe8d Signed-off-by: michael_chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/1198906 Commit-Ready: michael chen <michael5_chen@pegatroncorp.com> Tested-by: michael chen <michael5_chen@pegatroncorp.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'board/rammus')
-rw-r--r--board/rammus/board.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/rammus/board.c b/board/rammus/board.c
index 2b6c528b4a..3f3be06943 100644
--- a/board/rammus/board.c
+++ b/board/rammus/board.c
@@ -683,3 +683,17 @@ static void board_chipset_suspend(void)
gpio_set_level(GPIO_ENABLE_BACKLIGHT, 0);
}
DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
+
+/* Called on AP S5 -> S3 transition */
+static void board_chipset_startup(void)
+{
+ gpio_set_level(GPIO_EN_PP3300_TRACKPAD, 1);
+}
+DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT);
+
+/* Called on AP S3 -> S5 transition */
+static void board_chipset_shutdown(void)
+{
+ gpio_set_level(GPIO_EN_PP3300_TRACKPAD, 0);
+}
+DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT);