summaryrefslogtreecommitdiff
path: root/common/usbc/usb_tc_ctvpd_sm.c
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2019-11-05 18:47:47 +0000
committerCommit Bot <commit-bot@chromium.org>2019-11-06 21:49:53 +0000
commit1369d55f5e3cb9f0389c452b054d62fc74255c18 (patch)
tree4bfeacef7e4ecea4a126f9798b364e1b2f12417b /common/usbc/usb_tc_ctvpd_sm.c
parentbdc0f13235d05c411a3ebd96eeb58f338cbff4da (diff)
downloadchrome-ec-1369d55f5e3cb9f0389c452b054d62fc74255c18.tar.gz
Revert "usbc: remove unnecessary tcpc CC reads"
This reverts commit bec03d91bc9f954682c02d122a0500d10cc102c2. Reason for revert: Some TCPC's bugs will generate an attach event when nothing is connected, triggering the state machine to enter an attached state. Example output with nothing connected to the port: 2019-10-28 10:23:20 [0.044393 C1: Unattached.SNK] 2019-10-28 10:23:20 [0.101264 p1: PPC init'd.] 2019-10-28 10:23:20 [0.106488 C1: Unattached.SRC] 2019-10-28 10:23:20 [0.116072 C1: AttachWait.SRC] 2019-10-28 10:23:20 [0.220006 C1: Attached.SRC] TOT has basic TypeC/PD functionality but issues still exist that will be fixed in subsequent CLs. Original change's description: > 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> Bug: none Change-Id: Ie9bd366dd85df9a33934e06e4208543f6e7aaa9b Signed-off-by: Sam Hurst <shurst@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1900058 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/usbc/usb_tc_ctvpd_sm.c')
-rw-r--r--common/usbc/usb_tc_ctvpd_sm.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/common/usbc/usb_tc_ctvpd_sm.c b/common/usbc/usb_tc_ctvpd_sm.c
index 996b38b6fb..1747a8c0ab 100644
--- a/common/usbc/usb_tc_ctvpd_sm.c
+++ b/common/usbc/usb_tc_ctvpd_sm.c
@@ -29,9 +29,6 @@
#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.