summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-07-03 11:41:32 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-04 03:36:51 +0000
commit5a8b1535c20dfc1e6e1bdfdf9f1626b915fd9e43 (patch)
treebdb51839d68bbfc5e38f31a2a2abee66d58c362c
parentfc566f558279c272c2a4202a3be91de10594580f (diff)
downloadchrome-ec-5a8b1535c20dfc1e6e1bdfdf9f1626b915fd9e43.tar.gz
tcpmv2: Fix LPM exit debounce timer
The LPM exit debounce timer wasn't working because tc_pause_event_loop() is called on entry to low power mode. Add a call to tc_start_event_loop() so that the timer is checked and we exit low power mode at the right time. BUG=b:155364505 b:160261795 b:160430262 BRANCH=none TEST=LPM exit on resume Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I94f2f91efcfd48172b9345dd59aa1e8594118814 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2281132 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index c61a5a7f19..f4cb513eb5 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -2840,6 +2840,7 @@ static void tc_low_power_mode_run(const int port)
if (TC_CHK_FLAG(port, TC_FLAGS_CHECK_CONNECTION)) {
uint64_t now = get_time().val;
+ tc_start_event_loop(port);
if (tc[port].low_power_exit_time == 0) {
tc[port].low_power_exit_time = now
+ PD_LPM_EXIT_DEBOUNCE_US;