diff options
author | Tomasz Michalec <tm@semihalf.com> | 2022-07-20 13:36:26 +0200 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-13 11:16:24 +0000 |
commit | 90c512e25b5ffc8b3c04eb52d3242b29ea13f86c (patch) | |
tree | 0e4773bd1b46de8dc9135704552f89536fcffa41 | |
parent | ad5ca0f80f924ee0f24079ad632e61cd30b03717 (diff) | |
download | chrome-ec-90c512e25b5ffc8b3c04eb52d3242b29ea13f86c.tar.gz |
goroh: usb_mux: Split struct usb_mux in goroh board
Update goroh board to use new struct usb_mux_chain.
BUG=b:236274003
TEST=make buildall
BRANCH=None
Cq-Depend: chromium:3748785
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I978b1174f8ab2f3274c242c460243c5d97067496
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780408
Tested-by: Tomasz Michalec <tmichalec@google.com>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | baseboard/goroh/usbc_config.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/baseboard/goroh/usbc_config.c b/baseboard/goroh/usbc_config.c index f417190f28..d33b0ac836 100644 --- a/baseboard/goroh/usbc_config.c +++ b/baseboard/goroh/usbc_config.c @@ -76,25 +76,32 @@ static struct usb_mux_driver goroh_usb_c0_mux_driver = { .get = goroh_usb_c0_get_mux, }; -static const struct usb_mux goroh_usb_c1_ps8818_retimer = { - .usb_port = USBC_PORT_C1, - .i2c_port = I2C_PORT_USB_C1, - .i2c_addr_flags = PS8818_I2C_ADDR_FLAGS, - .driver = &ps8818_usb_retimer_driver, - .next_mux = NULL, +static const struct usb_mux_chain goroh_usb_c1_ps8818_retimer = { + .mux = + &(const struct usb_mux){ + .usb_port = USBC_PORT_C1, + .i2c_port = I2C_PORT_USB_C1, + .i2c_addr_flags = PS8818_I2C_ADDR_FLAGS, + .driver = &ps8818_usb_retimer_driver, + }, + .next = NULL, }; -const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { +const struct usb_mux_chain usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { [USBC_PORT_C0] = { - .usb_port = USBC_PORT_C0, - .driver = &goroh_usb_c0_mux_driver, - .hpd_update = &virtual_hpd_update, + .mux = &(const struct usb_mux) { + .usb_port = USBC_PORT_C0, + .driver = &goroh_usb_c0_mux_driver, + .hpd_update = &virtual_hpd_update, + }, }, [USBC_PORT_C1] = { - .usb_port = USBC_PORT_C1, - .driver = &virtual_usb_mux_driver, - .hpd_update = &virtual_hpd_update, - .next_mux = &goroh_usb_c1_ps8818_retimer, + .mux = &(const struct usb_mux) { + .usb_port = USBC_PORT_C1, + .driver = &virtual_usb_mux_driver, + .hpd_update = &virtual_hpd_update, + }, + .next = &goroh_usb_c1_ps8818_retimer, }, }; BUILD_ASSERT(ARRAY_SIZE(usb_muxes) == USBC_PORT_COUNT); |