diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-07-24 08:31:09 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-07-25 00:14:47 -0700 |
commit | 1a7c1210fba8a0aee04a4f2ea3a931be415c78f3 (patch) | |
tree | 40aef7a5ea5ce44b7d4c84106557d01beb26a84b /board/nocturne/base_detect.c | |
parent | d9ce7b5c3afca7d60f6aa76e9ec7e2888bd1737e (diff) | |
download | chrome-ec-1a7c1210fba8a0aee04a4f2ea3a931be415c78f3.tar.gz |
nocturne: Restart base detection in S3.
Previously, the base detection state machine was restarting in S5,
however if the state machine ran through its loop and the system had not
transitioned to S3 yet, the state machine may have been disabled.
This commit simply changes the point which the state machine is
restarted from S5 to S3. Since it's active in S3 and higher, we should
avoid that case of having the state machine being disabled when the
system is up.
BUG=b:111417839, b:111540121
BRANCH=none
TEST=shut device down, attach base, boot to S0, verify that base is
always detected.
Change-Id: I1b4a44b248732d3242ca0630668db3544de22793
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1148554
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/nocturne/base_detect.c')
-rw-r--r-- | board/nocturne/base_detect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/board/nocturne/base_detect.c b/board/nocturne/base_detect.c index 4758448acd..dba2a542b4 100644 --- a/board/nocturne/base_detect.c +++ b/board/nocturne/base_detect.c @@ -226,14 +226,14 @@ DECLARE_HOOK(HOOK_INIT, base_detect_deferred, HOOK_PRIO_INIT_ADC + 1); static void restart_state_machine(void) { /* - * Since we do not poll in S5, the base may or may not be connected, - * therefore intentionally set the state to detached such that we can - * detect and power on the base if necessary. + * Since we do not poll in anything lower than S3, the base may or may + * not be connected, therefore intentionally set the state to detached + * such that we can detect and power on the base if necessary. */ set_state(BASE_DETACHED); hook_call_deferred(&base_detect_deferred_data, 0); } -DECLARE_HOOK(HOOK_CHIPSET_STARTUP, restart_state_machine, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_CHIPSET_RESUME, restart_state_machine, HOOK_PRIO_DEFAULT); static void power_off_base(void) { |