diff options
author | Caveh Jalali <caveh@chromium.org> | 2022-02-02 13:42:35 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-03 08:22:57 +0000 |
commit | 310aed73f454491a71f6d471d34455aa38854fa1 (patch) | |
tree | 506d987b563c32ef80b1e311c12d423f65b9b8db | |
parent | 7c1b7d5b1a3df6881fdef524be31fd223c593cc4 (diff) | |
download | chrome-ec-310aed73f454491a71f6d471d34455aa38854fa1.tar.gz |
tcpm: try TCPC FRS control even when PPC does not implement FRS
This applies to boards that have a mix of ports where FRS is controlled
by the PPC or TCPC. For ports where FRS is controlled by the TCPC, it is
likely that the associated PPC is not configured to control FRS through
software, so associted calls return EC_ERROR_UNIMPLEMENTED. We need to
treat this case like a success case when deciding whether to continue
to control FRS via the TCPC.
BRANCH=none
BUG=b:216411401
TEST=buildall passes
Change-Id: I17cf0a8d35f1282b9891da977823c18992d9db1e
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3432915
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | common/usb_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/usb_common.c b/common/usb_common.c index 930b723311..513dd4639c 100644 --- a/common/usb_common.c +++ b/common/usb_common.c @@ -913,7 +913,8 @@ int pd_set_frs_enable(int port, int enable) if (IS_ENABLED(CONFIG_USB_PD_FRS_PPC)) rv = ppc_set_frs_enable(port, enable); - if (rv == EC_SUCCESS && tcpm_tcpc_has_frs_control(port)) + if ((rv == EC_SUCCESS || rv == EC_ERROR_UNIMPLEMENTED) && + tcpm_tcpc_has_frs_control(port)) rv = tcpm_set_frs_enable(port, enable); if (rv == EC_SUCCESS) rv = board_pd_set_frs_enable(port, enable); |