diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2023-02-23 15:04:48 -0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-17 18:19:39 +0000 |
commit | 74108a6ab365a110d70b4064ec2d99fa7ea9b73e (patch) | |
tree | 6195364b58322e9241c2868d09e5f4f98e2dc936 /include | |
parent | 230aa1bc412c8c40137d8980873be9eedc986d74 (diff) | |
download | chrome-ec-74108a6ab365a110d70b4064ec2d99fa7ea9b73e.tar.gz |
USB-PD: Make sink automatically enter EPR mode
Currently, EPR mode is entered only by 'pd' console command.
This CL makes sink ports enter EPR mode automatically.
PE_FLAGS_EPR_EXPLICIT_EXIT is cleared when soft reset is sent, a source
is disconnected, or EPR is entered again.
BUG=b:257320026,b:274929940
BRANCH=None
TEST=On Agah, plug AC, observe automatic entry to EPR. Then type 'pd 1
epr exit' and observe EPR mode is not re-entered. Then replug AC and
observe the port enters EPR automatically.
TEST=make run-usb_pd_console
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: Ie2b94323ba404d44ee70756e1893c065c34911fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4421425
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pe_sm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/usb_pe_sm.h b/include/usb_pe_sm.h index 9672c6b26b..21cc65d43d 100644 --- a/include/usb_pe_sm.h +++ b/include/usb_pe_sm.h @@ -210,6 +210,13 @@ void pe_clear_port_data(int port); bool pe_snk_in_epr_mode(int port); /** + * Make a sink exit EPR mode explicitly. + * + * @param port USB-C port number + */ +void pe_snk_epr_explicit_exit(int port); + +/** * Checks whether the port is ready for EPR entry. * * @param port USB-C port number |