summaryrefslogtreecommitdiff
path: root/include/usb_tc_sm.h
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2019-12-11 16:04:03 -0700
committerCommit Bot <commit-bot@chromium.org>2020-01-08 17:15:04 +0000
commitb560141a1d8ce034ae5b85718c163fb7ab83c24f (patch)
tree1b0505d2eeaa5bc7c1f521e6fed1015e9ab2d023 /include/usb_tc_sm.h
parent5750cc926d64033fe7f19b760165011120915ab0 (diff)
downloadchrome-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 'include/usb_tc_sm.h')
-rw-r--r--include/usb_tc_sm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb_tc_sm.h b/include/usb_tc_sm.h
index 614269d5cd..4782dcbfe9 100644
--- a/include/usb_tc_sm.h
+++ b/include/usb_tc_sm.h
@@ -279,7 +279,7 @@ void pd_request_vconn_swap_off(int port);
* @param cc2 value of CC2 set by tcpm_get_cc
* @return 0 if cc1 is connected, else 1 for cc2
*/
-enum pd_cc_polarity_type get_snk_polarity(enum tcpc_cc_voltage_status cc1,
+enum tcpc_cc_polarity get_snk_polarity(enum tcpc_cc_voltage_status cc1,
enum tcpc_cc_voltage_status cc2);
/**