summaryrefslogtreecommitdiff
path: root/include/usb_prl_sm.h
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2019-08-01 09:09:10 -0700
committerCommit Bot <commit-bot@chromium.org>2019-09-10 09:24:36 +0000
commitc32c1ae24c398679edae807f9c1620eb91377003 (patch)
treef284f214e47729345cdd2d9c25add31a7449e7a0 /include/usb_prl_sm.h
parent16ce272e65cae34ad1b0ad3e8a301e6e307ed49c (diff)
downloadchrome-ec-c32c1ae24c398679edae807f9c1620eb91377003.tar.gz
pd: USB Power Delivery State Machine based on Revision 3.0 of the spec.
Adds Power Delivery to the TypeC state machine as detailed in Revision 3.0, Version 1.2 of the specification. This CL passes the PD2.0 compliance tests and has been tested on several devices. Some areas such as handling Electronically Marked Cable information, creation of PIDs, and Host commands will be addressed in later CLs. BUG=b:130895206 BRANCH=none TEST=manual Port 0 on Hatch was used to run this CL, merged with PD functionality, on the PD2.0 Compliance tester. All tests pass except for a few physical layer tests. The test report has been added to the bug. Atlas was verified to work with Apple, Amazon, StarTech, MKDGO and several other generic docks. Atlas was verified to work with Google's and Apple's CTVPD. Signed-off-by: Sam Hurst <shurst@chromium.org> Change-Id: Ia5e1988b0d81ec4cf9a7175e273197bd5a0865e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1737899 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/usb_prl_sm.h')
-rw-r--r--include/usb_prl_sm.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/usb_prl_sm.h b/include/usb_prl_sm.h
index 4116bbe1a3..32b3ba8d06 100644
--- a/include/usb_prl_sm.h
+++ b/include/usb_prl_sm.h
@@ -18,6 +18,21 @@
#define N_RETRY_COUNT 2
/**
+ * Returns true if Protocol Layer State Machine is in run mode
+ *
+ * @param port USB-C port number
+ * @return 1 if state machine is running, else 0
+ */
+int prl_is_running(int port);
+
+/**
+ * Resets the Protocol Layer State Machine
+ *
+ * @param port USB-C port number
+ */
+void prl_reset(int port);
+
+/**
* Runs the Protocol Layer State Machine
*
* @param port USB-C port number