summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2020-02-12 10:24:53 -0700
committerCommit Bot <commit-bot@chromium.org>2020-02-13 00:58:36 +0000
commit10ff776b895124ec06b81bd26ec3b2d99f834ece (patch)
treeec67d71a935a6e541ba07a822fc7c29bb62be60f /include/usb_pd.h
parent88808c3dda819f9da22272850d2b56ab1e538c9f (diff)
downloadchrome-ec-10ff776b895124ec06b81bd26ec3b2d99f834ece.tar.gz
tcpmv2: make connect after auto-toggle driver specific
nct38xx needs to have the cached polarity set in order to leave DRP mode without going back to an OPEN line. Other TCPCI implementations break when this happens. So moved it to a driver specific function instead TODO(b/149415919): Consider trying to clear the DRP mode instead of changing the polarity BUG=b:149311437 BRANCH=none TEST=verify charger functions on Trogdor Change-Id: I5092a468d860b573a6e5acaf7c013b3425916efb Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2050336 Tested-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 1d75abf638..634c411e0e 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -2290,6 +2290,15 @@ void pd_transmit_complete(int port, int status);
enum tcpc_cc_polarity pd_get_polarity(int port);
/**
+ * Set port polarity. This is cached by the PD stack and
+ * some TCPCI events may need to alter this cached value.
+ *
+ * @param port USB-C port number
+ * @param polarity current polarity
+ */
+void pd_set_polarity(int port, enum tcpc_cc_polarity polarity);
+
+/**
* Get port partner data swap capable status
*
* @param port USB-C port number