diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2016-08-11 17:02:41 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-12 13:45:35 -0700 |
commit | de4d25964de310effe8ede09e5ba6fa2f40dc52b (patch) | |
tree | ff590ba65dfe3063d9c9e504f89bbd760e838f92 /include | |
parent | 88428882b827b818df9b99ca37ef26b8f1927e9a (diff) | |
download | chrome-ec-de4d25964de310effe8ede09e5ba6fa2f40dc52b.tar.gz |
mkbp_event: Allow host to report sleep state for non-wake event skipping
Allow the host to self-report its sleep state through
EC_CMD_HOST_SLEEP_EVENT, which will typically be sent with SUSPEND
param when the host begins its sleep process. While the host has
self-reported that it is in SUSPEND, don't assert the interrupt
line, except for designated wake events.
BUG=chrome-os-partner:56156
BRANCH=None
TEST=On kevin, run 'ectool hostsleepstate suspend', verify that
interrupt assertion is skipped for battery host event. Run 'ectool
hostsleepstate resume' and verify interrupt is again asserted by the
battery host event.
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I74288465587ccf7185cec717f7c1810602361b8c
Reviewed-on: https://chromium-review.googlesource.com/368391
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 7 | ||||
-rw-r--r-- | include/ec_commands.h | 4 | ||||
-rw-r--r-- | include/power.h | 8 |
3 files changed, 15 insertions, 4 deletions
diff --git a/include/config.h b/include/config.h index dc5eb0707b..64ecab1eff 100644 --- a/include/config.h +++ b/include/config.h @@ -1527,6 +1527,13 @@ /* Support S0ix */ #undef CONFIG_POWER_S0IX + +/* + * Allow the host to self-report its sleep state, in case there is some delay + * between the host beginning to enter the sleep state and power signals + * actually reflecting the new state. + */ +#undef CONFIG_POWER_TRACK_HOST_SLEEP_STATE /*****************************************************************************/ /* Support PWM control */ #undef CONFIG_PWM diff --git a/include/ec_commands.h b/include/ec_commands.h index fd3b1b3df4..0c1cd48a2a 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -3186,10 +3186,6 @@ struct ec_params_host_sleep_event { uint8_t sleep_event; } __packed; -struct ec_response_host_sleep_event { - uint8_t sleep_event; -} __packed; - /*****************************************************************************/ /* Smart battery pass-through */ diff --git a/include/power.h b/include/power.h index 5d1c040d9e..ab8d7ac46a 100644 --- a/include/power.h +++ b/include/power.h @@ -133,4 +133,12 @@ int power_get_pause_in_s5(void); */ void power_set_pause_in_s5(int pause); +#ifdef CONFIG_POWER_TRACK_HOST_SLEEP_STATE +/** + * Get sleep state of host, as reported by the host. + * + * @return Believed sleep state of host. + */ +enum host_sleep_event power_get_host_sleep_state(void); +#endif #endif /* __CROS_EC_POWER_H */ |