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:12 +0000
commitc8f5bcc1ba0100ab7242898e5982b849b910ae90 (patch)
treed09fe3209b47e48806de35ff27d00a929099efa0 /include/usb_charge.h
parentac49fac880808e7c2e27adb55a6adb0c2b72c8ca (diff)
downloadchrome-ec-c8f5bcc1ba0100ab7242898e5982b849b910ae90.tar.gz
Add a common header for board_vbus_sink_enable()
This function prototype is defined in quite a few 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: I2f3f1e08614408e7b8f6bb0633a478765c73beaa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789800 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'include/usb_charge.h')
-rw-r--r--include/usb_charge.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/usb_charge.h b/include/usb_charge.h
index 8217b0f52c..0dc009721e 100644
--- a/include/usb_charge.h
+++ b/include/usb_charge.h
@@ -193,4 +193,15 @@ void usb_charger_reset_charge(int port);
*/
int board_is_sourcing_vbus(int port);
+/**
+ * Enable VBUS sink for a given port
+ *
+ * This function is typically defined in the board file
+ *
+ * @param port port number
+ * @param enable 0 to disable, 1 to enable
+ * @return EC_SUCCESS if OK, EC_ERROR_INVAL if @port is invalid
+ */
+int board_vbus_sink_enable(int port, int enable);
+
#endif /* __CROS_EC_USB_CHARGE_H */