summaryrefslogtreecommitdiff
path: root/include/usb_charge.h
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-06-09 14:29:09 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-12 16:37:39 +0000
commit5b7cfac64e971a7e925d17a8b33e651a01e71707 (patch)
tree72ee34fae7f6bee5d2c8d781e5256fbceee3f8e1 /include/usb_charge.h
parent9941f088d7a56ba4ba7396d9221612b00143a3cc (diff)
downloadchrome-ec-5b7cfac64e971a7e925d17a8b33e651a01e71707.tar.gz
usb: pi3usb9281: Allow flexible chip configurations
Previously we supported using a single pi3usb9281 chip, or using two chips on the same i2c bus behind a mux. Now that we need to support a third configuration of multiple chips on different busses, it makes sense to be able to configure the configuration freely at the board level. BUG=chrome-os-partner:40920 TEST=Manual on samus_pd. Plug USB charger, verify detection is correct on both charge ports. BRANCH=None Change-Id: I120dcb1c3ceb6f013b92407effcd8cb66e7ffcce Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/276511 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/usb_charge.h')
-rw-r--r--include/usb_charge.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_charge.h b/include/usb_charge.h
index e67aba482e..f95e69e91d 100644
--- a/include/usb_charge.h
+++ b/include/usb_charge.h
@@ -42,4 +42,12 @@ int usb_charge_set_mode(int usb_port_id, enum usb_charge_mode mode);
*/
int usb_charge_ports_enabled(void);
+/**
+ * Returns true if the passed port is a power source.
+ *
+ * @param port Port number.
+ * @return True if port is sourcing vbus.
+ */
+int usb_charger_port_is_sourcing_vbus(int port);
+
#endif /* __CROS_EC_USB_CHARGE_H */