From 5a8b1535c20dfc1e6e1bdfdf9f1626b915fd9e43 Mon Sep 17 00:00:00 2001 From: Edward Hill Date: Fri, 3 Jul 2020 11:41:32 -0600 Subject: 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 Change-Id: I94f2f91efcfd48172b9345dd59aa1e8594118814 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2281132 Reviewed-by: Denis Brockus Tested-by: Denis Brockus --- common/usbc/usb_tc_drp_acc_trysrc_sm.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.1