diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2016-01-27 15:59:48 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2016-08-12 03:11:19 +0000 |
commit | eb4e3c97221d4304a976a51a14a1a35aa18801aa (patch) | |
tree | 9f097d4f72d7ee896e1948ff2ab0e2221589bffc /include/system.h | |
parent | 00aea92c90fd7284f9cbf014a98439cbb17e766a (diff) | |
download | chrome-ec-eb4e3c97221d4304a976a51a14a1a35aa18801aa.tar.gz |
system: Add hibernate board-level callback
Allow boards to take action (such as entering a custom low-power
hibernate-like state) before putting the chip into hibernate state.
BUG=chrome-os-partner:56070
BRANCH=firmware-strago-7287.B
TEST=Manual with subsequent commit on chell. Verify board-level
hibernate callback is called when "hibernate" is run on EC console.
Ported from the master branch to strago branch.
Change-Id: Ie1da044037a74ff8bce5c822f28ce837c62ceec0
Reviewed-on: https://chromium-review.googlesource.com/324086
Change-Id: I1665e56bf471f04180467513f5a7bdc4976bcc55
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/367884
Reviewed-by: Shawn N <shawnn@chromium.org>
(cherry picked from commit 7d5f758795ba0b9178335c2f08f4b2e51e1bf880)
Reviewed-on: https://chromium-review.googlesource.com/368344
Diffstat (limited to 'include/system.h')
-rw-r--r-- | include/system.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h index 320410b160..fe079aa646 100644 --- a/include/system.h +++ b/include/system.h @@ -264,6 +264,13 @@ int system_set_vbnvcontext(const uint8_t *block); */ void system_hibernate(uint32_t seconds, uint32_t microseconds); +/** + * Optional board-level callback function called prior to initiating chip-level + * hibernate sequence. This function may or may not return, depending if the + * board implements an alternate hibernate method. + */ +void board_hibernate(void) __attribute__((weak)); + /* Minimum duration to get proper hibernation */ #define SYSTEM_HIB_MINIMUM_DURATION 0, 150000 |