summaryrefslogtreecommitdiff
path: root/include/usb_pe_sm.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-06-05 17:00:34 -0600
committerJett Rink <jettrink@chromium.org>2020-06-10 20:56:29 +0000
commit99c3604670a6db488a126ef35076e810c859ef42 (patch)
tree4f160643f6b42380807fa0570050c815a7462bc3 /include/usb_pe_sm.h
parent454fda0f0c1eea8884a82f1f251e0c8cf72f65df (diff)
downloadchrome-ec-99c3604670a6db488a126ef35076e810c859ef42.tar.gz
tcpmv2: retool start/end AMS
- Drop start and end ams function in favor of a flag based approach - Don't clear RX queue on TX reset. We are supposed to drop any pending TX messages (not RX messages). This should also help us to process partner messages if we get a collision - Drop prl_tx_phy_layer_reset_run and call next state directly in entry - Dropping retry_counter reset to 0 since that happens in entry method - Dropping flags reset to 0 because it is most likely dropping more flags than we want. BRANCH=none BUG=b:158248741,b:157228506,b:157661566 TEST=DUT accepts soft resets Change-Id: Ice8721a6c81452584f8d4ec474cb4f4a487b713b Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2233794 Tested-by: Diana Z <dzigterman@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/usb_pe_sm.h')
-rw-r--r--include/usb_pe_sm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/usb_pe_sm.h b/include/usb_pe_sm.h
index 90069f6cf6..e69eff572f 100644
--- a/include/usb_pe_sm.h
+++ b/include/usb_pe_sm.h
@@ -178,5 +178,16 @@ void pe_set_sysjump(void);
* @param port USB-C port number
*/
void pe_invalidate_explicit_contract(int port);
+
+/*
+ * Return true if the PE is is within an atomic
+ * messaging sequence that it initiated with a SOP* port partner.
+ *
+ * Note the PRL layer polls this instead of using AMS_START and AMS_END
+ * notification from the PE that is called out by the spec
+ *
+ * @param port USB-C port number
+ */
+bool pe_in_local_ams(int port);
#endif /* __CROS_EC_USB_PE_H */