summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-06-20 14:35:18 -0700
committerChromeBot <chrome-bot@google.com>2013-06-20 17:49:58 -0700
commitff9ee74b3ffa1c14ed058f178ad584a443dfa15c (patch)
treef48db7f08afa763580293f9a172f99645422d806
parentddcecbe0893ae40a0fe2c27ed7a7cfe0f5bdce12 (diff)
downloadchrome-ec-ff9ee74b3ffa1c14ed058f178ad584a443dfa15c.tar.gz
pit: Disable SPI output when AP is suspended
This fixes the problem where the EC consumes too much power during suspend. BUG=chrome-os-partner:20223 BRANCH=none TEST=from root shell, 'powerd_suspend'. 1.8V_MICOM should not go up. after resume, 'ectool hello' should still work. Change-Id: I93b781e96bea633419e923a83f1f6d7300ae8c54 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/59474 Reviewed-by: Derek Basehore <dbasehore@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--chip/stm32/spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/chip/stm32/spi.c b/chip/stm32/spi.c
index 51a8e50cfd..b557875126 100644
--- a/chip/stm32/spi.c
+++ b/chip/stm32/spi.c
@@ -449,6 +449,7 @@ static void spi_chipset_startup(void)
enabled = 1;
}
DECLARE_HOOK(HOOK_CHIPSET_STARTUP, spi_chipset_startup, HOOK_PRIO_DEFAULT);
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, spi_chipset_startup, HOOK_PRIO_DEFAULT);
static void spi_chipset_shutdown(void)
{
@@ -461,3 +462,4 @@ static void spi_chipset_shutdown(void)
gpio_set_alternate_function(GPIO_A, 0xf0, -1);
}
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, spi_chipset_shutdown, HOOK_PRIO_DEFAULT);
+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, spi_chipset_shutdown, HOOK_PRIO_DEFAULT);