From ac49fac880808e7c2e27adb55a6adb0c2b72c8ca Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 28 Mar 2021 15:08:38 +1300 Subject: Add a common header for board_is_sourcing_vbus() This function prototype is defined in lots of files, none of which is visible to Zephyr. Add a prototype in one place and remove the others. BUG=b:183296099 BRANCH=none TEST=make buildall Signed-off-by: Simon Glass Change-Id: Ia324327a69b117483ab9ee5c85eba93c0fb5ad9c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789799 Reviewed-by: Jack Rosenthal --- include/usb_charge.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/usb_charge.h') diff --git a/include/usb_charge.h b/include/usb_charge.h index 7a102dac4c..8217b0f52c 100644 --- a/include/usb_charge.h +++ b/include/usb_charge.h @@ -183,4 +183,14 @@ static inline int usb_charger_ramp_max(int port, int supplier, int sup_curr) */ void usb_charger_reset_charge(int port); +/** + * Check if a particular port is sourcing VBUS + * + * This function is typically defined in the board file + * + * @param port port number + * @return 0 if not source, non-zero if sourcing + */ +int board_is_sourcing_vbus(int port); + #endif /* __CROS_EC_USB_CHARGE_H */ -- cgit v1.2.1