summaryrefslogtreecommitdiff
path: root/include/charger.h
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2018-02-06 18:31:43 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-05 00:21:22 -0800
commit9896e428f72670562f73713456d5966ad3f2d491 (patch)
treed8a3439a1448a10d2a7a3d26ef0811a24f07f153 /include/charger.h
parent29c2aa329489eca44490a6445ef591d6c661b74e (diff)
downloadchrome-ec-9896e428f72670562f73713456d5966ad3f2d491.tar.gz
Introduce CONFIG_USB_PD_5V_CHARGER_CTRL
Add a new config for the boards using charger (e.g. rt946x) to report if VBUS source is enabled instead of using GPIO. BUG=b:65446459 BRANCH=none TEST=Charge Scarlet rev3 with SDP and DCP. Change-Id: Id0a07945f0f888b6a36c422c596b56c5aa5065c0 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/905400 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'include/charger.h')
-rw-r--r--include/charger.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/charger.h b/include/charger.h
index c66faa0a97..2ae41e36d3 100644
--- a/include/charger.h
+++ b/include/charger.h
@@ -87,6 +87,14 @@ int charger_enable_otg_power(int enabled);
int charger_set_otg_current_voltage(int output_current, int output_voltage);
/**
+ * Is the charger sourcing VBUS / OTG power?
+ *
+ * @param port The Type-C port number.
+ * @return 1 if sourcing VBUS, 0 if not.
+ */
+int charger_is_sourcing_otg_power(int port);
+
+/**
* Return the closest match the charger can supply to the requested current.
*
* @param current Requested current in mA.