diff options
author | Grover Yen <Grover_Yen@wistron.com> | 2015-11-03 14:25:49 +0800 |
---|---|---|
committer | ChromeOS bot <3su6n15k.default@developer.gserviceaccount.com> | 2015-11-30 05:13:37 +0000 |
commit | 069d209ef92a0803e33d53b7b847c35887d2710a (patch) | |
tree | 816f62b61aeb7c80f163a0d8294e73471f7be7c7 | |
parent | 7dcd14bca1c1afaffac1b51a120d24fc775dc3af (diff) | |
download | chrome-ec-069d209ef92a0803e33d53b7b847c35887d2710a.tar.gz |
buddy: Reset touch screen when system resume.
Delay 150ms and then toggle GPIO_TOUCHSCREEN_RESET_L after system resume to
avoid touch screen no function in S0.
BUG=chrome-os-partner:46980
BRANCH=none
TEST=Tocuh screen can work normally after reset.
Change-Id: I17aabb288a1836ba5060a6768a36f8c288cd85b0
Signed-off-by: Grover Yen <Grover_Yen@wistron.com>
Reviewed-on: https://chromium-review.googlesource.com/313285
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | board/buddy/panel.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/board/buddy/panel.c b/board/buddy/panel.c index 3f0de1c136..1d7e83abc8 100644 --- a/board/buddy/panel.c +++ b/board/buddy/panel.c @@ -234,3 +234,17 @@ static void transmitter_power_on(void) task_wake(TASK_ID_PANEL); } DECLARE_HOOK(HOOK_CHIPSET_STARTUP, transmitter_power_on, HOOK_PRIO_DEFAULT); + +static void toggle_touchscreen_reset(void) +{ + gpio_set_level(GPIO_TOUCHSCREEN_RESET_L, 0); + msleep(10); + gpio_set_level(GPIO_TOUCHSCREEN_RESET_L, 1); +} +DECLARE_DEFERRED(toggle_touchscreen_reset); + +static void system_resume(void) +{ + hook_call_deferred(&toggle_touchscreen_reset, 150 * MSEC); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, system_resume, HOOK_PRIO_DEFAULT); |