From 3178bdc345131f88a9ffd2c87a98d2ea332d52d7 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Sat, 27 May 2017 17:52:32 -0700 Subject: mainboard/google/poppy: Power down camera rails when suspending BUG=b:62147763 Change-Id: Iba88fed972b847448e01fcfca8c7129d950244c2 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/19953 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin --- src/mainboard/google/poppy/smihandler.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mainboard/google/poppy/smihandler.c') diff --git a/src/mainboard/google/poppy/smihandler.c b/src/mainboard/google/poppy/smihandler.c index 88aa90581b..30b009dd6f 100644 --- a/src/mainboard/google/poppy/smihandler.c +++ b/src/mainboard/google/poppy/smihandler.c @@ -15,8 +15,11 @@ #include #include +#include +#include #include +#include #include void mainboard_smi_espi_handler(void) @@ -24,10 +27,18 @@ void mainboard_smi_espi_handler(void) chromeec_smi_process_events(); } +static void mainboard_gpio_smi_sleep(void) +{ + /* Hold camera device in reset and then power it down. */ + gpio_set(EN_CAM_PMIC_RST_L, 0); + gpio_set(EN_PP3300_DX_CAM, 0); +} + void mainboard_smi_sleep(u8 slp_typ) { chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS, MAINBOARD_EC_S5_WAKE_EVENTS); + mainboard_gpio_smi_sleep(); } int mainboard_smi_apmc(u8 apmc) -- cgit v1.2.3