diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-11-14 22:50:59 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-15 13:23:32 -0800 |
commit | 99182e10d3ade88dc560abf8102949d766ec40e5 (patch) | |
tree | d518d17240061d394118348847958431bc3efe77 | |
parent | 1a0dedbf02eaa61209955286683950af11782fe9 (diff) | |
download | chrome-ec-99182e10d3ade88dc560abf8102949d766ec40e5.tar.gz |
Revert "power: Get rid of power_board_handle_host_sleep_event"
This reverts commit 352276235ca18404a42ca01b75de3fdc7951e271.
This is required to ensure that PMIC VR decay is enabled before
SLP_S0# is asserted. Else, the setting does not take effect and hence
results in higher power consumption.
BUG=b:69337192
BRANCH=None
TEST=make -j buildall
Change-Id: I6885e7447277d853a2414be299dfea25f5547df4
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/771054
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | include/power.h | 8 | ||||
-rw-r--r-- | power/intel_x86.c | 12 |
2 files changed, 19 insertions, 1 deletions
diff --git a/include/power.h b/include/power.h index a39b757078..271b8add69 100644 --- a/include/power.h +++ b/include/power.h @@ -192,6 +192,14 @@ enum host_sleep_event power_get_host_sleep_state(void); */ void power_chipset_handle_host_sleep_event(enum host_sleep_event state); +/** + * Provide callback to allow board to take any action on host sleep event + * command. + * + * @param state Current host sleep state updated by the host. + */ +void power_board_handle_host_sleep_event(enum host_sleep_event state); + /* * This is the default state of host sleep event. Calls to * power_reset_host_sleep_state will set host sleep event to this diff --git a/power/intel_x86.c b/power/intel_x86.c index 46cfb13df8..8a841161e3 100644 --- a/power/intel_x86.c +++ b/power/intel_x86.c @@ -473,10 +473,19 @@ void common_intel_x86_handle_rsmrst(enum power_state state) CPRINTS("Pass through GPIO_RSMRST_L_PGOOD: %d", rsmrst_in); } -#if defined(CONFIG_POWER_TRACK_HOST_SLEEP_STATE) && defined(CONFIG_POWER_S0IX) +#ifdef CONFIG_POWER_TRACK_HOST_SLEEP_STATE + +void __attribute__((weak)) +power_board_handle_host_sleep_event(enum host_sleep_event state) +{ + /* Default weak implementation -- no action required. */ +} void power_chipset_handle_host_sleep_event(enum host_sleep_event state) { + power_board_handle_host_sleep_event(state); + +#ifdef CONFIG_POWER_S0IX if (state == HOST_SLEEP_EVENT_S0IX_SUSPEND) { /* * Indicate to power state machine that a new host event for @@ -499,6 +508,7 @@ void power_chipset_handle_host_sleep_event(enum host_sleep_event state) } else if (state == HOST_SLEEP_EVENT_DEFAULT_RESET) { power_signal_disable_interrupt(sleep_sig[SYS_SLEEP_S0IX]); } +#endif } #endif |