summaryrefslogtreecommitdiff
path: root/chip/mec1322
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 /chip/mec1322
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 'chip/mec1322')
-rw-r--r--chip/mec1322/system.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/mec1322/system.c b/chip/mec1322/system.c
index fd38321d39..f7fa770388 100644
--- a/chip/mec1322/system.c
+++ b/chip/mec1322/system.c
@@ -190,6 +190,9 @@ void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
int i;
+ if (board_hibernate)
+ board_hibernate();
+
#ifdef CONFIG_HOSTCMD_PD
/* Inform the PD MCU that we are going to hibernate. */
host_command_pd_request_hibernate();