summaryrefslogtreecommitdiff
path: root/driver/charger/sm5803.c
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-07-23 15:58:48 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-08 01:47:11 +0000
commit67944274aa8b0639e3e23eacd8cf277908874d5f (patch)
tree6bf9a3cf6b9a7a65ddff44e3f8d1f76446cc90ee /driver/charger/sm5803.c
parenta627487b4f934f3f10973f25398d75e051daeb2a (diff)
downloadchrome-ec-67944274aa8b0639e3e23eacd8cf277908874d5f.tar.gz
sc7180: Support the sleep failure detection to SC7180 power sequence
This only adds the sleep failure detection support to SC7180 power sequence but not enable it yet. The board has to explicitly define the following CONFIG to enable this feature: * CONFIG_CHIPSET_RESUME_INIT_HOOK * CONFIG_POWER_SLEEP_FAILURE_DETECTION Without defining the CONFIGs, the only change is to disable/enable the AP_SUSPEND signal interrupt; the suspend/resume hooks are unchanged, i.e. not wait for the host sleep event. With defining the CONFIGs, the suspend failure detection is enabled. When AP_SUSPEND is deasserted, only the RESUME_INIT hook is triggered to initialize the SPI interface, such that EC can receive the host sleep event. The RESUME hook is delayed to be triggered until AP sends the resume event. If AP_SUSPEND becomes asserted before receiving the host event, will back to S3 and the SUSPEND_COMPLETE hook is triggered to disable the SPI interface. If no host event is received and no AP_SUSPEND assertion, a timeout happens and wake the AP with a HANG_DETECT event. BRANCH=None BUG=b:148149387 TEST=Tried the following scenaiors (the CONFIGs not defined): (1) On AP_SUSPEND assertion, SUSPEND hook triggered, go to S3; (2) On AP_SUSPEND deassertion, RESUME hook triggered, go to S0. Checked the follower CL for the configs defined. Change-Id: I28301921a4c85aab092cdc8af9d6ff4b1da7ec61 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2321876 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'driver/charger/sm5803.c')
0 files changed, 0 insertions, 0 deletions