summaryrefslogtreecommitdiff
path: root/include/system.h
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-01-27 15:59:48 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-01-28 22:54:54 -0800
commit9148a4dc0188a92e239521feae12871ff8bd9626 (patch)
tree47959283b68f36d992c176b48245b689117c199a /include/system.h
parentdb7194fbe47479bdab69666e2e1717a33d299dcb (diff)
downloadchrome-ec-9148a4dc0188a92e239521feae12871ff8bd9626.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:48835 BRANCH=glados TEST=Manual with subsequent commit on chell. Verify board-level hibernate callback is called when "hibernate" is run on EC console. Change-Id: Ie1da044037a74ff8bce5c822f28ce837c62ceec0 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/324086 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/system.h')
-rw-r--r--include/system.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index 2a1c1784ca..9ae0da1bf0 100644
--- a/include/system.h
+++ b/include/system.h
@@ -267,6 +267,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