From 23ac6befd1b5cde6a815f3e08c1c3dd0a49b34ea Mon Sep 17 00:00:00 2001 From: Tomasz Michalec Date: Wed, 20 Jul 2022 12:02:39 +0200 Subject: puff: usb_mux: Split struct usb_mux in puff boards Update puff boards to use new struct usb_mux_chain. BUG=b:236274003 TEST=make buildall BRANCH=None Cq-Depend: chromium:3748785 Signed-off-by: Tomasz Michalec Change-Id: Ib2e266439a829d3176491c154fc9623c9e635563 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779633 Commit-Queue: Tomasz Michalec Tested-by: Tomasz Michalec Reviewed-by: Keith Short --- board/dooly/board.c | 18 +++++++++++------- board/puff/board.c | 10 ++++++---- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/board/dooly/board.c b/board/dooly/board.c index 7b91e4a29e..6e1f6ebbeb 100644 --- a/board/dooly/board.c +++ b/board/dooly/board.c @@ -507,16 +507,20 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { .flags = TCPC_FLAGS_RESET_ACTIVE_HIGH, }, }; -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] = { [USB_PD_PORT_TCPC_0] = { - .usb_port = USB_PD_PORT_TCPC_0, - .driver = &anx7447_usb_mux_driver, - .hpd_update = &anx7447_tcpc_update_hpd_status, + .mux = &(const struct usb_mux) { + .usb_port = USB_PD_PORT_TCPC_0, + .driver = &anx7447_usb_mux_driver, + .hpd_update = &anx7447_tcpc_update_hpd_status, + }, }, [USB_PD_PORT_TCPC_1] = { - .usb_port = USB_PD_PORT_TCPC_1, - .driver = &anx7447_usb_mux_driver, - .hpd_update = &anx7447_tcpc_update_hpd_status, + .mux = &(const struct usb_mux) { + .usb_port = USB_PD_PORT_TCPC_1, + .driver = &anx7447_usb_mux_driver, + .hpd_update = &anx7447_tcpc_update_hpd_status, + }, }, }; diff --git a/board/puff/board.c b/board/puff/board.c index 60e274f1bb..d863b5fc0b 100644 --- a/board/puff/board.c +++ b/board/puff/board.c @@ -272,11 +272,13 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { .flags = TCPC_FLAGS_RESET_ACTIVE_HIGH, }, }; -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] = { [USB_PD_PORT_TCPC_0] = { - .usb_port = USB_PD_PORT_TCPC_0, - .driver = &anx7447_usb_mux_driver, - .hpd_update = &anx7447_tcpc_update_hpd_status, + .mux = &(const struct usb_mux) { + .usb_port = USB_PD_PORT_TCPC_0, + .driver = &anx7447_usb_mux_driver, + .hpd_update = &anx7447_tcpc_update_hpd_status, + }, }, }; -- cgit v1.2.1