summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-07-13 16:52:11 -0600
committerCommit Bot <commit-bot@chromium.org>2021-07-27 16:19:04 +0000
commit7d827bd265bce19064198ea5866b5db16f3307d6 (patch)
tree9c3d946973adfc6cb8fcc1728191ef9564f2ea2a /include
parent26a7501ac9ad05c920ec37f3cb55212f55fa0a9d (diff)
downloadchrome-ec-7d827bd265bce19064198ea5866b5db16f3307d6.tar.gz
TCPMv2: Allow tests to clear PE data between runs
The PE stores internal state (ex. capabilities, identity responses) which should be cleared out between unit test runs. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I77b3faefd3f887a68ca9593a7398ae9c3ffb2f17 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3025864 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb_pe_sm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/usb_pe_sm.h b/include/usb_pe_sm.h
index b3ba56d95d..3da1e9fae6 100644
--- a/include/usb_pe_sm.h
+++ b/include/usb_pe_sm.h
@@ -176,5 +176,14 @@ const char *pe_get_current_state(int port);
*/
uint32_t pe_get_flags(int port);
+#ifdef TEST_BUILD
+/**
+ * Clears all internal port data, as we would on a detach event
+ *
+ * @param port USB-C port number
+ */
+void pe_clear_port_data(int port);
+#endif /* TEST_BUILD */
+
#endif /* __CROS_EC_USB_PE_H */