summaryrefslogtreecommitdiff
path: root/include/usb_sm.h
diff options
context:
space:
mode:
authorAbe Levkoy <alevkoy@chromium.org>2020-07-01 15:28:22 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-07 03:58:04 +0000
commit47a4f56d643be2fdafc2fef171995faa3dbd5105 (patch)
treeb674af97ef43d8495889a14d219cbef4cf8ecd9e /include/usb_sm.h
parent59d4241400c6b7ed6e0a7e610cee74312e98b0e8 (diff)
downloadchrome-ec-47a4f56d643be2fdafc2fef171995faa3dbd5105.tar.gz
TCPMv2: Correct state control flow description
Child run functions execute before parent fun functions, not after. Make additional minor corrections and clarifications. BUG=none TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ic1b345e42269c9086f77bb6d9fe54d3f91b1002e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277210 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/usb_sm.h')
-rw-r--r--include/usb_sm.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/usb_sm.h b/include/usb_sm.h
index e4a08c38bf..5d89b4e890 100644
--- a/include/usb_sm.h
+++ b/include/usb_sm.h
@@ -18,9 +18,13 @@ typedef void (*state_execution)(const int port);
* run - Optional method that will be run repeatedly during state machine loop
* exit - Optional method that will be run when this state exists
* parent- Optional parent usb_state that contains common entry/run/exit
- * implementation between various usb state. All parent entry/run
- * functions will before any child entry/run functions. All parent exit
- * functions will run after any child exit functions.
+ * implementation among various child usb_states.
+ * entry: Parent function executes BEFORE child function.
+ * run: Parent function executes AFTER child function.
+ * exit: Parent function executes AFTER child function.
+ *
+ * Note: When transitioning between two child states with a shared parent,
+ * that parent's exit and entry functions do not execute.
*/
struct usb_state {
const state_execution entry;