summaryrefslogtreecommitdiff
path: root/include/usb_pd_tcpm.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_tcpm.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_tcpm.h')
-rw-r--r--include/usb_pd_tcpm.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 97b0ec0864..20d812d37b 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -327,6 +327,20 @@ struct tcpm_drv {
#ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE
/**
+ * Auto Toggle Connection
+ * There is a connection while performing auto-toggle.
+ * Allow a driver to do any work required to leave the
+ * unattached auto-toggle mode
+ *
+ * @param port Type-C port number
+ * @param cc1 enum tcpc_cc_pull of CC1
+ * @param cc2 enum tcpc_cc_pull of CC2
+ */
+ void (*tcpc_auto_toggle_connection)(int port,
+ enum tcpc_cc_voltage_status cc1,
+ enum tcpc_cc_voltage_status cc2);
+
+ /**
* Enable TCPC auto DRP toggling.
*
* @param port Type-C port number