diff options
author | Sam Hurst <shurst@google.com> | 2019-08-01 09:09:10 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-10 09:24:36 +0000 |
commit | c32c1ae24c398679edae807f9c1620eb91377003 (patch) | |
tree | f284f214e47729345cdd2d9c25add31a7449e7a0 /common/usbc/usb_pe_ctvpd_sm.c | |
parent | 16ce272e65cae34ad1b0ad3e8a301e6e307ed49c (diff) | |
download | chrome-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 'common/usbc/usb_pe_ctvpd_sm.c')
-rw-r--r-- | common/usbc/usb_pe_ctvpd_sm.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/common/usbc/usb_pe_ctvpd_sm.c b/common/usbc/usb_pe_ctvpd_sm.c index f7db231907..355724ddcc 100644 --- a/common/usbc/usb_pe_ctvpd_sm.c +++ b/common/usbc/usb_pe_ctvpd_sm.c @@ -75,35 +75,42 @@ void pe_run(int port, int evt, int en) } } -void pe_pass_up_message(int port) +void pe_message_received(int port) { pe[port].flags |= PE_FLAGS_MSG_RECEIVED; task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_SM, 0); } +/** + * NOTE: + * The Charge-Through Vconn Powered Device's Policy Engine is very + * simple and no implementation is needed for the following functions + * that might be called by the Protocol Layer. + */ + void pe_hard_reset_sent(int port) { - /* Do nothing */ + /* No implementation needed by this policy engine */ } void pe_got_hard_reset(int port) { - /* Do nothing */ + /* No implementation needed by this policy engine */ } void pe_report_error(int port, enum pe_error e) { - /* Do nothing */ + /* No implementation needed by this policy engine */ } void pe_got_soft_reset(int port) { - /* Do nothing */ + /* No implementation needed by this policy engine */ } void pe_message_sent(int port) { - /* Do nothing */ + /* No implementation needed by this policy engine */ } static void pe_request_run(const int port) |