diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-12-11 16:04:03 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-08 17:15:04 +0000 |
commit | b560141a1d8ce034ae5b85718c163fb7ab83c24f (patch) | |
tree | 1b0505d2eeaa5bc7c1f521e6fed1015e9ab2d023 /driver/tcpm/stub.c | |
parent | 5750cc926d64033fe7f19b760165011120915ab0 (diff) | |
download | chrome-ec-b560141a1d8ce034ae5b85718c163fb7ab83c24f.tar.gz |
tcpci: Only drive one CC line when attached
Some of the NCT38XX driver code was more generic TCPCI
than specific to the chip. So moved a number of the
functions over to be generically handled.
In doing this I propagated the idea of tri-state
polarity. It is now either NORMAL, FLIPPED, or NONE
for unattached. This is needed for the generic handling
of correctly setting CC. This required changing the
polarity from NONE to the appropriate detected polarity
when in auto toggle.
tcpci_tcpm_set_cc will now only set a single CC line
when attached and both when unattached.
BUG=b:146003980, chromium:951681
BRANCH=none
TEST=Charging works with both plug orientations with AP on
TEST=Device works with both plug orientations with AP on
TEST=Charging works with both plug orientations with AP off
Change-Id: Ie4b5cc998902a346a4f4a2c1480204b3a81017dd
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1967932
Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'driver/tcpm/stub.c')
-rw-r--r-- | driver/tcpm/stub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/tcpm/stub.c b/driver/tcpm/stub.c index 3626f148fc..fcc460a8c6 100644 --- a/driver/tcpm/stub.c +++ b/driver/tcpm/stub.c @@ -63,7 +63,7 @@ int tcpm_set_cc(int port, int pull) return tcpc_set_cc(port, pull); } -int tcpm_set_polarity(int port, int polarity) +int tcpm_set_polarity(int port, enum tcpc_cc_polarity polarity) { return tcpc_set_polarity(port, polarity); } |