diff options
author | Eric Herrmann <eherrmann@chromium.org> | 2020-07-07 13:11:07 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-17 02:22:06 +0000 |
commit | c30291b716c54d94ef648e22df2c107ebfcb6139 (patch) | |
tree | fcbdb53636d3c848d1c0e5b736ee8e882846e9cd /common/usb_common.c | |
parent | c1284dc1da4aa6865d4375a67abf6b2f8d3d2219 (diff) | |
download | chrome-ec-c30291b716c54d94ef648e22df2c107ebfcb6139.tar.gz |
USB PD: Move board FRS configuration out of TCPCI
Board FRS configuration is more board-specific than TCPC-specific. Move
the board FRS configuration from TCPCI to usb_common.
Implementing the board-level frs configuration is optional for each
project.
BUG=b:148144711
TEST=Can build volteer image with CONFIG_USB_PD_TCPC set
BRANCH=none
Change-Id: I43d13ec0b23f71273807f58db35e7dd333089efa
Signed-off-by: Eric Herrmann <eherrmann@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2290838
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/usb_common.c')
-rw-r--r-- | common/usb_common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/usb_common.c b/common/usb_common.c index c592deaafa..ea884193f8 100644 --- a/common/usb_common.c +++ b/common/usb_common.c @@ -738,6 +738,11 @@ int pd_is_vbus_present(int port) } #ifdef CONFIG_USB_PD_FRS +__overridable int board_pd_set_frs_enable(int port, int enable) +{ + return EC_SUCCESS; +} + int pd_set_frs_enable(int port, int enable) { int rv = EC_SUCCESS; @@ -746,6 +751,8 @@ int pd_set_frs_enable(int port, int enable) rv = ppc_set_frs_enable(port, enable); if (rv == EC_SUCCESS && IS_ENABLED(CONFIG_USB_PD_FRS_TCPC)) rv = tcpm_set_frs_enable(port, enable); + if (rv == EC_SUCCESS) + rv = board_pd_set_frs_enable(port, enable); return rv; } #endif /* defined(CONFIG_USB_PD_FRS) */ |