diff options
author | Jett Rink <jettrink@chromium.org> | 2019-09-25 11:28:51 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-02 23:46:31 +0000 |
commit | bec03d91bc9f954682c02d122a0500d10cc102c2 (patch) | |
tree | 2b44756ee2847e039a38122d38ff0ddb70f98b70 /common/usbc/usb_tc_ctvpd_sm.c | |
parent | ad64a080363380e7b34d4c395867a55b83e61c1c (diff) | |
download | chrome-ec-bec03d91bc9f954682c02d122a0500d10cc102c2.tar.gz |
usbc: remove unnecessary tcpc CC reads
We only need to read the CC pins when the CC evt is fired otherwise the
CC pins should have the same value. It is actually incorrect/undesirable
that our old PD stack queried the tpcp cc driver over i2c so frequently
for the CC pins status.
Also single source code that interprets the CC lines values into a UFP
or DFP state.
Lastly, remove extraneous timers for cc debouncing, we only need one.
BRANCH=none
BUG=none
TEST=builds
Change-Id: I65baa2e6fb92d7ab5ca12daa76225cd13b9ab974
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1825504
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Sam Hurst <shurst@google.com>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common/usbc/usb_tc_ctvpd_sm.c')
-rw-r--r-- | common/usbc/usb_tc_ctvpd_sm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/usbc/usb_tc_ctvpd_sm.c b/common/usbc/usb_tc_ctvpd_sm.c index 9aeb7742b0..33f1253e27 100644 --- a/common/usbc/usb_tc_ctvpd_sm.c +++ b/common/usbc/usb_tc_ctvpd_sm.c @@ -29,6 +29,9 @@ #define SUPPORT_TIMER_RESET_REQUEST 1 #define SUPPORT_TIMER_RESET_COMPLETE 2 +/* Constant used to force an initial debounce cycle */ +#define PD_CC_UNSET -1 + /** * This is the Type-C Port object that contains information needed to * implement a Charge Through VCONN Powered Device. |