summaryrefslogtreecommitdiff
path: root/board/trogdor
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/trogdor
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/trogdor')
-rw-r--r--board/trogdor/board.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/trogdor/board.c b/board/trogdor/board.c
index 1fe0773230..a17e961f60 100644
--- a/board/trogdor/board.c
+++ b/board/trogdor/board.c
@@ -318,6 +318,15 @@ 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);
+ gpio_set_flags(GPIO_LID_ACCEL_INT_L,
+ GPIO_INPUT | GPIO_PULL_DOWN);
+
+ /*
* Enable the PPC power sink path before EC enters hibernate;
* otherwise, ACOK won't go High and can't wake EC up. Check the
* bug b/170324206 for details.