summaryrefslogtreecommitdiff
path: root/include/usb_charge.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-28 15:08:38 +1300
committerCommit Bot <commit-bot@chromium.org>2021-03-31 05:20:11 +0000
commitac49fac880808e7c2e27adb55a6adb0c2b72c8ca (patch)
tree05ce3e9b21de04d8b5d7b1e18bf4142dda4f5663 /include/usb_charge.h
parent3dc67ced44871bbfbfaa57adfde070fa18fce348 (diff)
downloadchrome-ec-ac49fac880808e7c2e27adb55a6adb0c2b72c8ca.tar.gz
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 <sjg@chromium.org> Change-Id: Ia324327a69b117483ab9ee5c85eba93c0fb5ad9c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789799 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'include/usb_charge.h')
-rw-r--r--include/usb_charge.h10
1 files changed, 10 insertions, 0 deletions
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 */