summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-11-12 22:38:34 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-20 18:43:53 +0000
commitc98936e40a87add7fe5a543e3851958b204149e1 (patch)
treef9b93cefc31f3e251dcdfc8c5c0957c808e25326 /include/usb_pd.h
parent6d1599b4a05de382b20f13e4677b534672678747 (diff)
downloadchrome-ec-c98936e40a87add7fe5a543e3851958b204149e1.tar.gz
TCPMv2: Store and report sink caps
Copy sink caps for later reference, and report them up to the AP in the TYPEC_STATUS host command return. This also moves the location of the DPM set for sink caps, to be symmetrical between source and sink inits. Set the old unit tests to clear all DPM requests. New PE tests will correctly handle our startup sequence, but the old tests may have erratic behavior based on how many states run before the connection is forced over to READY. BRANCH=None BUG=b:160009733,b:168862110 TEST=on drawcia, verify sink capabilities match those from PD traces with several docks and dongles Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iadc6ef4c7364d7c709878a75fd5e707a965f77f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2540390 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 640cbba7ed..6a8e084ff3 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -2759,6 +2759,20 @@ uint8_t pd_get_src_cap_cnt(int port);
void pd_set_src_caps(int port, int cnt, uint32_t *src_caps);
/**
+ * Returns the sink caps list
+ *
+ * @param port USB-C port number
+ */
+const uint32_t * const pd_get_snk_caps(int port);
+
+/**
+ * Returns the number of sink caps
+ *
+ * @param port USB-C port number
+ */
+uint8_t pd_get_snk_cap_cnt(int port);
+
+/**
* Return true if partner port is capable of communication over USB data
* lines.
*