summaryrefslogtreecommitdiff
path: root/include/driver/tcpm/tcpm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/driver/tcpm/tcpm.h')
-rw-r--r--include/driver/tcpm/tcpm.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/driver/tcpm/tcpm.h b/include/driver/tcpm/tcpm.h
index c0a08df300..ef47a3b1e2 100644
--- a/include/driver/tcpm/tcpm.h
+++ b/include/driver/tcpm/tcpm.h
@@ -278,7 +278,6 @@ static inline int tcpm_transmit(int port, enum tcpci_msg_type type,
return tcpc_config[port].drv->transmit(port, type, header, data);
}
-#ifdef CONFIG_USB_PD_PPC
static inline bool tcpm_get_snk_ctrl(int port)
{
return tcpc_config[port].drv->get_snk_ctrl ?
@@ -305,7 +304,6 @@ static inline int tcpm_set_src_ctrl(int port, int enable)
else
return EC_ERROR_UNIMPLEMENTED;
}
-#endif
static inline void tcpc_alert(int port)
{
@@ -434,6 +432,23 @@ static inline int tcpm_set_frs_enable(int port, int enable)
}
#endif /* defined(CONFIG_USB_PD_FRS) */
+#ifdef CONFIG_USB_PD_TCPM_SBU
+/**
+ * Turn on/off the SBU FETs
+ *
+ * @param port Type-C port number
+ * @param enable true:enable, false:disable
+ *
+ * @return EC_SUCCESS or error
+ */
+static inline int tcpc_set_sbu(int port, bool enable)
+{
+ return tcpc_config[port].drv->set_sbu ?
+ tcpc_config[port].drv->set_sbu(port, enable) :
+ EC_SUCCESS;
+}
+#endif /* CONFIG_USB_PD_TCPM_SBU */
+
#else /* CONFIG_USB_PD_TCPC */
/**
@@ -566,7 +581,6 @@ int tcpm_transmit(int port, enum tcpci_msg_type type, uint16_t header,
* @param port Type-C port number
*/
void tcpc_alert(int port);
-
#endif /* CONFIG_USB_PD_TCPC */
/**