diff options
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r-- | include/usb_pd_tcpm.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h index 527388d73e..4589fc4839 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -319,29 +319,32 @@ struct tcpm_drv { void (*tcpc_enable_auto_discharge_disconnect)(int port, int enable); -#ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE /** - * Enable TCPC auto DRP toggling. + * Set new connection + * There is a new connection. May have to handle differently + * if we were performing auto-toggle. Allow a driver to do + * any work required to leave the unattached auto-toggle mode + * as well as setting the CC lines. If auto-toggle is not + * being used or was not the cause of the new connection + * detection then set both CC lines to the passed pull. * * @param port Type-C port number + * @param pull enum tcpc_cc_pull of CC lines * * @return EC_SUCCESS or error */ - int (*drp_toggle)(int port); + int (*set_new_connection)(int port, + enum tcpc_cc_pull pull); +#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 + * Enable TCPC auto DRP toggling. * * @param port Type-C port number - * @param cc1 enum tcpc_cc_pull of CC1 - * @param cc2 enum tcpc_cc_pull of CC2 + * + * @return EC_SUCCESS or error */ - void (*drp_toggle_connection)(int port, - enum tcpc_cc_voltage_status cc1, - enum tcpc_cc_voltage_status cc2); + int (*drp_toggle)(int port); #endif /** |