diff options
Diffstat (limited to 'driver')
-rw-r--r-- | driver/tcpm/anx74xx.c | 18 | ||||
-rw-r--r-- | driver/tcpm/tcpm.h | 5 |
2 files changed, 5 insertions, 18 deletions
diff --git a/driver/tcpm/anx74xx.c b/driver/tcpm/anx74xx.c index 08525a0d08..0501788080 100644 --- a/driver/tcpm/anx74xx.c +++ b/driver/tcpm/anx74xx.c @@ -548,21 +548,6 @@ static int anx74xx_tcpm_set_cc(int port, int pull) return rv; } -#ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE -static int anx74xx_tcpc_drp_toggle(int port) -{ - int rv; - - /* Disable CC software Control */ - rv = anx74xx_cc_software_ctrl(port, 0); - -#ifdef CONFIG_USB_PD_TCPC_LOW_POWER - anx74xx_set_power_mode(port, ANX74XX_STANDBY_MODE); -#endif - return rv; -} -#endif - static int anx74xx_tcpm_set_polarity(int port, int polarity) { int reg, mux_state, rv = EC_SUCCESS; @@ -924,9 +909,6 @@ const struct tcpm_drv anx74xx_tcpm_drv = { #ifdef CONFIG_USB_PD_DISCHARGE_TCPC .tcpc_discharge_vbus = &anx74xx_tcpc_discharge_vbus, #endif -#ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE - .drp_toggle = &anx74xx_tcpc_drp_toggle, -#endif }; #ifdef CONFIG_CMD_I2C_STRESS_TEST_TCPC 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); |