summaryrefslogtreecommitdiff
path: root/include/charge_manager.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-03-08 15:02:17 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-03-09 20:05:13 -0800
commitef4e70174ac2797f0c02753685b35d038a317a6a (patch)
tree9edd3ebb8ae1da806a874835c11e13a119b31de1 /include/charge_manager.h
parentb593d1c05b150fdad68c474ef0e521d5d9c3acea (diff)
downloadchrome-ec-ef4e70174ac2797f0c02753685b35d038a317a6a.tar.gz
usbc: add config support for multiple (and no) vbus adc channels
yorp measures each port's vbus separately on a deticated ADC. Also, add config to take care of ADV_VBUS -1 case too. BRANCH=none BUG=b:74127309 TEST=none Change-Id: I6f4df96caffc3b527b69e67358631dd448172cde Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/956555 Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'include/charge_manager.h')
-rw-r--r--include/charge_manager.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/charge_manager.h b/include/charge_manager.h
index 1e988203e8..e314b4cd3d 100644
--- a/include/charge_manager.h
+++ b/include/charge_manager.h
@@ -227,4 +227,14 @@ void board_set_charge_limit(int port, int supplier, int charge_ma,
*/
int board_vbus_source_enabled(int port);
+#ifdef CONFIG_USB_PD_VBUS_MEASURE_ADC_EACH_PORT
+/**
+ * Gets the adc_channel for the specified port.
+ *
+ * @param port PD port.
+ * @return adc_channel that measures the Vbus voltage.
+ */
+enum adc_channel board_get_vbus_adc(int port);
+#endif /* CONFIG_USB_PD_VBUS_MEASURE_ADC_EACH_PORT */
+
#endif /* __CROS_EC_CHARGE_MANAGER_H */