diff options
author | Diana Z <dzigterman@chromium.org> | 2022-04-27 13:23:38 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-03 18:44:52 +0000 |
commit | ece478cb27ee28931dc067d0700fe178eeeef323 (patch) | |
tree | aff8642c33c130f7af754e86692eb1ab6f0629a1 /common/usbc | |
parent | 3c16a8f60c6cdf098f615d36316905dfffce8148 (diff) | |
download | chrome-ec-ece478cb27ee28931dc067d0700fe178eeeef323.tar.gz |
TCPMv2: Define an ErrorRecovery request interface for CTVPDs
The PE or PRL may have reason to request that the TC begin error
recovery. Define an interface for them to use, just like the one for
the DRP state machine.
BRANCH=None
BUG=b:155418161
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I466c9f1db80b2c8bd9d32a04a8021771042cd693
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612210
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'common/usbc')
-rw-r--r-- | common/usbc/usb_tc_ctvpd_sm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/usbc/usb_tc_ctvpd_sm.c b/common/usbc/usb_tc_ctvpd_sm.c index a2babe754a..4a0c421a48 100644 --- a/common/usbc/usb_tc_ctvpd_sm.c +++ b/common/usbc/usb_tc_ctvpd_sm.c @@ -170,6 +170,17 @@ void tc_reset_support_timer(int port) tc[port].support_timer_reset |= SUPPORT_TIMER_RESET_REQUEST; } +void tc_start_error_recovery(int port) +{ + assert(port == TASK_ID_TO_PD_PORT(task_get_current())); + + /* + * The port should transition to the ErrorRecovery state + * from any other state when directed. + */ + set_state_tc(port, TC_ERROR_RECOVERY); +} + /* * TCPC CC/Rp management * |