summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Michalec <tm@semihalf.com>2022-07-20 14:05:08 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-13 11:18:23 +0000
commitff4db5d137742621cc6252016721b8c3ba51c018 (patch)
treefcb6482866ba60f97e6b46926e3864b25849e75b
parent56ae32aa9f6f1bf9e8f6ff36f6d7ea757f632f9c (diff)
downloadchrome-ec-ff4db5d137742621cc6252016721b8c3ba51c018.tar.gz
zephyr: trogdor: usb_mux: Split struct usb_mux in trogdor board
Update trogdor board to use new struct usb_mux_chain. BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ib44dde43d4221c90d5aa8509c41e07d7e5cfaa86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780420 Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--zephyr/projects/trogdor/lazor/src/usbc_config.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/zephyr/projects/trogdor/lazor/src/usbc_config.c b/zephyr/projects/trogdor/lazor/src/usbc_config.c
index 8975c00783..f6bfdfb186 100644
--- a/zephyr/projects/trogdor/lazor/src/usbc_config.c
+++ b/zephyr/projects/trogdor/lazor/src/usbc_config.c
@@ -137,16 +137,22 @@ void tcpc_alert_event(enum gpio_signal signal)
* to AP. But the TCPC chip is also needed to know the HPD status; otherwise,
* the mux misbehaves.
*/
-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_port = 0,
- .driver = &tcpci_tcpm_usb_mux_driver,
- .hpd_update = &ps8xxx_tcpc_update_hpd_status,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .driver = &tcpci_tcpm_usb_mux_driver,
+ .hpd_update = &ps8xxx_tcpc_update_hpd_status,
+ },
},
{
- .usb_port = 1,
- .driver = &tcpci_tcpm_usb_mux_driver,
- .hpd_update = &ps8xxx_tcpc_update_hpd_status,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 1,
+ .driver = &tcpci_tcpm_usb_mux_driver,
+ .hpd_update = &ps8xxx_tcpc_update_hpd_status,
+ },
}
};