summaryrefslogtreecommitdiff
path: root/driver
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 /driver
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 'driver')
-rw-r--r--driver/tcpm/anx74xx.c10
-rw-r--r--driver/tcpm/fusb302.c10
-rw-r--r--driver/tcpm/it83xx.c10
-rw-r--r--driver/tcpm/mt6370.c10
-rw-r--r--driver/tcpm/tcpci.c14
5 files changed, 0 insertions, 54 deletions
diff --git a/driver/tcpm/anx74xx.c b/driver/tcpm/anx74xx.c
index 7cdde05410..0e9635e6b1 100644
--- a/driver/tcpm/anx74xx.c
+++ b/driver/tcpm/anx74xx.c
@@ -765,16 +765,6 @@ static int anx74xx_tcpm_set_polarity(int port, enum tcpc_cc_polarity polarity)
{
int reg, mux_state, rv = EC_SUCCESS;
- /*
- * TCPCI sets the CC lines based on polarity. If it is set to
- * no connection then both CC lines are driven, otherwise only
- * one is driven. This driver does not appear to do this. If
- * that changes, this would be the location you would want to
- * adjust the CC lines for the current polarity
- */
- if (polarity == POLARITY_NONE)
- return EC_SUCCESS;
-
rv |= tcpc_read(port, ANX74XX_REG_CC_SOFTWARE_CTRL, &reg);
if (polarity_rm_dts(polarity)) /* Inform ANX to use CC2 */
reg &= ~ANX74XX_REG_SELECT_CC1;
diff --git a/driver/tcpm/fusb302.c b/driver/tcpm/fusb302.c
index 691e876435..8a8acd5897 100644
--- a/driver/tcpm/fusb302.c
+++ b/driver/tcpm/fusb302.c
@@ -568,16 +568,6 @@ static int fusb302_tcpm_set_polarity(int port, enum tcpc_cc_polarity polarity)
/* Port polarity : 0 => CC1 is CC line, 1 => CC2 is CC line */
int reg;
- /*
- * TCPCI sets the CC lines based on polarity. If it is set to
- * no connection then both CC lines are driven, otherwise only
- * one is driven. This driver does not appear to do this. If
- * that changes, this would be the location you would want to
- * adjust the CC lines for the current polarity
- */
- if (polarity == POLARITY_NONE)
- return EC_SUCCESS;
-
tcpc_read(port, TCPC_REG_SWITCHES0, &reg);
/* clear VCONN switch bits */
diff --git a/driver/tcpm/it83xx.c b/driver/tcpm/it83xx.c
index 22a0b0075d..d3c36ee1fc 100644
--- a/driver/tcpm/it83xx.c
+++ b/driver/tcpm/it83xx.c
@@ -483,16 +483,6 @@ static int it83xx_tcpm_set_cc(int port, int pull)
static int it83xx_tcpm_set_polarity(int port, enum tcpc_cc_polarity polarity)
{
- /*
- * TCPCI sets the CC lines based on polarity. If it is set to
- * no connection then both CC lines are driven, otherwise only
- * one is driven. This driver does not appear to do this. If
- * that changes, this would be the location you would want to
- * adjust the CC lines for the current polarity
- */
- if (polarity == POLARITY_NONE)
- return EC_SUCCESS;
-
it83xx_select_polarity(port, polarity);
return EC_SUCCESS;
diff --git a/driver/tcpm/mt6370.c b/driver/tcpm/mt6370.c
index 26bfdd9690..eb0b0fc2e9 100644
--- a/driver/tcpm/mt6370.c
+++ b/driver/tcpm/mt6370.c
@@ -169,16 +169,6 @@ static int mt6370_set_polarity(int port, enum tcpc_cc_polarity polarity)
{
enum tcpc_cc_voltage_status cc1, cc2;
- /*
- * TCPCI sets the CC lines based on polarity. If it is set to
- * no connection then both CC lines are driven, otherwise only
- * one is driven. This driver does not appear to do this. If
- * that changes, this would be the location you would want to
- * adjust the CC lines for the current polarity
- */
- if (polarity == POLARITY_NONE)
- return EC_SUCCESS;
-
mt6370_polarity = polarity;
mt6370_get_cc(port, &cc1, &cc2);
return tcpci_tcpm_set_polarity(port, polarity);
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index b4f33187cd..2e1b535055 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -403,20 +403,6 @@ int tcpci_enter_low_power_mode(int port)
int tcpci_tcpm_set_polarity(int port, enum tcpc_cc_polarity polarity)
{
- int rv;
-
- /*
- * TCPCI sets the CC lines based on polarity. If it is set to
- * no connection or SRC Debug Accessory then both CC lines are
- * driven, otherwise only one is driven.
- */
- rv = tcpm_set_cc(port, tcpci_get_cached_pull(port));
- if (rv)
- return rv;
-
- if (polarity == POLARITY_NONE)
- return EC_SUCCESS;
-
return tcpc_update8(port,
TCPC_REG_TCPC_CTRL,
TCPC_REG_TCPC_CTRL_SET(1),