ss-mux: remove unused port_addr initialization
We do not need to set the port_addr variable most places because the SS-MUX is also the TCPC and the tcpc_config_t information is used instead. Remove unused variable setting to avoid confusion. BRANCH=none BUG=none TEST=buildall. phaser USB-C communication (and muxs) still work which is a nominal case for all of these changes. Change-Id: I72ee5da251956eb133091974e8dce5ac7f8787c6 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1200064 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1231473 Reviewed-by: Martin Roth <martinroth@chromium.org> Commit-Queue: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org>
This commit is contained in:
parent
d2a2ec6582
commit
b7d7e16f52
|
@ -122,12 +122,10 @@ void tcpc_alert_event(enum gpio_signal signal)
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
[USB_PD_PORT_ANX74XX] = {
|
||||
.port_addr = USB_PD_PORT_ANX74XX,
|
||||
.driver = &anx74xx_tcpm_usb_mux_driver,
|
||||
.hpd_update = &anx74xx_tcpc_update_hpd_status,
|
||||
},
|
||||
[USB_PD_PORT_PS8751] = {
|
||||
.port_addr = USB_PD_PORT_PS8751,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
/* TODO(ecgh): ps8751_tune_mux needed? */
|
||||
|
|
|
@ -49,12 +49,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
[USB_PD_PORT_ANX7447] = {
|
||||
.port_addr = USB_PD_PORT_ANX7447,
|
||||
.driver = &anx7447_usb_mux_driver,
|
||||
.hpd_update = &anx7447_tcpc_update_hpd_status,
|
||||
},
|
||||
[USB_PD_PORT_PS8751] = {
|
||||
.port_addr = USB_PD_PORT_PS8751,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
}
|
||||
|
|
|
@ -184,12 +184,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
{
|
||||
.port_addr = 1,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
|
|
|
@ -225,12 +225,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = USB_PD_PORT_ANX3429,
|
||||
.driver = &anx74xx_tcpm_usb_mux_driver,
|
||||
.hpd_update = &anx74xx_tcpc_update_hpd_status,
|
||||
},
|
||||
{
|
||||
.port_addr = USB_PD_PORT_PS8751,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
}
|
||||
|
|
|
@ -287,12 +287,10 @@ static int ps8751_tune_mux(int port)
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
[USB_PD_PORT_ANX74XX] = {
|
||||
.port_addr = USB_PD_PORT_ANX74XX,
|
||||
.driver = &anx74xx_tcpm_usb_mux_driver,
|
||||
.hpd_update = &anx74xx_tcpc_update_hpd_status,
|
||||
},
|
||||
[USB_PD_PORT_PS8751] = {
|
||||
.port_addr = USB_PD_PORT_PS8751,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
.board_init = &ps8751_tune_mux,
|
||||
|
|
|
@ -157,7 +157,6 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0, /* port idx */
|
||||
.driver = &anx7688_usb_mux_driver,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -226,12 +226,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &anx74xx_tcpm_usb_mux_driver,
|
||||
.hpd_update = &anx74xx_tcpc_update_hpd_status,
|
||||
},
|
||||
{
|
||||
.port_addr = 1,
|
||||
.driver = &anx74xx_tcpm_usb_mux_driver,
|
||||
.hpd_update = &anx74xx_tcpc_update_hpd_status,
|
||||
},
|
||||
|
|
|
@ -210,7 +210,6 @@ static int ps8751_tune_mux(int port)
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
.board_init = &ps8751_tune_mux,
|
||||
|
|
|
@ -147,7 +147,6 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &virtual_usb_mux_driver,
|
||||
.hpd_update = &virtual_hpd_update,
|
||||
},
|
||||
|
|
|
@ -228,12 +228,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = USB_PD_PORT_PS8751,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
{
|
||||
.port_addr = USB_PD_PORT_ANX7447,
|
||||
.driver = &anx7447_usb_mux_driver,
|
||||
.hpd_update = &anx7447_tcpc_update_hpd_status,
|
||||
}
|
||||
|
|
|
@ -183,12 +183,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
{
|
||||
.port_addr = 1,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
}
|
||||
|
|
|
@ -300,16 +300,13 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
},
|
||||
};
|
||||
|
||||
/* The port_addr members are PD port numbers, not I2C port numbers. */
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
|
||||
{
|
||||
.port_addr = 1,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
|
|
|
@ -38,7 +38,6 @@ const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo);
|
|||
#if defined(CONFIG_USB_PD_TCPM_MUX) && defined(CONFIG_USB_PD_TCPM_ANX7447)
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &anx7447_usb_mux_driver,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -241,12 +241,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0, /* don't care / unused */
|
||||
.driver = &anx74xx_tcpm_usb_mux_driver,
|
||||
.hpd_update = &anx74xx_tcpc_update_hpd_status,
|
||||
},
|
||||
{
|
||||
.port_addr = 1,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
}
|
||||
|
|
|
@ -135,7 +135,6 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &virtual_usb_mux_driver,
|
||||
.hpd_update = &virtual_hpd_update,
|
||||
},
|
||||
|
|
|
@ -174,12 +174,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
[USB_PD_PORT_PS8751] = {
|
||||
.port_addr = USB_PD_PORT_PS8751,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
[USB_PD_PORT_ANX7447] = {
|
||||
.port_addr = USB_PD_PORT_ANX7447,
|
||||
.driver = &anx7447_usb_mux_driver,
|
||||
.hpd_update = &anx7447_tcpc_update_hpd_status,
|
||||
}
|
||||
|
|
|
@ -292,12 +292,10 @@ static int ps8751_tune_mux(int port)
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
[USB_PD_PORT_ANX74XX] = {
|
||||
.port_addr = USB_PD_PORT_ANX74XX,
|
||||
.driver = &anx74xx_tcpm_usb_mux_driver,
|
||||
.hpd_update = &anx74xx_tcpc_update_hpd_status,
|
||||
},
|
||||
[USB_PD_PORT_PS8751] = {
|
||||
.port_addr = USB_PD_PORT_PS8751,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
.board_init = &ps8751_tune_mux,
|
||||
|
|
|
@ -432,12 +432,10 @@ static int ps8751_tune_mux(int port)
|
|||
*/
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
[USB_PD_PORT_ANX74XX] = {
|
||||
.port_addr = USB_PD_PORT_ANX74XX,
|
||||
.driver = &anx74xx_tcpm_usb_mux_driver,
|
||||
.hpd_update = &anx74xx_tcpc_update_hpd_status,
|
||||
},
|
||||
[USB_PD_PORT_PS8751] = {
|
||||
.port_addr = USB_PD_PORT_PS8751,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
.board_init = &ps8751_tune_mux,
|
||||
|
|
|
@ -158,7 +158,6 @@ BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0, /* port idx */
|
||||
.driver = &anx7688_usb_mux_driver,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -107,11 +107,9 @@ const struct usb_mux_driver board_custom_usb_mux_driver = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &board_custom_usb_mux_driver,
|
||||
.driver = &board_custom_usb_mux_driver,
|
||||
},
|
||||
{
|
||||
.port_addr = 1,
|
||||
.driver = &board_custom_usb_mux_driver,
|
||||
.driver = &board_custom_usb_mux_driver,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -131,7 +131,6 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &virtual_usb_mux_driver,
|
||||
.hpd_update = &virtual_hpd_update,
|
||||
},
|
||||
|
|
|
@ -393,23 +393,20 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
|
|||
#endif /* defined(BOARD_ZOOMBINI) */
|
||||
};
|
||||
|
||||
/* The port_addr members are PD port numbers, not I2C port numbers. */
|
||||
/* The order is PD port (same as tcpc) */
|
||||
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
|
||||
{
|
||||
.port_addr = 0,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
|
||||
{
|
||||
.port_addr = 1,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
|
||||
#ifdef BOARD_ZOOMBINI
|
||||
{
|
||||
.port_addr = 2,
|
||||
.driver = &tcpci_tcpm_usb_mux_driver,
|
||||
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
|
||||
},
|
||||
|
|
|
@ -92,8 +92,11 @@ struct usb_mux_driver {
|
|||
/* Describes a USB mux present in the system */
|
||||
struct usb_mux {
|
||||
/*
|
||||
* Driver-defined parameter, typically an i2c slave address
|
||||
* (for i2c muxes) or a port number (for GPIO 'muxes').
|
||||
* Used by driver. Muxes that are also the TCPC do not need to specify
|
||||
* anything for this as they will use the values from tcpc_config_t. If
|
||||
* this mux is also a TCPC but not used as the TCPC then use the
|
||||
* MUX_PORT_AND_ADDR to pack the i2c port and i2c address into this
|
||||
* field and use the USB_MUX_FLAG_NOT_TCPC flag.
|
||||
*/
|
||||
const int port_addr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue