From 5b7cfac64e971a7e925d17a8b33e651a01e71707 Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Tue, 9 Jun 2015 14:29:09 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/276511 Reviewed-by: Alec Berg --- include/usb_charge.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/usb_charge.h') 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 */ -- cgit v1.2.1