summaryrefslogtreecommitdiff
path: root/driver/tcpm/it83xx.c
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-08-10 14:02:25 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-11 04:35:34 +0000
commit1c3aacb46b7b800b9c285692916d2a785dadcfd2 (patch)
tree56c5e369516f42fcb51b591e10936db9e0332d75 /driver/tcpm/it83xx.c
parent62d62a164edce7b3462671d254bfdc5c6be72f81 (diff)
downloadchrome-ec-1c3aacb46b7b800b9c285692916d2a785dadcfd2.tar.gz
sc7180: Cancel the power button timer during the power state transition
A timer is created in the check_for_power_off_event(), which waits for the power button long press. Should cancel the timer during the power state transition; otherwise, EC will crash. The S3 state calls the check_for_power_off_event() too. So cancel the timer during S3->S0 and S3->S5. BRANCH=None BUG=b:163367454 TEST=Checked the bug scenario: * In VT2, run powerd_dbus_suspend and EC transits the state to S3. * Press power button * EC transits the state to S0; no crash. TEST=Tested the normal shutdown case: * Hold the power button * After 8s, EC transits to S3 and then S5 after the power button is released. TEST=Tested the change in check_for_power_off_event(): * Hold the power button * In VT2, run "shutdown -H now" which makes POWER_GOOD drop * EC transits to S3 and then S5 after the power button is released Change-Id: Ia279e890954cf77f94ae8907a2782f94265c849a Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2346600 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'driver/tcpm/it83xx.c')
0 files changed, 0 insertions, 0 deletions