summaryrefslogtreecommitdiff
path: root/board/poppy/board.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-10-30 20:04:39 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-31 15:15:14 -0700
commit1f767e3e91be388dee689ac85408dfb5e3414581 (patch)
treede7e7ce62f3bdca93157ca0d9562d0edf7859530 /board/poppy/board.c
parentf83866c7aaf73fbffea6714a98180c7474d6e540 (diff)
downloadchrome-ec-1f767e3e91be388dee689ac85408dfb5e3414581.tar.gz
poppy/nautilus: Move pmic vr decay enable/disable to suspend/resume hooks
Now that chipset suspend/resume hooks are called only once per S0ix entry/exit, move the calls to enable/disable PMIC VR decay to suspend/resume hooks. BUG=None BRANCH=None TEST=Verified that PMIC VR decay enable/disable are called only once during one S0ix entry/exit. Change-Id: Ie01c083963efeacaf0092927f5778b7c1cebf74f Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/745981 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'board/poppy/board.c')
-rw-r--r--board/poppy/board.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/board/poppy/board.c b/board/poppy/board.c
index 60cdff40dd..d13361c108 100644
--- a/board/poppy/board.c
+++ b/board/poppy/board.c
@@ -632,14 +632,6 @@ static void board_pmic_enable_slp_s0_vr_decay(void)
i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x38, 0x7a);
}
-void power_board_handle_host_sleep_event(enum host_sleep_event state)
-{
- if (state == HOST_SLEEP_EVENT_S0IX_SUSPEND)
- board_pmic_enable_slp_s0_vr_decay();
- else if (state == HOST_SLEEP_EVENT_S0IX_RESUME)
- board_pmic_disable_slp_s0_vr_decay();
-}
-
static void board_pmic_init(void)
{
if (system_jumped_to_this_image())
@@ -1043,6 +1035,7 @@ DECLARE_HOOK(HOOK_INIT, board_sensor_init, HOOK_PRIO_DEFAULT);
static void board_chipset_resume(void)
{
gpio_set_level(GPIO_ENABLE_BACKLIGHT, 1);
+ board_pmic_disable_slp_s0_vr_decay();
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
@@ -1050,6 +1043,7 @@ DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
static void board_chipset_suspend(void)
{
gpio_set_level(GPIO_ENABLE_BACKLIGHT, 0);
+ board_pmic_enable_slp_s0_vr_decay();
}
DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);