summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Michalec <tm@semihalf.com>2022-07-20 11:54:06 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-13 11:13:26 +0000
commita54f39c8b11145773a2d0721450a3ab6e73030dd (patch)
tree7f5b51339dd450b194e46b1a4cdd342862910bbb
parent1f26c8660e6cc7c44cf40335efdad4b543337628 (diff)
downloadchrome-ec-a54f39c8b11145773a2d0721450a3ab6e73030dd.tar.gz
keeby: usb_mux: Split struct usb_mux in keeby boards
Update keeby 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 <tm@semihalf.com> Change-Id: I348fd0950d630747deb9e02b7ea789ff5e395fed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779630 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
-rw-r--r--board/cappy2/board.c13
-rw-r--r--board/corori/board.c13
-rw-r--r--board/driblee/board.c13
-rw-r--r--board/gooey/board.c13
-rw-r--r--board/haboki/board.c26
-rw-r--r--board/lalala/board.c24
-rw-r--r--board/waddledoo2/board.c24
7 files changed, 78 insertions, 48 deletions
diff --git a/board/cappy2/board.c b/board/cappy2/board.c
index f9fd04b4b3..de651ac874 100644
--- a/board/cappy2/board.c
+++ b/board/cappy2/board.c
@@ -284,12 +284,15 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-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,
- .i2c_port = I2C_PORT_USB_C0,
- .i2c_addr_flags = PS8743_I2C_ADDR0_FLAG,
- .driver = &ps8743_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .i2c_port = I2C_PORT_USB_C0,
+ .i2c_addr_flags = PS8743_I2C_ADDR0_FLAG,
+ .driver = &ps8743_usb_mux_driver,
+ },
},
};
diff --git a/board/corori/board.c b/board/corori/board.c
index ef5e8197d5..4fe1e01fec 100644
--- a/board/corori/board.c
+++ b/board/corori/board.c
@@ -394,12 +394,15 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-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,
- .i2c_port = I2C_PORT_USB_C0,
- .i2c_addr_flags = PI3USB3X532_I2C_ADDR0,
- .driver = &pi3usb3x532_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .i2c_port = I2C_PORT_USB_C0,
+ .i2c_addr_flags = PI3USB3X532_I2C_ADDR0,
+ .driver = &pi3usb3x532_usb_mux_driver,
+ },
},
};
diff --git a/board/driblee/board.c b/board/driblee/board.c
index 97ca02cc92..30075e683e 100644
--- a/board/driblee/board.c
+++ b/board/driblee/board.c
@@ -440,12 +440,15 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-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,
- .i2c_port = I2C_PORT_USB_C0,
- .i2c_addr_flags = PI3USB3X532_I2C_ADDR0,
- .driver = &pi3usb3x532_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .i2c_port = I2C_PORT_USB_C0,
+ .i2c_addr_flags = PI3USB3X532_I2C_ADDR0,
+ .driver = &pi3usb3x532_usb_mux_driver,
+ },
},
};
diff --git a/board/gooey/board.c b/board/gooey/board.c
index f5a4f3c931..250f6afd61 100644
--- a/board/gooey/board.c
+++ b/board/gooey/board.c
@@ -180,12 +180,15 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
};
/* USB Muxes */
-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,
- .i2c_port = I2C_PORT_USB_C0,
- .i2c_addr_flags = IT5205_I2C_ADDR1_FLAGS,
- .driver = &it5205_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .i2c_port = I2C_PORT_USB_C0,
+ .i2c_addr_flags = IT5205_I2C_ADDR1_FLAGS,
+ .driver = &it5205_usb_mux_driver,
+ },
},
};
diff --git a/board/haboki/board.c b/board/haboki/board.c
index 2bde25f205..d7509115b5 100644
--- a/board/haboki/board.c
+++ b/board/haboki/board.c
@@ -242,19 +242,25 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
};
/* USB Muxes */
-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,
- .i2c_port = I2C_PORT_USB_C0,
- .i2c_addr_flags = IT5205_I2C_ADDR1_FLAGS,
- .driver = &it5205_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .i2c_port = I2C_PORT_USB_C0,
+ .i2c_addr_flags = IT5205_I2C_ADDR1_FLAGS,
+ .driver = &it5205_usb_mux_driver,
+ },
},
{
- .usb_port = 1,
- .i2c_port = I2C_PORT_SUB_USB_C1,
- .i2c_addr_flags = PS8XXX_I2C_ADDR1_FLAGS,
- .driver = &tcpci_tcpm_usb_mux_driver,
- .hpd_update = &ps8xxx_tcpc_update_hpd_status,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 1,
+ .i2c_port = I2C_PORT_SUB_USB_C1,
+ .i2c_addr_flags = PS8XXX_I2C_ADDR1_FLAGS,
+ .driver = &tcpci_tcpm_usb_mux_driver,
+ .hpd_update = &ps8xxx_tcpc_update_hpd_status,
+ },
},
};
diff --git a/board/lalala/board.c b/board/lalala/board.c
index 01166996e8..78404d6821 100644
--- a/board/lalala/board.c
+++ b/board/lalala/board.c
@@ -726,18 +726,24 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-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,
- .i2c_port = I2C_PORT_USB_C0,
- .i2c_addr_flags = PI3USB3X532_I2C_ADDR0,
- .driver = &pi3usb3x532_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .i2c_port = I2C_PORT_USB_C0,
+ .i2c_addr_flags = PI3USB3X532_I2C_ADDR0,
+ .driver = &pi3usb3x532_usb_mux_driver,
+ },
},
{
- .usb_port = 1,
- .i2c_port = I2C_PORT_SUB_USB_C1,
- .i2c_addr_flags = PS8802_I2C_ADDR_FLAGS_CUSTOM,
- .driver = &ps8802_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 1,
+ .i2c_port = I2C_PORT_SUB_USB_C1,
+ .i2c_addr_flags = PS8802_I2C_ADDR_FLAGS_CUSTOM,
+ .driver = &ps8802_usb_mux_driver,
+ },
}
};
diff --git a/board/waddledoo2/board.c b/board/waddledoo2/board.c
index 8fd8f672ba..fd12aec449 100644
--- a/board/waddledoo2/board.c
+++ b/board/waddledoo2/board.c
@@ -726,18 +726,24 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-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,
- .i2c_port = I2C_PORT_USB_C0,
- .i2c_addr_flags = PI3USB3X532_I2C_ADDR0,
- .driver = &pi3usb3x532_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .i2c_port = I2C_PORT_USB_C0,
+ .i2c_addr_flags = PI3USB3X532_I2C_ADDR0,
+ .driver = &pi3usb3x532_usb_mux_driver,
+ },
},
{
- .usb_port = 1,
- .i2c_port = I2C_PORT_SUB_USB_C1,
- .i2c_addr_flags = PS8802_I2C_ADDR_FLAGS_CUSTOM,
- .driver = &ps8802_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 1,
+ .i2c_port = I2C_PORT_SUB_USB_C1,
+ .i2c_addr_flags = PS8802_I2C_ADDR_FLAGS_CUSTOM,
+ .driver = &ps8802_usb_mux_driver,
+ },
}
};