summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-02-04 21:30:29 -0800
committerVadim Bendebury <vbendeb@chromium.org>2017-02-07 02:44:43 +0000
commita3e8ea92ffd5a3e3b5882efb1a4c39d5216bf09c (patch)
tree2da380c06c34cd5813abaeb0d69b1f35bd8aad3f /include/system.h
parenta9db319dd46fee25a11abcd55d2c8d3c9d012794 (diff)
downloadchrome-ec-a3e8ea92ffd5a3e3b5882efb1a4c39d5216bf09c.tar.gz
cr50: consolidate chip shutdown and resume events
There is no point in keeping in one file multiple hooks task callbacks to handle chipset shutdown and resume conditions. Also, the policy of disabling deep sleep needs to be decided in the board level hooks. BRANCH=none BUG=chrome-os-partner:59007 TEST=ran reef through 200 cycles of suspend/resume Change-Id: I4d30cd04b986b243a5bea44c6978a5f82f8f62a7 Reviewed-on: https://chromium-review.googlesource.com/437729 Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Bendebury <vbendeb@chromium.org> Trybot-Ready: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index 1854e7373a..4b95e59c70 100644
--- a/include/system.h
+++ b/include/system.h
@@ -394,6 +394,7 @@ static inline void disable_sleep(uint32_t mask)
atomic_or(&sleep_mask, mask);
}
+/* The following three functions are not available on all chips. */
/**
* Postpone sleeping for at least this long, regardless of sleep_mask.
*
@@ -401,6 +402,16 @@ static inline void disable_sleep(uint32_t mask)
*/
void delay_sleep_by(uint32_t us);
+/*
+ **
+ * Funtctions to control deep sleep behavior. When disabled - the device never
+ * falls into deep sleep (the lowest power consumption state exit of which
+ * usually happens through the regular reset vector with just a few bits of
+ * state preserved).
+ */
+void disable_deep_sleep(void);
+void enable_deep_sleep(void);
+
/**
* Use hibernate module to set up an RTC interrupt at a given
* time from now