summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.c
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2020-02-14 07:53:11 -0700
committerCommit Bot <commit-bot@chromium.org>2020-02-15 02:12:59 +0000
commit4588844d403aad4b9c6bd0732ad6423646ce7a51 (patch)
treeb14fc6579eb9633dbd3b2110e791d139c8fa353f /common/usb_pd_protocol.c
parent139e94729bc55c6dbf838d1136c04b7ce711c48f (diff)
downloadchrome-ec-4588844d403aad4b9c6bd0732ad6423646ce7a51.tar.gz
usbc: remove tri-state polarity
TCPCIr2 had an issue with setting CC coming out of DRP that if the polarity was not retained that the connection dropped back to OPEN. Unfortunately this change broke many of the other TCPCI implementations. I am working on a different method of dealing with coming out of DRP and this is no longer needed. BUG=none BRANCH=none TEST=verify USB-C is working Change-Id: Ifa8f26d417df2f5d5f41a23fbf7e6f9129031e94 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2056968 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r--common/usb_pd_protocol.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index d248c67036..f272dfa8f0 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -849,22 +849,9 @@ static inline void set_state(int port, enum pd_states next_state)
/* Invalidate message IDs. */
invalidate_last_message_id(port);
- if (not_auto_toggling) {
- /*
- * On disconnect set the resistor on both CC lines so
- * we can detect a connection with either polarity.
- * If we are in dual role toggle, then this will happen
- * automatically as it needs, so don't adjust the role
- * in that case.
- */
- pd[port].polarity = POLARITY_NONE;
- if (tcpm_set_polarity(port, POLARITY_NONE))
- CPRINTS("C%d failed to set polarity",
- port);
-
+ if (not_auto_toggling)
/* Disable Auto Discharge Disconnect */
tcpm_enable_auto_discharge_disconnect(port, 0);
- }
/* detect USB PD cc disconnect */
if (IS_ENABLED(CONFIG_COMMON_RUNTIME))
@@ -2959,9 +2946,6 @@ void pd_task(void *u)
pd[port].flags |= PD_FLAGS_LPM_ENGAGED;
#endif
- /* Start as not connected */
- pd[port].polarity = POLARITY_NONE;
-
#ifdef CONFIG_COMMON_RUNTIME
pd_init_tasks();
#endif