summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Michalec <tm@semihalf.com>2022-07-20 11:42:01 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-13 11:12:46 +0000
commitbd25ac35ece10b0cf67ca071ba21c9f12beb8e5d (patch)
tree41e8513eff9b5876d4fa7891aa5d46859224af09
parenta085e97f2f15c697e05570de3bda7feaeb2541ed (diff)
downloadchrome-ec-bd25ac35ece10b0cf67ca071ba21c9f12beb8e5d.tar.gz
poppy: usb_mux: Split struct usb_mux in poppy boards
Update poppy 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: I8c2eb0f218a7885c1e6b364067ec0f6680f7a04e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779627 Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com>
-rw-r--r--board/atlas/board.c20
-rw-r--r--board/eve/board.c20
-rw-r--r--board/nautilus/board.c20
-rw-r--r--board/nocturne/board.c20
-rw-r--r--board/poppy/board.c20
5 files changed, 65 insertions, 35 deletions
diff --git a/board/atlas/board.c b/board/atlas/board.c
index aa4414ffd0..6fbbb64b16 100644
--- a/board/atlas/board.c
+++ b/board/atlas/board.c
@@ -193,16 +193,22 @@ 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,
- .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,
+ },
},
};
diff --git a/board/eve/board.c b/board/eve/board.c
index ea17b53bfe..9b7395b039 100644
--- a/board/eve/board.c
+++ b/board/eve/board.c
@@ -240,16 +240,22 @@ 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,
- .driver = &anx74xx_tcpm_usb_mux_driver,
- .hpd_update = &anx74xx_tcpc_update_hpd_status,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .driver = &anx74xx_tcpm_usb_mux_driver,
+ .hpd_update = &anx74xx_tcpc_update_hpd_status,
+ },
},
{
- .usb_port = 1,
- .driver = &anx74xx_tcpm_usb_mux_driver,
- .hpd_update = &anx74xx_tcpc_update_hpd_status,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 1,
+ .driver = &anx74xx_tcpm_usb_mux_driver,
+ .hpd_update = &anx74xx_tcpc_update_hpd_status,
+ },
},
};
diff --git a/board/nautilus/board.c b/board/nautilus/board.c
index 9cebb233c4..3cdd7abaf1 100644
--- a/board/nautilus/board.c
+++ b/board/nautilus/board.c
@@ -187,16 +187,22 @@ 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,
- .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,
+ },
}
};
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index b210233eef..d32f036844 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -319,17 +319,23 @@ 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,
- .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,
+ },
},
};
diff --git a/board/poppy/board.c b/board/poppy/board.c
index e9336db5b4..a69fdd3f16 100644
--- a/board/poppy/board.c
+++ b/board/poppy/board.c
@@ -229,16 +229,22 @@ 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,
- .driver = &anx74xx_tcpm_usb_mux_driver,
- .hpd_update = &anx74xx_tcpc_update_hpd_status,
+ .mux =
+ &(const struct usb_mux){
+ .usb_port = 0,
+ .driver = &anx74xx_tcpm_usb_mux_driver,
+ .hpd_update = &anx74xx_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,
+ },
}
};