From 7c9baa4c0774075386981124b9a8dc8c3b8ce4c7 Mon Sep 17 00:00:00 2001 From: Wai-Hong Tam Date: Fri, 30 Oct 2020 19:09:30 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511805 Reviewed-by: Alexandru M Stan Reviewed-by: Stephen Boyd --- board/trogdor/board.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'board/trogdor') 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 @@ -317,6 +317,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 -- cgit v1.2.1