diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-11-13 14:04:32 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-05 12:10:11 +0000 |
commit | dc1239524cdb04d4180dd43e03479a2e792afddc (patch) | |
tree | fd6e5c51613093f1601fc7de821b80258a3751b5 | |
parent | e301f56813f8b649d6a43e38592f1ca9769dfc5d (diff) | |
download | chrome-ec-dc1239524cdb04d4180dd43e03479a2e792afddc.tar.gz |
CHERRY-PICK: pd_protocol: Only suspend task when TCPC enters LPM.
This commit fixes an issue of "suspending" the PD tasks prior to
actually entering low power mode. Really, the only place to suspend the
tasks should be where we put the TCPCs into low power mode.
BUG=b:119501850
BRANCH=firmware-nocturne-10984.B,master
TEST=flash nocturne; suspend DUT, resume DUT, verify that TCPCs enter
low power mode after a short time of being in PD_STATE_DRP_AUTO_TOGGLE.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/1334529
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Change-Id: I4361001fbbdf2d0fa9c76e926162c8573f0eef67
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2160873
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Patryk Duda <pdk@semihalf.com>
Commit-Queue: Patryk Duda <pdk@semihalf.com>
-rw-r--r-- | common/usb_pd_protocol.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 3766d5e182..996a0d07db 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -3224,10 +3224,8 @@ void pd_task(void *u) * TCPC otherwise we might wake it up. */ if (pd[port].flags & PD_FLAGS_LPM_REQUESTED && - !(evt & PD_EVENT_CC)) { - timeout = -1; + !(evt & PD_EVENT_CC)) break; - } #endif /* CONFIG_USB_PD_TCPC_LOW_POWER */ tcpm_get_cc(port, &cc1, &cc2); @@ -3910,10 +3908,8 @@ void pd_task(void *u) * TCPC otherwise we might wake it up. */ if (pd[port].flags & PD_FLAGS_LPM_REQUESTED && - !(evt & PD_EVENT_CC)) { - timeout = -1; + !(evt & PD_EVENT_CC)) break; - } #endif /* CONFIG_USB_PD_TCPC_LOW_POWER */ tcpm_get_cc(port, &cc1, &cc2); @@ -4713,7 +4709,6 @@ void pd_task(void *u) */ tcpm_enable_drp_toggle(port); pd[port].flags |= PD_FLAGS_TCPC_DRP_TOGGLE; - timeout = -1; set_state(port, PD_STATE_DRP_AUTO_TOGGLE); } |