summaryrefslogtreecommitdiff
path: root/util/ectool.c
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2018-05-01 10:58:14 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-14 23:56:58 -0700
commitf11169fa8d1ec6f6982306727f0bf0c8a7bd410b (patch)
tree4890f1f0579b263592ec52915a363ed9b7f90d7f /util/ectool.c
parent163263c9a3eedacff191b50a9da55fd1454fcc86 (diff)
downloadchrome-ec-f11169fa8d1ec6f6982306727f0bf0c8a7bd410b.tar.gz
tcpci: Adjust pd task event/wake when processing alerts
Processing of TCPC alerts takes place in the PDCMD task and the result of processing alerts is to wake the PD task. When the PD task runs, it's possible that it may attempt to put the TCPC into low power mode prior to the remainder of the alert processing function completing. So there may be pending TCPC accesses in the alert handler function which called subsequent to the PD task putting the TCPC into low power mode. The TCPC access in the PDCMD task will cause the TCPC to exit low power mode. With the ANX7447 TCPC, this process will repeat indefinitely. This CL replaces the calls to task_set_event and task_wake with indications stored in a local variable. Then at the end of the function the task_set_event is made if necessary. This change in order removes one guaranteed source of pending TCPC accesses from causing the TCPC to exit low power mode. BRANCH=none BUG=b:77544959 TEST=Was using Salea logic analyzer and testing in conjunction with low power mode. Verified that prior to this change I2C accesses were attempted and NAKd after the command I2CIDLE was sent on the bus. Also tested basic type C operation as both SNK/SRC. Change-Id: I8879c655a48a2b16e0445522497002482dc9ca33 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1044868 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util/ectool.c')
0 files changed, 0 insertions, 0 deletions