From 9fb10386a720d270e37ce61da3ff3a6d5a69951e Mon Sep 17 00:00:00 2001 From: Divagar Mohandass Date: Mon, 19 Jun 2017 14:15:50 +0530 Subject: [PATCH] Poppy: Configure camera PMIC to low power mode. This change will configure camera PMIC to low power mode in S3 and S0ix sleep state and resumes it in S0 state. BUG=b:62779726 BRANCH=None TEST=`Build/Flash EC and verify the PP3300_DX_CAM signal is toggling during S3/S0ix cycle.` Change-Id: I9f376762100ac9b208df4a39160e4acd3b7b925e Signed-off-by: Divagar Mohandass Reviewed-on: https://chromium-review.googlesource.com/539316 Reviewed-by: Nicolas Boichat Reviewed-by: Vincent Palatin --- board/poppy/board.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/board/poppy/board.c b/board/poppy/board.c index 73c7dff866..62fd27f2be 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -915,6 +915,9 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); static void board_chipset_resume(void) { gpio_set_level(GPIO_ENABLE_BACKLIGHT, 1); +#ifdef POPPY_REV0 + gpio_set_level(GPIO_PP3300_DX_CAM, 1); +#endif } DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); @@ -922,6 +925,9 @@ DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); static void board_chipset_suspend(void) { gpio_set_level(GPIO_ENABLE_BACKLIGHT, 0); +#ifdef POPPY_REV0 + gpio_set_level(GPIO_PP3300_DX_CAM, 0); +#endif } DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);