summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-07-23 18:10:25 -0700
committerCommit Bot <commit-bot@chromium.org>2020-07-29 07:22:07 +0000
commit73fe6226b61933f9ebc51ac39ca5806a5f397dc7 (patch)
tree740a817f8d2f61313164af90d59294ca9356cdc7 /power
parentd434d51ab0c0aedc4b27fa66b2969c847fa43575 (diff)
downloadchrome-ec-73fe6226b61933f9ebc51ac39ca5806a5f397dc7.tar.gz
sc7180: Allow the idle task to go into deep sleep in S3 or lower
Move the enable_sleep(SLEEP_MASK_AP_RUN) call from S5S3 to S3S0, such that the idle task can go into deep sleep in S3. BRANCH=None BUG=b:148149387 TEST=Tried to trigger different states on the power sequence. Change-Id: I9f7ea0186547ea460b3a07d4e98cef0fa6c16b08 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2321878 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/sc7180.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/power/sc7180.c b/power/sc7180.c
index 88caf81db2..06ac54479b 100644
--- a/power/sc7180.c
+++ b/power/sc7180.c
@@ -523,7 +523,6 @@ static void power_off(void)
#endif /* defined(CONFIG_POWER_PP5000_CONTROL) */
lid_opened = 0;
- enable_sleep(SLEEP_MASK_AP_RUN);
}
/**
@@ -581,7 +580,6 @@ static int power_on(void)
}
CPRINTS("POWER_GOOD seen");
- disable_sleep(SLEEP_MASK_AP_RUN);
return EC_SUCCESS;
}
@@ -823,6 +821,8 @@ enum power_state power_handle_state(enum power_state state)
case POWER_S3S0:
hook_notify(HOOK_CHIPSET_RESUME);
+
+ disable_sleep(SLEEP_MASK_AP_RUN);
return POWER_S0;
case POWER_S0:
@@ -842,6 +842,8 @@ enum power_state power_handle_state(enum power_state state)
/* Call hooks here since we don't know it prior to AP suspend */
hook_notify(HOOK_CHIPSET_SUSPEND);
+
+ enable_sleep(SLEEP_MASK_AP_RUN);
return POWER_S3;
case POWER_S3S5: