summaryrefslogtreecommitdiff
path: root/board/coachz/board.c
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-10-30 19:09:30 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-02 22:51:58 +0000
commit7c9baa4c0774075386981124b9a8dc8c3b8ce4c7 (patch)
tree4f2f2dbfbbf8905a5f62e315ab3e82e7cdf36426 /board/coachz/board.c
parentd6e6c7e861ecfb9628b8b735f3dbfe0d21cfd5d4 (diff)
downloadchrome-ec-7c9baa4c0774075386981124b9a8dc8c3b8ce4c7.tar.gz
Trogdor: Apply PD to sensors' interrupts before entering hibernate
Sensors are unpowered in hibernate. Apply PD to the interrupt lines such that they don't float. Don't need to remove the PD as they will be restored to the gpio.inc configs before the interrupts are enabled. BRANCH=None BUG=b:169595541 TEST=Triggered EC hibernate, woke up, and verified sensors working. Change-Id: I18819700d454fbbc16b28f65dad9533d97aa7d4c Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511805 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'board/coachz/board.c')
-rw-r--r--board/coachz/board.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/coachz/board.c b/board/coachz/board.c
index aa09f671ad..d440c49113 100644
--- a/board/coachz/board.c
+++ b/board/coachz/board.c
@@ -344,6 +344,13 @@ void board_hibernate(void)
int i;
/*
+ * Sensors are unpowered in hibernate. Apply PD to the
+ * interrupt lines such that they don't float.
+ */
+ gpio_set_flags(GPIO_ACCEL_GYRO_INT_L,
+ GPIO_INPUT | GPIO_PULL_DOWN);
+
+ /*
* Board rev 1+ has the hardware fix. Don't need the following
* workaround.
*/