summaryrefslogtreecommitdiff
path: root/include/usb_pd_dpm.h
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-02-01 14:54:38 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-08 19:20:15 +0000
commit98bad5c43361a26cb8ea2a9b46b1291b911a0ef5 (patch)
tree9ed4cabcdc3b59f3aff246a1eb35d5748e931f1d /include/usb_pd_dpm.h
parentcdaeab64862d0f6c6915e078ae5721f359760efe (diff)
downloadchrome-ec-98bad5c43361a26cb8ea2a9b46b1291b911a0ef5.tar.gz
TCPMv2: Report correct source-out current in host command
The EC_CMD_USB_PD_POWER_INFO host command was still querying the older charge_manager source current tracking. Instead, when TCPMv2 is defined the DPM should be treated as the authority for source-out current. BRANCH=None BUG=b:177714628 TEST=on drawcia, connect hub requiring 3A and confirm that value is reported from "ectool usbpdpower" Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I65f4fb976f0ab90f4d20f6573c1002ed80ff9532 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676081 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/usb_pd_dpm.h')
-rw-r--r--include/usb_pd_dpm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_pd_dpm.h b/include/usb_pd_dpm.h
index d897c8ce84..d0e49a7383 100644
--- a/include/usb_pd_dpm.h
+++ b/include/usb_pd_dpm.h
@@ -84,4 +84,12 @@ void dpm_remove_sink(int port);
*/
int dpm_get_source_pdo(const uint32_t **src_pdo, const int port);
+/*
+ * Report offered source current for this port
+ *
+ * @param port USB-C port number
+ * @return Current offered, in mA
+ */
+int dpm_get_source_current(const int port);
+
#endif /* __CROS_EC_USB_DPM_H */