summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpci.c
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2020-02-13 15:29:55 -0800
committerCommit Bot <commit-bot@chromium.org>2020-02-14 17:29:12 +0000
commitcf32f9f86ca2add5a457f53670c42123b429bffa (patch)
tree021f29be1e2e58b0cdede663321391a33c8a7595 /driver/tcpm/tcpci.c
parentb4ae96731536f40724f425df3c3a6506d9fef724 (diff)
downloadchrome-ec-cf32f9f86ca2add5a457f53670c42123b429bffa.tar.gz
tcpci: Don't set 1 CC to open based on polarity
This commit fixes an issue where the TCPCI driver was setting 1 CC line to open when the polarity was known. This was causing issues where a charger would only work in one orientation without a battery. Ideally, this behaviour should be done a bit higher up in the stack whenever we are sourcing VCONN. BUG=b:149496312,chromium:149496312 BRANCH=hatch TEST=Build and flash waddledoo, remove the battery, plug in a PD charger, verify that the EC does not brown out. Change-Id: Idbcb915c0bbd867cfafc1e32c0f6534b363a867b Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2055618 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpci.c')
-rw-r--r--driver/tcpm/tcpci.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index 0ada2111ee..b4d44e0a31 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -360,23 +360,12 @@ int tcpci_tcpm_get_cc(int port, enum tcpc_cc_voltage_status *cc1,
int tcpci_tcpm_set_cc(int port, int pull)
{
int cc1, cc2;
- enum tcpc_cc_polarity polarity;
cc1 = cc2 = pull;
/* Keep track of current CC pull value */
tcpci_set_cached_pull(port, pull);
- /*
- * Only drive one CC line when attached crbug.com/951681
- * and drive both when unattached.
- */
- polarity = pd_get_polarity(port);
- if (polarity == POLARITY_CC1)
- cc2 = TYPEC_CC_OPEN;
- else if (polarity == POLARITY_CC2)
- cc1 = TYPEC_CC_OPEN;
-
return tcpc_write(port, TCPC_REG_ROLE_CTRL,
TCPC_REG_ROLE_CTRL_SET(0,
tcpci_get_cached_rp(port),