summaryrefslogtreecommitdiff
path: root/common/system.c
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2018-05-24 12:01:24 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-30 01:02:36 -0700
commit0de5b8ed695a420728ec7b606b218284b0241006 (patch)
tree5b9c1d87e035bb2a5494de75fcb1e5fb878a847f /common/system.c
parent628c9a924cfde28b2c77707bd71e04cafdf7dc9c (diff)
downloadchrome-ec-0de5b8ed695a420728ec7b606b218284b0241006.tar.gz
system: Enable/Disable low power idle in run time
We have enable_sleep()/disable_sleep() to enable/disable EC deep sleep mode in runtime. Here we introduce similar interfaces to enable/disable EC idle (sleep) mode. BUG=b:78792296 BRANCH=scarlet TEST=Confirm idle mode is enabled/disabled when enable_idle() and disable_idle() are called. Change-Id: I2484f08a066523441064968da99c47de9342ecf0 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/1072370 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> (cherry picked from commit c6b6626cdccef04b0ff203aaed0d84dbdcecf8b7) Reviewed-on: https://chromium-review.googlesource.com/1076708 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Diffstat (limited to 'common/system.c')
-rw-r--r--common/system.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/system.c b/common/system.c
index 64bfabbbc2..aa3e48db34 100644
--- a/common/system.c
+++ b/common/system.c
@@ -102,6 +102,11 @@ static enum ec_reboot_cmd reboot_at_shutdown;
/* On-going actions preventing going into deep-sleep mode */
uint32_t sleep_mask;
+#ifdef CONFIG_LOW_POWER_IDLE_LIMITED
+/* Set it to prevent going into idle mode */
+uint32_t idle_disabled;
+#endif
+
#ifdef CONFIG_HOSTCMD_AP_SET_SKUID
static uint32_t ap_sku_id;