summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpm.h
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-12-14 15:08:51 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-12-20 21:56:45 -0800
commitd00a15a78d1fa82c81798081d960fd0bcd5eca33 (patch)
tree11aeffc6d0855d1a2f313037cc944ddd3981fd3f /driver/tcpm/tcpm.h
parent9cc53cb892ca53f600235241b3f0ddcdeea09da6 (diff)
downloadchrome-ec-d00a15a78d1fa82c81798081d960fd0bcd5eca33.tar.gz
tcpm: anx74xx: Remove auto-toggle support
Auto-role toggle on the anx74xx does not function correctly with e-marked cables and cannot be used. Also check for TCPC support for auto-toggle at runtime, to allow auto-toggle supported TCPC to be used alongside an unsupported part. (from CL:420405) BUG=chrome-os-partner:60890 BRANCH=reef TEST=Manual on reef, boot to S0: `pd 0 state`: Toggling between SRC_DISCONNECTED / SNK_DISCONNECTED `pd 1 state`: DRP_AUTO_TOGGLE Also verify port 0 can become sink + source correctly in S0. Change-Id: Iafdedf31773feef23923cefe1f4fb02fcffda120 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/420866 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpm.h')
-rw-r--r--driver/tcpm/tcpm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/driver/tcpm/tcpm.h b/driver/tcpm/tcpm.h
index 57950dc34d..1c7c6edff3 100644
--- a/driver/tcpm/tcpm.h
+++ b/driver/tcpm/tcpm.h
@@ -137,6 +137,11 @@ static inline void tcpc_discharge_vbus(int port, int enable)
}
#ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE
+static inline int tcpm_auto_toggle_supported(int port)
+{
+ return !!tcpc_config[port].drv->drp_toggle;
+}
+
static inline int tcpm_set_drp_toggle(int port)
{
return tcpc_config[port].drv->drp_toggle(port);