summaryrefslogtreecommitdiff
path: root/include/usb_pd_tcpm.h
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2019-12-03 10:36:05 +0800
committerCommit Bot <commit-bot@chromium.org>2019-12-09 10:17:14 +0000
commit4fcabe7ac114ca097893746f3154b90e91e7c31f (patch)
treed76c87e09106a5bfe3c4168538dd83ee70ba5cee /include/usb_pd_tcpm.h
parent7ab6523fe5a8badb379e93fe9bb07c85df40eac6 (diff)
downloadchrome-ec-4fcabe7ac114ca097893746f3154b90e91e7c31f.tar.gz
fusb302: implement vbus measurement using tcpc
Jacuzzi measure vbus using fusb302, add a config option CONFIG_USB_PD_VBUS_MEASURE_TCPC and related implementation. BUG=b:145376409 TEST=`ectool usbpdpower` BRANCH=none Change-Id: I84019a75338121f777a344a4b92710e2117a6bda Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1947507 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r--include/usb_pd_tcpm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 7a7bd0b3a1..cfd7692852 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -435,4 +435,13 @@ int board_tcpc_post_init(int port) __attribute__((weak));
*/
void board_pd_vconn_ctrl(int port, enum usbpd_cc_pin cc_pin, int enabled);
+/**
+ * Get the VBUS voltage from TCPC
+ *
+ * @param port Type-C port number
+ *
+ * @return VBUS voltage in mV.
+ */
+int tcpc_get_vbus_voltage(int port);
+
#endif /* __CROS_EC_USB_PD_TCPM_H */