diff options
-rw-r--r-- | common/usb_common.c | 9 | ||||
-rw-r--r-- | include/usb_pd.h | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/common/usb_common.c b/common/usb_common.c index 8299b6829b..a64999aad9 100644 --- a/common/usb_common.c +++ b/common/usb_common.c @@ -760,7 +760,14 @@ void pd_deferred_resume(int port) } #endif /* CONFIG_USB_PD_TCPM_TCPCI */ -bool pd_check_vbus_level(int port, enum vbus_level level) + +/* + * Check the specified Vbus level + * + * Note that boards may override this function if they have a method outside the + * TCPCI driver to verify vSafe0V. + */ +__overridable bool pd_check_vbus_level(int port, enum vbus_level level) { if (IS_ENABLED(CONFIG_USB_PD_VBUS_DETECT_TCPC)) return tcpm_check_vbus_level(port, level); diff --git a/include/usb_pd.h b/include/usb_pd.h index e013779106..61096c1180 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -2679,10 +2679,13 @@ bool pd_is_disconnected(int port); /** * Return true if vbus is at level on the specified port. * + * Note that boards may override this function if they have a method outside the + * TCPCI driver to verify vSafe0V + * * @param port USB-C port number * @param level vbus_level to check against */ -bool pd_check_vbus_level(int port, enum vbus_level level); +__override_proto bool pd_check_vbus_level(int port, enum vbus_level level); /** * Return true if vbus is at Safe5V on the specified port. |