Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH net-next v6 04/12] net: airoha: Move airoha_qdma pointer in airoha_gdm_dev struct
From: Lorenzo Bianconi @ 2026-05-13  8:45 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Christian Marangi, Benjamin Larsson, linux-arm-kernel,
	linux-mediatek, netdev, devicetree, Xuegang Lu
In-Reply-To: <20260511-airoha-eth-multi-serdes-v6-4-c899462c4f75@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 18121 bytes --]

On May 11, Lorenzo Bianconi wrote:
> Move airoha_qdma pointer from airoha_gdm_port struct to airoha_gdm_dev
> one since the QDMA block used depends on the particular net_device
> WAN/LAN configuration and in the current codebase net_device pointer is
> associated to airoha_gdm_dev struct.
> This is a preliminary patch to support multiple net_devices connected
> to the same GDM{3,4} port via an external hw arbiter.
> 
> Tested-by: Xuegang Lu <xuegang.lu@airoha.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  drivers/net/ethernet/airoha/airoha_eth.c | 105 +++++++++++++++----------------
>  drivers/net/ethernet/airoha/airoha_eth.h |   9 ++-
>  drivers/net/ethernet/airoha/airoha_ppe.c |  17 ++---
>  3 files changed, 64 insertions(+), 67 deletions(-)
> 
> diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
> index 18a89de4d58a..e0cd401bbf67 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.c
> +++ b/drivers/net/ethernet/airoha/airoha_eth.c
> @@ -71,9 +71,10 @@ static void airoha_qdma_irq_disable(struct airoha_irq_bank *irq_bank,
>  	airoha_qdma_set_irqmask(irq_bank, index, mask, 0);
>  }
>  
> -static void airoha_set_macaddr(struct airoha_gdm_port *port, const u8 *addr)
> +static void airoha_set_macaddr(struct airoha_gdm_dev *dev, const u8 *addr)
>  {
> -	struct airoha_eth *eth = port->qdma->eth;
> +	struct airoha_gdm_port *port = dev->port;
> +	struct airoha_eth *eth = dev->eth;
>  	u32 val, reg;
>  
>  	reg = airoha_is_lan_gdm_port(port) ? REG_FE_LAN_MAC_H
> @@ -85,7 +86,7 @@ static void airoha_set_macaddr(struct airoha_gdm_port *port, const u8 *addr)
>  	airoha_fe_wr(eth, REG_FE_MAC_LMIN(reg), val);
>  	airoha_fe_wr(eth, REG_FE_MAC_LMAX(reg), val);
>  
> -	airoha_ppe_init_upd_mem(port);
> +	airoha_ppe_init_upd_mem(dev);
>  }
>  
>  static void airoha_set_gdm_port_fwd_cfg(struct airoha_eth *eth, u32 addr,
> @@ -101,10 +102,10 @@ static void airoha_set_gdm_port_fwd_cfg(struct airoha_eth *eth, u32 addr,
>  		      FIELD_PREP(GDM_UCFQ_MASK, val));
>  }
>  
> -static int airoha_set_vip_for_gdm_port(struct airoha_gdm_port *port,
> -				       bool enable)
> +static int airoha_set_vip_for_gdm_port(struct airoha_gdm_dev *dev, bool enable)
>  {
> -	struct airoha_eth *eth = port->qdma->eth;
> +	struct airoha_gdm_port *port = dev->port;
> +	struct airoha_eth *eth = dev->eth;
>  	u32 vip_port;
>  
>  	vip_port = eth->soc->ops.get_vip_port(port, port->nbq);
> @@ -858,10 +859,13 @@ static void airoha_qdma_wake_netdev_txqs(struct airoha_queue *q)
>  		if (!port)
>  			continue;
>  
> -		if (port->qdma != qdma)
> +		dev = port->dev;
> +		if (!dev)
> +			continue;
> +
> +		if (dev->qdma != qdma)
>  			continue;
>  
> -		dev = port->dev;
>  		for (j = 0; j < dev->dev->num_tx_queues; j++) {
>  			if (airoha_qdma_get_txq(qdma, j) != qid)
>  				continue;
> @@ -1562,9 +1566,10 @@ static void airoha_qdma_stop_napi(struct airoha_qdma *qdma)
>  	}
>  }
>  
> -static void airoha_update_hw_stats(struct airoha_gdm_port *port)
> +static void airoha_update_hw_stats(struct airoha_gdm_dev *dev)
>  {
> -	struct airoha_eth *eth = port->qdma->eth;
> +	struct airoha_gdm_port *port = dev->port;
> +	struct airoha_eth *eth = dev->eth;
>  	u32 val, i = 0;
>  
>  	spin_lock(&port->stats.lock);
> @@ -1711,11 +1716,11 @@ static int airoha_dev_open(struct net_device *netdev)
>  	int err, len = ETH_HLEN + netdev->mtu + ETH_FCS_LEN;
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
>  	struct airoha_gdm_port *port = dev->port;
> -	struct airoha_qdma *qdma = port->qdma;
> +	struct airoha_qdma *qdma = dev->qdma;
>  	u32 pse_port = FE_PSE_PORT_PPE1;
>  
>  	netif_tx_start_all_queues(netdev);
> -	err = airoha_set_vip_for_gdm_port(port, true);
> +	err = airoha_set_vip_for_gdm_port(dev, true);
>  	if (err)
>  		return err;
>  
> @@ -1751,11 +1756,11 @@ static int airoha_dev_stop(struct net_device *netdev)
>  {
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
>  	struct airoha_gdm_port *port = dev->port;
> -	struct airoha_qdma *qdma = port->qdma;
> +	struct airoha_qdma *qdma = dev->qdma;
>  	int i;
>  
>  	netif_tx_disable(netdev);
> -	airoha_set_vip_for_gdm_port(port, false);
> +	airoha_set_vip_for_gdm_port(dev, false);
>  	for (i = 0; i < netdev->num_tx_queues; i++)
>  		netdev_tx_reset_subqueue(netdev, i);
>  
> @@ -1781,21 +1786,21 @@ static int airoha_dev_stop(struct net_device *netdev)
>  static int airoha_dev_set_macaddr(struct net_device *netdev, void *p)
>  {
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> -	struct airoha_gdm_port *port = dev->port;
>  	int err;
>  
>  	err = eth_mac_addr(netdev, p);
>  	if (err)
>  		return err;
>  
> -	airoha_set_macaddr(port, netdev->dev_addr);
> +	airoha_set_macaddr(dev, netdev->dev_addr);
>  
>  	return 0;
>  }
>  
> -static int airoha_set_gdm2_loopback(struct airoha_gdm_port *port)
> +static int airoha_set_gdm2_loopback(struct airoha_gdm_dev *dev)
>  {
> -	struct airoha_eth *eth = port->qdma->eth;
> +	struct airoha_gdm_port *port = dev->port;
> +	struct airoha_eth *eth = dev->eth;
>  	u32 val, pse_port, chan;
>  	int i, src_port;
>  
> @@ -1840,7 +1845,7 @@ static int airoha_set_gdm2_loopback(struct airoha_gdm_port *port)
>  		      __field_prep(SP_CPORT_MASK(val), FE_PSE_PORT_CDM2));
>  
>  	for (i = 0; i < eth->soc->num_ppe; i++)
> -		airoha_ppe_set_cpu_port(port, i, AIROHA_GDM2_IDX);
> +		airoha_ppe_set_cpu_port(dev, i, AIROHA_GDM2_IDX);
>  
>  	if (port->id == AIROHA_GDM4_IDX && airoha_is_7581(eth)) {
>  		u32 mask = FC_ID_OF_SRC_PORT_MASK(port->nbq);
> @@ -1860,9 +1865,9 @@ static int airoha_dev_init(struct net_device *netdev)
>  	int i;
>  
>  	/* QDMA0 is used for lan ports while QDMA1 is used for WAN ports */
> -	port->qdma = &eth->qdma[!airoha_is_lan_gdm_port(port)];
> -	dev->dev->irq = port->qdma->irq_banks[0].irq;
> -	airoha_set_macaddr(port, netdev->dev_addr);
> +	dev->qdma = &eth->qdma[!airoha_is_lan_gdm_port(port)];
> +	dev->dev->irq = dev->qdma->irq_banks[0].irq;
> +	airoha_set_macaddr(dev, netdev->dev_addr);
>  
>  	switch (port->id) {
>  	case AIROHA_GDM3_IDX:
> @@ -1871,7 +1876,7 @@ static int airoha_dev_init(struct net_device *netdev)
>  		if (!eth->ports[1]) {
>  			int err;
>  
> -			err = airoha_set_gdm2_loopback(port);
> +			err = airoha_set_gdm2_loopback(dev);
>  			if (err)
>  				return err;
>  		}
> @@ -1881,8 +1886,7 @@ static int airoha_dev_init(struct net_device *netdev)
>  	}
>  
>  	for (i = 0; i < eth->soc->num_ppe; i++)
> -		airoha_ppe_set_cpu_port(port, i,
> -					airoha_get_fe_port(port));
> +		airoha_ppe_set_cpu_port(dev, i, airoha_get_fe_port(dev));
>  
>  	return 0;
>  }
> @@ -1894,7 +1898,7 @@ static void airoha_dev_get_stats64(struct net_device *netdev,
>  	struct airoha_gdm_port *port = dev->port;
>  	unsigned int start;
>  
> -	airoha_update_hw_stats(port);
> +	airoha_update_hw_stats(dev);
>  	do {
>  		start = u64_stats_fetch_begin(&port->stats.syncp);
>  		storage->rx_packets = port->stats.rx_ok_pkts;
> @@ -1914,8 +1918,8 @@ static int airoha_dev_change_mtu(struct net_device *netdev, int mtu)
>  {
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
>  	struct airoha_gdm_port *port = dev->port;
> -	struct airoha_eth *eth = port->qdma->eth;
>  	u32 len = ETH_HLEN + mtu + ETH_FCS_LEN;
> +	struct airoha_eth *eth = dev->eth;
>  
>  	airoha_fe_rmw(eth, REG_GDM_LEN_CFG(port->id),
>  		      GDM_LONG_LEN_MASK,
> @@ -1989,10 +1993,10 @@ static u32 airoha_get_dsa_tag(struct sk_buff *skb, struct net_device *dev)
>  #endif
>  }
>  
> -int airoha_get_fe_port(struct airoha_gdm_port *port)
> +int airoha_get_fe_port(struct airoha_gdm_dev *dev)
>  {
> -	struct airoha_qdma *qdma = port->qdma;
> -	struct airoha_eth *eth = qdma->eth;
> +	struct airoha_gdm_port *port = dev->port;
> +	struct airoha_eth *eth = dev->eth;
>  
>  	switch (eth->soc->version) {
>  	case 0x7583:
> @@ -2009,8 +2013,7 @@ static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb,
>  				   struct net_device *netdev)
>  {
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> -	struct airoha_gdm_port *port = dev->port;
> -	struct airoha_qdma *qdma = port->qdma;
> +	struct airoha_qdma *qdma = dev->qdma;
>  	u32 nr_frags, tag, msg0, msg1, len;
>  	struct airoha_queue_entry *e;
>  	struct netdev_queue *txq;
> @@ -2048,7 +2051,7 @@ static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb,
>  		}
>  	}
>  
> -	fport = airoha_get_fe_port(port);
> +	fport = airoha_get_fe_port(dev);
>  	msg1 = FIELD_PREP(QDMA_ETH_TXMSG_FPORT_MASK, fport) |
>  	       FIELD_PREP(QDMA_ETH_TXMSG_METER_MASK, 0x7f);
>  
> @@ -2151,8 +2154,7 @@ static void airoha_ethtool_get_drvinfo(struct net_device *netdev,
>  				       struct ethtool_drvinfo *info)
>  {
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> -	struct airoha_gdm_port *port = dev->port;
> -	struct airoha_eth *eth = port->qdma->eth;
> +	struct airoha_eth *eth = dev->eth;
>  
>  	strscpy(info->driver, eth->dev->driver->name, sizeof(info->driver));
>  	strscpy(info->bus_info, dev_name(eth->dev), sizeof(info->bus_info));
> @@ -2165,7 +2167,7 @@ static void airoha_ethtool_get_mac_stats(struct net_device *netdev,
>  	struct airoha_gdm_port *port = dev->port;
>  	unsigned int start;
>  
> -	airoha_update_hw_stats(port);
> +	airoha_update_hw_stats(dev);
>  	do {
>  		start = u64_stats_fetch_begin(&port->stats.syncp);
>  		stats->FramesTransmittedOK = port->stats.tx_ok_pkts;
> @@ -2205,7 +2207,7 @@ airoha_ethtool_get_rmon_stats(struct net_device *netdev,
>  		     ARRAY_SIZE(hw_stats->rx_len) + 1);
>  
>  	*ranges = airoha_ethtool_rmon_ranges;
> -	airoha_update_hw_stats(port);
> +	airoha_update_hw_stats(dev);
>  	do {
>  		int i;
>  
> @@ -2225,18 +2227,17 @@ static int airoha_qdma_set_chan_tx_sched(struct net_device *netdev,
>  					 const u16 *weights, u8 n_weights)
>  {
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> -	struct airoha_gdm_port *port = dev->port;
>  	int i;
>  
>  	for (i = 0; i < AIROHA_NUM_TX_RING; i++)
> -		airoha_qdma_clear(port->qdma, REG_QUEUE_CLOSE_CFG(channel),
> +		airoha_qdma_clear(dev->qdma, REG_QUEUE_CLOSE_CFG(channel),
>  				  TXQ_DISABLE_CHAN_QUEUE_MASK(channel, i));
>  
>  	for (i = 0; i < n_weights; i++) {
>  		u32 status;
>  		int err;
>  
> -		airoha_qdma_wr(port->qdma, REG_TXWRR_WEIGHT_CFG,
> +		airoha_qdma_wr(dev->qdma, REG_TXWRR_WEIGHT_CFG,
>  			       TWRR_RW_CMD_MASK |
>  			       FIELD_PREP(TWRR_CHAN_IDX_MASK, channel) |
>  			       FIELD_PREP(TWRR_QUEUE_IDX_MASK, i) |
> @@ -2244,13 +2245,12 @@ static int airoha_qdma_set_chan_tx_sched(struct net_device *netdev,
>  		err = read_poll_timeout(airoha_qdma_rr, status,
>  					status & TWRR_RW_CMD_DONE,
>  					USEC_PER_MSEC, 10 * USEC_PER_MSEC,
> -					true, port->qdma,
> -					REG_TXWRR_WEIGHT_CFG);
> +					true, dev->qdma, REG_TXWRR_WEIGHT_CFG);
>  		if (err)
>  			return err;
>  	}
>  
> -	airoha_qdma_rmw(port->qdma, REG_CHAN_QOS_MODE(channel >> 3),
> +	airoha_qdma_rmw(dev->qdma, REG_CHAN_QOS_MODE(channel >> 3),
>  			CHAN_QOS_MODE_MASK(channel),
>  			__field_prep(CHAN_QOS_MODE_MASK(channel), mode));
>  
> @@ -2316,9 +2316,9 @@ static int airoha_qdma_get_tx_ets_stats(struct net_device *netdev, int channel,
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
>  	struct airoha_gdm_port *port = dev->port;
>  
> -	u64 cpu_tx_packets = airoha_qdma_rr(port->qdma,
> +	u64 cpu_tx_packets = airoha_qdma_rr(dev->qdma,
>  					    REG_CNTR_VAL(channel << 1));
> -	u64 fwd_tx_packets = airoha_qdma_rr(port->qdma,
> +	u64 fwd_tx_packets = airoha_qdma_rr(dev->qdma,
>  					    REG_CNTR_VAL((channel << 1) + 1));
>  	u64 tx_packets = (cpu_tx_packets - port->cpu_tx_packets) +
>  			 (fwd_tx_packets - port->fwd_tx_packets);
> @@ -2582,17 +2582,16 @@ static int airoha_qdma_set_tx_rate_limit(struct net_device *netdev,
>  					 u32 bucket_size)
>  {
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> -	struct airoha_gdm_port *port = dev->port;
>  	int i, err;
>  
>  	for (i = 0; i <= TRTCM_PEAK_MODE; i++) {
> -		err = airoha_qdma_set_trtcm_config(port->qdma, channel,
> +		err = airoha_qdma_set_trtcm_config(dev->qdma, channel,
>  						   REG_EGRESS_TRTCM_CFG, i,
>  						   !!rate, TRTCM_METER_MODE);
>  		if (err)
>  			return err;
>  
> -		err = airoha_qdma_set_trtcm_token_bucket(port->qdma, channel,
> +		err = airoha_qdma_set_trtcm_token_bucket(dev->qdma, channel,
>  							 REG_EGRESS_TRTCM_CFG,
>  							 i, rate, bucket_size);
>  		if (err)
> @@ -2642,11 +2641,11 @@ static int airoha_tc_htb_alloc_leaf_queue(struct net_device *netdev,
>  	return 0;
>  }
>  
> -static int airoha_qdma_set_rx_meter(struct airoha_gdm_port *port,
> +static int airoha_qdma_set_rx_meter(struct airoha_gdm_dev *dev,
>  				    u32 rate, u32 bucket_size,
>  				    enum trtcm_unit_type unit_type)
>  {
> -	struct airoha_qdma *qdma = port->qdma;
> +	struct airoha_qdma *qdma = dev->qdma;
>  	int i;
>  
>  	for (i = 0; i < ARRAY_SIZE(qdma->q_rx); i++) {
> @@ -2725,7 +2724,6 @@ static int airoha_dev_tc_matchall(struct net_device *netdev,
>  {
>  	enum trtcm_unit_type unit_type = TRTCM_BYTE_UNIT;
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> -	struct airoha_gdm_port *port = dev->port;
>  	u32 rate = 0, bucket_size = 0;
>  
>  	switch (f->command) {
> @@ -2750,7 +2748,7 @@ static int airoha_dev_tc_matchall(struct net_device *netdev,
>  		fallthrough;
>  	}
>  	case TC_CLSMATCHALL_DESTROY:
> -		return airoha_qdma_set_rx_meter(port, rate, bucket_size,
> +		return airoha_qdma_set_rx_meter(dev, rate, bucket_size,
>  						unit_type);
>  	default:
>  		return -EOPNOTSUPP;
> @@ -2762,8 +2760,7 @@ static int airoha_dev_setup_tc_block_cb(enum tc_setup_type type,
>  {
>  	struct net_device *netdev = cb_priv;
>  	struct airoha_gdm_dev *dev = netdev_priv(netdev);
> -	struct airoha_gdm_port *port = dev->port;
> -	struct airoha_eth *eth = port->qdma->eth;
> +	struct airoha_eth *eth = dev->eth;
>  
>  	if (!tc_can_offload(netdev))
>  		return -EOPNOTSUPP;
> diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
> index c78cabbec753..f1eea492217c 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.h
> +++ b/drivers/net/ethernet/airoha/airoha_eth.h
> @@ -537,12 +537,12 @@ struct airoha_qdma {
>  
>  struct airoha_gdm_dev {
>  	struct airoha_gdm_port *port;
> +	struct airoha_qdma *qdma;
>  	struct net_device *dev;
>  	struct airoha_eth *eth;
>  };
>  
>  struct airoha_gdm_port {
> -	struct airoha_qdma *qdma;
>  	struct airoha_gdm_dev *dev;
>  	int id;
>  	int nbq;
> @@ -666,19 +666,18 @@ static inline bool airoha_is_7583(struct airoha_eth *eth)
>  	return eth->soc->version == 0x7583;
>  }
>  
> -int airoha_get_fe_port(struct airoha_gdm_port *port);
> +int airoha_get_fe_port(struct airoha_gdm_dev *dev);
>  bool airoha_is_valid_gdm_dev(struct airoha_eth *eth,
>  			     struct airoha_gdm_dev *dev);
>  
> -void airoha_ppe_set_cpu_port(struct airoha_gdm_port *port, u8 ppe_id,
> -			     u8 fport);
> +void airoha_ppe_set_cpu_port(struct airoha_gdm_dev *dev, u8 ppe_id, u8 fport);
>  bool airoha_ppe_is_enabled(struct airoha_eth *eth, int index);
>  void airoha_ppe_check_skb(struct airoha_ppe_dev *dev, struct sk_buff *skb,
>  			  u16 hash, bool rx_wlan);
>  int airoha_ppe_setup_tc_block_cb(struct airoha_ppe_dev *dev, void *type_data);
>  int airoha_ppe_init(struct airoha_eth *eth);
>  void airoha_ppe_deinit(struct airoha_eth *eth);
> -void airoha_ppe_init_upd_mem(struct airoha_gdm_port *port);
> +void airoha_ppe_init_upd_mem(struct airoha_gdm_dev *dev);
>  u32 airoha_ppe_get_total_num_entries(struct airoha_ppe *ppe);
>  struct airoha_foe_entry *airoha_ppe_foe_get_entry(struct airoha_ppe *ppe,
>  						  u32 hash);
> diff --git a/drivers/net/ethernet/airoha/airoha_ppe.c b/drivers/net/ethernet/airoha/airoha_ppe.c
> index af7af4097b98..22f5f1bae730 100644
> --- a/drivers/net/ethernet/airoha/airoha_ppe.c
> +++ b/drivers/net/ethernet/airoha/airoha_ppe.c
> @@ -84,9 +84,9 @@ static u32 airoha_ppe_get_timestamp(struct airoha_ppe *ppe)
>  			     AIROHA_FOE_IB1_BIND_TIMESTAMP);
>  }
>  
> -void airoha_ppe_set_cpu_port(struct airoha_gdm_port *port, u8 ppe_id, u8 fport)
> +void airoha_ppe_set_cpu_port(struct airoha_gdm_dev *dev, u8 ppe_id, u8 fport)
>  {
> -	struct airoha_qdma *qdma = port->qdma;
> +	struct airoha_qdma *qdma = dev->qdma;
>  	struct airoha_eth *eth = qdma->eth;
>  	u8 qdma_id = qdma - &eth->qdma[0];
>  	u32 fe_cpu_port;
> @@ -180,8 +180,8 @@ static void airoha_ppe_hw_init(struct airoha_ppe *ppe)
>  			if (!port)
>  				continue;
>  
> -			airoha_ppe_set_cpu_port(port, i,
> -						airoha_get_fe_port(port));
> +			airoha_ppe_set_cpu_port(port->dev, i,
> +						airoha_get_fe_port(port->dev));
>  		}
>  	}
>  }
> @@ -1473,11 +1473,12 @@ void airoha_ppe_check_skb(struct airoha_ppe_dev *dev, struct sk_buff *skb,
>  	airoha_ppe_foe_insert_entry(ppe, skb, hash, rx_wlan);
>  }
>  
> -void airoha_ppe_init_upd_mem(struct airoha_gdm_port *port)
> +void airoha_ppe_init_upd_mem(struct airoha_gdm_dev *dev)
>  {
> -	struct airoha_eth *eth = port->qdma->eth;
> -	struct net_device *dev = port->dev->dev;
> -	const u8 *addr = dev->dev_addr;
> +	struct airoha_gdm_port *port = dev->port;
> +	struct net_device *netdev = dev->dev;
> +	struct airoha_eth *eth = dev->eth;
> +	const u8 *addr = netdev->dev_addr;
>  	u32 val;
>  
>  	val = (addr[2] << 24) | (addr[3] << 16) | (addr[4] << 8) | addr[5];
> 
> -- 
> 2.54.0
> 

Commenting on sashiko's report:
https://sashiko.dev/#/patchset/20260511-airoha-eth-multi-serdes-v6-0-c899462c4f75%40kernel.org
- This isn't a regression introduced by this patch, but is it safe to use
  spin_lock() here instead of spin_lock_bh()?
  - According to my understanding ndo_get_stats64 callback can't run softirq
    context.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v6 08/12] net: airoha: Support multiple net_devices for a single FE GDM port
From: Lorenzo Bianconi @ 2026-05-13  9:26 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Christian Marangi, Benjamin Larsson, linux-arm-kernel,
	linux-mediatek, netdev, devicetree, Xuegang Lu
In-Reply-To: <20260511-airoha-eth-multi-serdes-v6-8-c899462c4f75@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 20393 bytes --]

On May 11, Lorenzo Bianconi wrote:
> EN7581 or AN7583 SoCs support connecting multiple external SerDes (e.g.
> Ethernet or USB SerDes) to GDM3 or GDM4 ports via a hw arbiter that
> manages the traffic in a TDM manner. As a result multiple net_devices can
> connect to the same GDM{3,4} port and there is a theoretical "1:n"
> relation between GDM ports and net_devices.
> 
>            ┌─────────────────────────────────┐
>            │                                 │    ┌──────┐
>            │                         P1 GDM1 ├────►MT7530│
>            │                                 │    └──────┘
>            │                                 │      ETH0 (DSA conduit)
>            │                                 │
>            │              PSE/FE             │
>            │                                 │
>            │                                 │
>            │                                 │    ┌─────┐
>            │                         P0 CDM1 ├────►QDMA0│
>            │  P4                     P9 GDM4 │    └─────┘
>            └──┬─────────────────────────┬────┘
>               │                         │
>            ┌──▼──┐                 ┌────▼────┐
>            │ PPE │                 │   ARB   │
>            └─────┘                 └─┬─────┬─┘
>                                      │     │
>                                   ┌──▼──┐┌─▼───┐
>                                   │ ETH ││ USB │
>                                   └─────┘└─────┘
>                                    ETH1   ETH2
> 
> Introduce support for multiple net_devices connected to the same Frame
> Engine (FE) GDM port (GDM3 or GDM4) via an external hw arbiter.
> Please note GDM1 or GDM2 does not support the connection with the external
> arbiter.
> Add get_dev_from_sport callback since EN7581 and AN7583 have different
> logics for the net_device type connected to GDM3 or GDM4.
> 
> Tested-by: Xuegang Lu <xuegang.lu@airoha.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  drivers/net/ethernet/airoha/airoha_eth.c | 271 ++++++++++++++++++++++++-------
>  drivers/net/ethernet/airoha/airoha_eth.h |  10 +-
>  drivers/net/ethernet/airoha/airoha_ppe.c |  13 +-
>  3 files changed, 228 insertions(+), 66 deletions(-)
> 
> diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
> index f0d5f28dd731..4efd36779453 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.c
> +++ b/drivers/net/ethernet/airoha/airoha_eth.c
> @@ -106,7 +106,7 @@ static int airoha_set_vip_for_gdm_port(struct airoha_gdm_dev *dev, bool enable)
>  	struct airoha_eth *eth = dev->eth;
>  	u32 vip_port;
>  
> -	vip_port = eth->soc->ops.get_vip_port(port, port->nbq);
> +	vip_port = eth->soc->ops.get_vip_port(port, dev->nbq);
>  	if (enable) {
>  		airoha_fe_set(eth, REG_FE_VIP_PORT_EN, vip_port);
>  		airoha_fe_set(eth, REG_FE_IFC_PORT_EN, vip_port);
> @@ -566,24 +566,26 @@ static int airoha_qdma_fill_rx_queue(struct airoha_queue *q)
>  	return nframes;
>  }
>  
> -static int airoha_qdma_get_gdm_port(struct airoha_eth *eth,
> -				    struct airoha_qdma_desc *desc)
> +static struct airoha_gdm_dev *
> +airoha_qdma_get_gdm_dev(struct airoha_eth *eth, struct airoha_qdma_desc *desc)
>  {
> -	u32 port, sport, msg1 = le32_to_cpu(READ_ONCE(desc->msg1));
> +	struct airoha_gdm_port *port;
> +	u16 p, d;
>  
> -	sport = FIELD_GET(QDMA_ETH_RXMSG_SPORT_MASK, msg1);
> -	switch (sport) {
> -	case 0x10 ... 0x14:
> -		port = 0;
> -		break;
> -	case 0x2 ... 0x4:
> -		port = sport - 1;
> -		break;
> -	default:
> -		return -EINVAL;
> -	}
> +	if (eth->soc->ops.get_dev_from_sport(desc, &p, &d))
> +		return ERR_PTR(-ENODEV);
>  
> -	return port >= ARRAY_SIZE(eth->ports) ? -EINVAL : port;
> +	if (p >= ARRAY_SIZE(eth->ports))
> +		return ERR_PTR(-ENODEV);
> +
> +	port = eth->ports[p];
> +	if (!port)
> +		return ERR_PTR(-ENODEV);
> +
> +	if (d >= ARRAY_SIZE(port->devs))
> +		return ERR_PTR(-ENODEV);
> +
> +	return port->devs[d] ? port->devs[d] : ERR_PTR(-ENODEV);
>  }
>  
>  static int airoha_qdma_rx_process(struct airoha_queue *q, int budget)
> @@ -598,9 +600,8 @@ static int airoha_qdma_rx_process(struct airoha_queue *q, int budget)
>  		struct airoha_queue_entry *e = &q->entry[q->tail];
>  		struct airoha_qdma_desc *desc = &q->desc[q->tail];
>  		u32 hash, reason, msg1, desc_ctrl;
> -		struct airoha_gdm_port *port;
> -		struct net_device *netdev;
> -		int data_len, len, p;
> +		struct airoha_gdm_dev *dev;
> +		int data_len, len;
>  		struct page *page;
>  
>  		desc_ctrl = le32_to_cpu(READ_ONCE(desc->ctrl));
> @@ -623,12 +624,10 @@ static int airoha_qdma_rx_process(struct airoha_queue *q, int budget)
>  		if (!len || data_len < len)
>  			goto free_frag;
>  
> -		p = airoha_qdma_get_gdm_port(eth, desc);
> -		if (p < 0 || !eth->ports[p])
> +		dev = airoha_qdma_get_gdm_dev(eth, desc);
> +		if (IS_ERR(dev))
>  			goto free_frag;
>  
> -		port = eth->ports[p];
> -		netdev = port->dev->dev;
>  		if (!q->skb) { /* first buffer */
>  			q->skb = napi_build_skb(e->buf - AIROHA_RX_HEADROOM,
>  						q->buf_size);
> @@ -638,8 +637,8 @@ static int airoha_qdma_rx_process(struct airoha_queue *q, int budget)
>  			skb_reserve(q->skb, AIROHA_RX_HEADROOM);
>  			__skb_put(q->skb, len);
>  			skb_mark_for_recycle(q->skb);
> -			q->skb->dev = netdev;
> -			q->skb->protocol = eth_type_trans(q->skb, netdev);
> +			q->skb->dev = dev->dev;
> +			q->skb->protocol = eth_type_trans(q->skb, dev->dev);
>  			q->skb->ip_summed = CHECKSUM_UNNECESSARY;
>  			skb_record_rx_queue(q->skb, qid);
>  		} else { /* scattered frame */
> @@ -657,7 +656,9 @@ static int airoha_qdma_rx_process(struct airoha_queue *q, int budget)
>  		if (FIELD_GET(QDMA_DESC_MORE_MASK, desc_ctrl))
>  			continue;
>  
> -		if (netdev_uses_dsa(netdev)) {
> +		if (netdev_uses_dsa(dev->dev)) {
> +			struct airoha_gdm_port *port = dev->port;
> +
>  			/* PPE module requires untagged packets to work
>  			 * properly and it provides DSA port index via the
>  			 * DMA descriptor. Report DSA tag to the DSA stack
> @@ -851,24 +852,27 @@ static void airoha_qdma_wake_netdev_txqs(struct airoha_queue *q)
>  
>  	for (i = 0; i < ARRAY_SIZE(eth->ports); i++) {
>  		struct airoha_gdm_port *port = eth->ports[i];
> -		struct airoha_gdm_dev *dev;
> -		int j;
> +		int d;
>  
>  		if (!port)
>  			continue;
>  
> -		dev = port->dev;
> -		if (!dev)
> -			continue;
> +		for (d = 0; d < ARRAY_SIZE(port->devs); d++) {
> +			struct airoha_gdm_dev *dev = port->devs[d];
> +			int j;
>  
> -		if (dev->qdma != qdma)
> -			continue;
> +			if (!dev)
> +				continue;
>  
> -		for (j = 0; j < dev->dev->num_tx_queues; j++) {
> -			if (airoha_qdma_get_txq(qdma, j) != qid)
> +			if (dev->qdma != qdma)
>  				continue;
>  
> -			netif_wake_subqueue(dev->dev, j);
> +			for (j = 0; j < dev->dev->num_tx_queues; j++) {
> +				if (airoha_qdma_get_txq(qdma, j) != qid)
> +					continue;
> +
> +				netif_wake_subqueue(dev->dev, j);
> +			}
>  		}
>  	}
>  	q->txq_stopped = false;
> @@ -1829,7 +1833,7 @@ static int airoha_set_gdm2_loopback(struct airoha_gdm_dev *dev)
>  	airoha_fe_clear(eth, REG_FE_VIP_PORT_EN, BIT(AIROHA_GDM2_IDX));
>  	airoha_fe_clear(eth, REG_FE_IFC_PORT_EN, BIT(AIROHA_GDM2_IDX));
>  
> -	src_port = eth->soc->ops.get_sport(port, port->nbq);
> +	src_port = eth->soc->ops.get_sport(port, dev->nbq);
>  	if (src_port < 0)
>  		return src_port;
>  
> @@ -1846,7 +1850,7 @@ static int airoha_set_gdm2_loopback(struct airoha_gdm_dev *dev)
>  		airoha_ppe_set_cpu_port(dev, i, AIROHA_GDM2_IDX);
>  
>  	if (port->id == AIROHA_GDM4_IDX && airoha_is_7581(eth)) {
> -		u32 mask = FC_ID_OF_SRC_PORT_MASK(port->nbq);
> +		u32 mask = FC_ID_OF_SRC_PORT_MASK(dev->nbq);
>  
>  		airoha_fe_rmw(eth, REG_SRC_PORT_FC_MAP6, mask,
>  			      __field_prep(mask, AIROHA_GDM2_IDX));
> @@ -2050,7 +2054,8 @@ static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb,
>  	}
>  
>  	fport = airoha_get_fe_port(dev);
> -	msg1 = FIELD_PREP(QDMA_ETH_TXMSG_FPORT_MASK, fport) |
> +	msg1 = FIELD_PREP(QDMA_ETH_TXMSG_NBOQ_MASK, dev->nbq) |
> +	       FIELD_PREP(QDMA_ETH_TXMSG_FPORT_MASK, fport) |
>  	       FIELD_PREP(QDMA_ETH_TXMSG_METER_MASK, 0x7f);
>  
>  	q = &qdma->q_tx[qid];
> @@ -2983,12 +2988,15 @@ bool airoha_is_valid_gdm_dev(struct airoha_eth *eth,
>  
>  	for (i = 0; i < ARRAY_SIZE(eth->ports); i++) {
>  		struct airoha_gdm_port *port = eth->ports[i];
> +		int j;
>  
>  		if (!port)
>  			continue;
>  
> -		if (port->dev == dev)
> -			return true;
> +		for (j = 0; j < ARRAY_SIZE(port->devs); j++) {
> +			if (port->devs[j] == dev)
> +				return true;
> +		}
>  	}
>  
>  	return false;
> @@ -2996,10 +3004,11 @@ bool airoha_is_valid_gdm_dev(struct airoha_eth *eth,
>  
>  static int airoha_alloc_gdm_device(struct airoha_eth *eth,
>  				   struct airoha_gdm_port *port,
> -				   struct device_node *np)
> +				   int nbq, struct device_node *np)
>  {
> -	struct airoha_gdm_dev *dev;
>  	struct net_device *netdev;
> +	struct airoha_gdm_dev *dev;
> +	u8 index;
>  	int err;
>  
>  	netdev = devm_alloc_etherdev_mqs(eth->dev, sizeof(*dev),
> @@ -3019,7 +3028,6 @@ static int airoha_alloc_gdm_device(struct airoha_eth *eth,
>  			      NETIF_F_HW_TC;
>  	netdev->features |= netdev->hw_features;
>  	netdev->vlan_features = netdev->hw_features;
> -	netdev->dev.of_node = np;
>  	SET_NETDEV_DEV(netdev, eth->dev);
>  
>  	/* reserve hw queues for HTB offloading */
> @@ -3037,11 +3045,25 @@ static int airoha_alloc_gdm_device(struct airoha_eth *eth,
>  			 netdev->dev_addr);
>  	}
>  
> +	/* Allowed nbq for EN7581 on GDM3 port are 4 and 5 for PCIE0
> +	 * and PCIE1 respectively.
> +	 */
> +	index = nbq;
> +	if (index && airoha_is_7581(eth) && port->id == AIROHA_GDM3_IDX)
> +		index -= 4;
> +
> +	if (index >= ARRAY_SIZE(port->devs) || port->devs[index]) {
> +		dev_err(eth->dev, "invalid nbq id: %d\n", nbq);
> +		return -EINVAL;
> +	}
> +
> +	netdev->dev.of_node = of_node_get(np);
>  	dev = netdev_priv(netdev);
>  	dev->dev = netdev;
>  	dev->port = port;
> -	port->dev = dev;
>  	dev->eth = eth;
> +	dev->nbq = nbq;
> +	port->devs[index] = dev;
>  
>  	return 0;
>  }
> @@ -3051,7 +3073,8 @@ static int airoha_alloc_gdm_port(struct airoha_eth *eth,
>  {
>  	const __be32 *id_ptr = of_get_property(np, "reg", NULL);
>  	struct airoha_gdm_port *port;
> -	int err, p;
> +	struct device_node *node;
> +	int err, nbq, p, d = 0;
>  	u32 id;
>  
>  	if (!id_ptr) {
> @@ -3079,15 +3102,51 @@ static int airoha_alloc_gdm_port(struct airoha_eth *eth,
>  	u64_stats_init(&port->stats.syncp);
>  	spin_lock_init(&port->stats.lock);
>  	port->id = id;
> -	/* XXX: Read nbq from DTS */
> -	port->nbq = id == AIROHA_GDM3_IDX && airoha_is_7581(eth) ? 4 : 0;
>  	eth->ports[p] = port;
>  
>  	err = airoha_metadata_dst_alloc(port);
>  	if (err)
>  		return err;
>  
> -	return airoha_alloc_gdm_device(eth, port, np);
> +	/* Default nbq value to ensure backward compatibility */
> +	nbq = id == AIROHA_GDM3_IDX && airoha_is_7581(eth) ? 4 : 0;
> +
> +	for_each_child_of_node(np, node) {
> +		/* Multiple external serdes connected to the FE GDM port via an
> +		 * external arbiter.
> +		 */
> +		const __be32 *nbq_ptr;
> +
> +		if (!of_device_is_compatible(node, "airoha,eth-port"))
> +			continue;
> +
> +		d++;
> +		if (!of_device_is_available(node))
> +			continue;
> +
> +		nbq_ptr = of_get_property(node, "reg", NULL);
> +		if (!nbq_ptr) {
> +			dev_err(eth->dev, "missing nbq id\n");
> +			of_node_put(node);
> +			return -EINVAL;
> +		}
> +
> +		/* Verify the provided nbq parameter is valid */
> +		nbq = be32_to_cpup(nbq_ptr);
> +		err = eth->soc->ops.get_sport(port, nbq);
> +		if (err < 0) {
> +			of_node_put(node);
> +			return err;
> +		}
> +
> +		err = airoha_alloc_gdm_device(eth, port, nbq, node);
> +		if (err) {
> +			of_node_put(node);
> +			return err;
> +		}
> +	}
> +
> +	return !d ? airoha_alloc_gdm_device(eth, port, nbq, np) : 0;
>  }
>  
>  static int airoha_register_gdm_devices(struct airoha_eth *eth)
> @@ -3096,14 +3155,22 @@ static int airoha_register_gdm_devices(struct airoha_eth *eth)
>  
>  	for (i = 0; i < ARRAY_SIZE(eth->ports); i++) {
>  		struct airoha_gdm_port *port = eth->ports[i];
> -		int err;
> +		int j;
>  
>  		if (!port)
>  			continue;
>  
> -		err = register_netdev(port->dev->dev);
> -		if (err)
> -			return err;
> +		for (j = 0; j < ARRAY_SIZE(port->devs); j++) {
> +			struct airoha_gdm_dev *dev = port->devs[j];
> +			int err;
> +
> +			if (!dev)
> +				continue;
> +
> +			err = register_netdev(dev->dev);
> +			if (err)
> +				return err;
> +		}
>  	}
>  
>  	set_bit(DEV_STATE_REGISTERED, &eth->state);
> @@ -3210,14 +3277,23 @@ static int airoha_probe(struct platform_device *pdev)
>  
>  	for (i = 0; i < ARRAY_SIZE(eth->ports); i++) {
>  		struct airoha_gdm_port *port = eth->ports[i];
> -		struct airoha_gdm_dev *dev;
> +		int j;
>  
>  		if (!port)
>  			continue;
>  
> -		dev = port->dev;
> -		if (dev && dev->dev->reg_state == NETREG_REGISTERED)
> -			unregister_netdev(dev->dev);
> +		for (j = 0; j < ARRAY_SIZE(port->devs); j++) {
> +			struct airoha_gdm_dev *dev = port->devs[j];
> +			struct net_device *netdev;
> +
> +			if (!dev)
> +				continue;
> +
> +			netdev = dev->dev;
> +			if (netdev->reg_state == NETREG_REGISTERED)
> +				unregister_netdev(netdev);
> +			of_node_put(netdev->dev.of_node);
> +		}
>  		airoha_metadata_dst_free(port);
>  	}
>  	airoha_hw_cleanup(eth);
> @@ -3238,14 +3314,22 @@ static void airoha_remove(struct platform_device *pdev)
>  
>  	for (i = 0; i < ARRAY_SIZE(eth->ports); i++) {
>  		struct airoha_gdm_port *port = eth->ports[i];
> -		struct airoha_gdm_dev *dev;
> +		int j;
>  
>  		if (!port)
>  			continue;
>  
> -		dev = port->dev;
> -		if (dev)
> -			unregister_netdev(dev->dev);
> +		for (j = 0; j < ARRAY_SIZE(port->devs); j++) {
> +			struct airoha_gdm_dev *dev = port->devs[j];
> +			struct net_device *netdev;
> +
> +			if (!dev)
> +				continue;
> +
> +			netdev = dev->dev;
> +			unregister_netdev(netdev);
> +			of_node_put(netdev->dev.of_node);
> +		}
>  		airoha_metadata_dst_free(port);
>  	}
>  	airoha_hw_cleanup(eth);
> @@ -3308,6 +3392,39 @@ static u32 airoha_en7581_get_vip_port(struct airoha_gdm_port *port, int nbq)
>  	return 0;
>  }
>  
> +static int airoha_en7581_get_dev_from_sport(struct airoha_qdma_desc *desc,
> +					    u16 *port, u16 *dev)
> +{
> +	u32 sport = FIELD_GET(QDMA_ETH_RXMSG_SPORT_MASK,
> +			      le32_to_cpu(READ_ONCE(desc->msg1)));
> +
> +	*dev = 0;
> +	switch (sport) {
> +	case 0x10 ... 0x14:
> +		*port = 0; /* GDM1 */
> +		break;
> +	case 0x2 ... 0x4:
> +		*port = sport - 1;
> +		break;
> +	case HSGMII_LAN_7581_PCIE1_SRCPORT:
> +		*dev = 1;
> +		fallthrough;
> +	case HSGMII_LAN_7581_PCIE0_SRCPORT:
> +		*port = 2; /* GDM3 */
> +		break;
> +	case HSGMII_LAN_7581_USB_SRCPORT:
> +		*dev = 1;
> +		fallthrough;
> +	case HSGMII_LAN_7581_ETH_SRCPORT:
> +		*port = 3; /* GDM4 */
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +
> +	return 0;
> +}
> +
>  static const char * const an7583_xsi_rsts_names[] = {
>  	"xsi-mac",
>  	"hsi0-mac",
> @@ -3357,6 +3474,36 @@ static u32 airoha_an7583_get_vip_port(struct airoha_gdm_port *port, int nbq)
>  	return 0;
>  }
>  
> +static int airoha_an7583_get_dev_from_sport(struct airoha_qdma_desc *desc,
> +					    u16 *port, u16 *dev)
> +{
> +	u32 sport = FIELD_GET(QDMA_ETH_RXMSG_SPORT_MASK,
> +			      le32_to_cpu(READ_ONCE(desc->msg1)));
> +
> +	*dev = 0;
> +	switch (sport) {
> +	case 0x10 ... 0x14:
> +		*port = 0; /* GDM1 */
> +		break;
> +	case 0x2 ... 0x4:
> +		*port = sport - 1;
> +		break;
> +	case HSGMII_LAN_7583_ETH_SRCPORT:
> +		*port = 2; /* GDM3 */
> +		break;
> +	case HSGMII_LAN_7583_USB_SRCPORT:
> +		*dev = 1;
> +		fallthrough;
> +	case HSGMII_LAN_7583_PCIE_SRCPORT:
> +		*port = 3; /* GDM4 */
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +
> +	return 0;
> +}
> +
>  static const struct airoha_eth_soc_data en7581_soc_data = {
>  	.version = 0x7581,
>  	.xsi_rsts_names = en7581_xsi_rsts_names,
> @@ -3365,6 +3512,7 @@ static const struct airoha_eth_soc_data en7581_soc_data = {
>  	.ops = {
>  		.get_sport = airoha_en7581_get_sport,
>  		.get_vip_port = airoha_en7581_get_vip_port,
> +		.get_dev_from_sport = airoha_en7581_get_dev_from_sport,
>  	},
>  };
>  
> @@ -3376,6 +3524,7 @@ static const struct airoha_eth_soc_data an7583_soc_data = {
>  	.ops = {
>  		.get_sport = airoha_an7583_get_sport,
>  		.get_vip_port = airoha_an7583_get_vip_port,
> +		.get_dev_from_sport = airoha_an7583_get_dev_from_sport,
>  	},
>  };
>  
> diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
> index fbb50dc73af8..fc49f0049983 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.h
> +++ b/drivers/net/ethernet/airoha/airoha_eth.h
> @@ -17,6 +17,7 @@
>  #include <net/dsa.h>
>  
>  #define AIROHA_MAX_NUM_GDM_PORTS	4
> +#define AIROHA_MAX_NUM_GDM_DEVS		2
>  #define AIROHA_MAX_NUM_QDMA		2
>  #define AIROHA_MAX_NUM_IRQ_BANKS	4
>  #define AIROHA_MAX_DSA_PORTS		7
> @@ -540,19 +541,20 @@ struct airoha_qdma {
>  struct airoha_gdm_dev {
>  	struct airoha_gdm_port *port;
>  	struct airoha_qdma *qdma;
> -	struct net_device *dev;
>  	struct airoha_eth *eth;
> +	struct net_device *dev;
>  
>  	DECLARE_BITMAP(qos_sq_bmap, AIROHA_NUM_QOS_CHANNELS);
>  	/* qos stats counters */
>  	u64 cpu_tx_packets;
>  	u64 fwd_tx_packets;
> +
> +	int nbq;
>  };
>  
>  struct airoha_gdm_port {
> -	struct airoha_gdm_dev *dev;
> +	struct airoha_gdm_dev *devs[AIROHA_MAX_NUM_GDM_DEVS];
>  	int id;
> -	int nbq;
>  
>  	struct airoha_hw_stats stats;
>  
> @@ -588,6 +590,8 @@ struct airoha_eth_soc_data {
>  	struct {
>  		int (*get_sport)(struct airoha_gdm_port *port, int nbq);
>  		u32 (*get_vip_port)(struct airoha_gdm_port *port, int nbq);
> +		int (*get_dev_from_sport)(struct airoha_qdma_desc *desc,
> +					  u16 *port, u16 *dev);
>  	} ops;
>  };
>  
> diff --git a/drivers/net/ethernet/airoha/airoha_ppe.c b/drivers/net/ethernet/airoha/airoha_ppe.c
> index 047141b2d6d8..c4086d29d984 100644
> --- a/drivers/net/ethernet/airoha/airoha_ppe.c
> +++ b/drivers/net/ethernet/airoha/airoha_ppe.c
> @@ -169,6 +169,7 @@ static void airoha_ppe_hw_init(struct airoha_ppe *ppe)
>  
>  		for (p = 0; p < ARRAY_SIZE(eth->ports); p++) {
>  			struct airoha_gdm_port *port = eth->ports[p];
> +			int j;
>  
>  			airoha_fe_rmw(eth, REG_PPE_MTU(i, p),
>  				      FP0_EGRESS_MTU_MASK |
> @@ -180,8 +181,16 @@ static void airoha_ppe_hw_init(struct airoha_ppe *ppe)
>  			if (!port)
>  				continue;
>  
> -			airoha_ppe_set_cpu_port(port->dev, i,
> -						airoha_get_fe_port(port->dev));
> +			for (j = 0; j < ARRAY_SIZE(port->devs); j++) {
> +				struct airoha_gdm_dev *dev = port->devs[j];
> +				u8 fport;
> +
> +				if (!dev)
> +					continue;
> +
> +				fport = airoha_get_fe_port(dev);
> +				airoha_ppe_set_cpu_port(dev, i, fport);
> +			}
>  		}
>  	}
>  }
> 
> -- 
> 2.54.0
> 

commenting on sashiko's report:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260511-airoha-eth-multi-serdes-v6-0-c899462c4f75%40kernel.org

- With multiple net_devices now sharing a single GDM3 or GDM4 port (for
  example EN7581 GDM3 with PCIE0 nbq=4 and PCIE1 nbq=5), is
  airoha_set_gdm2_loopback() still safe to call once per dev through .ndo_init?
  - This is not a problem since airoha_set_gdm2_loopback() is run just for WAN
    interfaces and we can have a single WAN device.

Regards,
Lorenzo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v6 11/12] net: airoha: Support multiple LAN/WAN interfaces for hw MAC address configuration
From: Benjamin Larsson @ 2026-05-13 12:26 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Christian Marangi, linux-arm-kernel, linux-mediatek, netdev,
	devicetree, Madhur Agrawal
In-Reply-To: <agOUgVn24Ls5jiHq@lore-desk>

On 12/05/2026 22:58, Lorenzo Bianconi wrote:
> On May 12, Benjamin Larsson wrote:
>> Hi.
>>
>> On 11/05/2026 12:49, Lorenzo Bianconi wrote:
>>> The EN7581 and AN7583 SoCs provide registers to configure hardware LAN/WAN
>>> MAC addresses, used to determine whether received traffic is destined for
>>> this host or should be forwarded to another device.
>>> The SoC hardware design assumes all interfaces configured as LAN (or WAN)
>>> share a common upper MAC address, which is programmed into the
>>> REG_FE_{LAN,WAN}_MAC_H register. The lower bytes of 'local' addresses can
>>> be expressed as a range via the REG_FE_MAC_LMIN and REG_FE_MAC_LMAX
>>> registers.
>>> Previously, only a single interface was considered when programming these
>>> registers. Extend the logic to derive the correct minimum and maximum
>>> values for REG_FE_MAC_LMIN/REG_FE_MAC_LMAX when two or more interfaces are
>>> configured as LAN or WAN.
>>>
>>> Tested-by: Madhur Agrawal <madhur.agrawal@airoha.com>
>>> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>>> ---
>>>    drivers/net/ethernet/airoha/airoha_eth.c | 75 +++++++++++++++++++++++++++-----
>>>    drivers/net/ethernet/airoha/airoha_eth.h |  2 +-
>>>    drivers/net/ethernet/airoha/airoha_ppe.c |  4 +-
>>>    3 files changed, 66 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
>>> index 16c0ff9999da..533ffe20f833 100644
>>> --- a/drivers/net/ethernet/airoha/airoha_eth.c
>>> +++ b/drivers/net/ethernet/airoha/airoha_eth.c
>>> @@ -71,20 +71,67 @@ static void airoha_qdma_irq_disable(struct airoha_irq_bank *irq_bank,
>>>    	airoha_qdma_set_irqmask(irq_bank, index, mask, 0);
>>>    }
>>> -static void airoha_set_macaddr(struct airoha_gdm_dev *dev, const u8 *addr)
>>> +static int airoha_set_macaddr(struct airoha_gdm_dev *dev, const u8 *addr)
>>>    {
>>>    	struct airoha_eth *eth = dev->eth;
>>> -	u32 val, reg;
>>> +	u8 ref_addr[ETH_ALEN] = {};
>>> +	u32 reg, val, lmin, lmax;
>>> +	int i;
>>> +
>>> +	lmin = (addr[3] << 16) | (addr[4] << 8) | addr[5];
>>> +	lmax = lmin;
>>> +
>>> +	for (i = 0; i < ARRAY_SIZE(eth->ports); i++) {
>>> +		struct airoha_gdm_port *port = eth->ports[i];
>>> +		int j;
>>> +
>>> +		if (!port)
>>> +			continue;
>>> +
>>> +		for (j = 0; j < ARRAY_SIZE(port->devs); j++) {
>>> +			struct airoha_gdm_dev *iter_dev;
>>> +			struct net_device *netdev;
>>> +
>>> +			iter_dev = port->devs[j];
>>> +			if (!iter_dev || iter_dev == dev)
>>> +				continue;
>>> +
>>> +			if (airoha_is_lan_gdm_dev(iter_dev) !=
>>> +			    airoha_is_lan_gdm_dev(dev))
>>> +				continue;
>>> +
>>> +			netdev = iter_dev->dev;
>>> +			if (netdev->reg_state != NETREG_REGISTERED)
>>> +				continue;
>>> +
>>> +			ether_addr_copy(ref_addr, netdev->dev_addr);
>>> +			val = (netdev->dev_addr[3] << 16) |
>>> +			      (netdev->dev_addr[4] << 8) | netdev->dev_addr[5];
>>> +			if (val < lmin)
>>> +				lmin = val;
>>> +			if (val > lmax)
>>> +				lmax = val;
>>> +		}
>>> +	}
>>> +
>>> +	if (!is_zero_ether_addr(ref_addr) && memcmp(ref_addr, addr, 3)) {
>>> +		/* According to the HW design, hw mac address MS bits
>>> +		 * must be the same for each net_device with the same
>>> +		 * LAN/WAN configuration.
>>> +		 */
>>> +		return -EINVAL;
>>> +	}
>> Maybe this information should be relayed to the user somehow?
> netdev_err()?

Ok with me.

MvH

Benjamin Larsson


>
> Regards,
> Lorenzo
>
>> MvH
>>
>> Benjamin Larsson
>>



^ permalink raw reply

* Re: [PATCH] dt-bindings: Consolidate "sram" property definition
From: Dmitry Baryshkov @ 2026-05-13 13:26 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Liu Ying, Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Rob Clark, Sean Paul,
	Konrad Dybcio, Akhil P Oommen, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Marijn Suijten, Vinod Koul, Nas Chung, Jackson Lee,
	Mauro Carvalho Chehab, Mirela Rabulea, Detlev Casanova,
	Ezequiel Garcia, Heiko Stuebner, Hugues Fruchet, Alain Volmat,
	Maxime Coquelin, Alexandre Torgue, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, MD Danish Anwar,
	Roger Quadros, Parvathi Pudi, Mohan Reddy Putluru,
	Bjorn Andersson, Mathieu Poirier, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl, Michal Simek, Mark Brown,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Lorenzo Bianconi, Felix Fietkau, Andrew F. Davis, Hussain Khaja,
	Suman Anna, Ben Levinsky, Tanmay Shah, Erwan Leray,
	Fabrice Gasnier, Roger Quadros, dri-devel, devicetree, imx,
	linux-arm-kernel, linux-kernel, linux-arm-msm, freedreno,
	dmaengine, linux-media, linux-rockchip, linux-stm32, netdev,
	linux-remoteproc, linux-amlogic, linux-spi, linux-mediatek
In-Reply-To: <20260511165942.2774868-1-robh@kernel.org>

On Mon, May 11, 2026 at 11:59:36AM -0500, Rob Herring (Arm) wrote:
> The "sram" property has become a de facto standard property, so create a
> common schema for it and drop all the duplicated definitions.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  .../imx/fsl,imx8qxp-dc-command-sequencer.yaml |  2 +-
>  .../devicetree/bindings/display/msm/gpu.yaml  |  6 +----


Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> # display/msm


>  .../bindings/dma/stericsson,dma40.yaml        |  8 ++----
>  .../bindings/media/cnm,wave521c.yaml          |  2 +-
>  .../bindings/media/nxp,imx8-jpeg.yaml         |  6 ++---
>  .../bindings/media/rockchip,vdec.yaml         |  5 ++--
>  .../bindings/media/st,stm32-dcmi.yaml         |  6 ++---
>  .../devicetree/bindings/net/mediatek,net.yaml |  3 +--
>  .../bindings/net/ti,icssg-prueth.yaml         |  2 +-
>  .../bindings/net/ti,icssm-prueth.yaml         |  2 +-
>  .../remoteproc/amlogic,meson-mx-ao-arc.yaml   |  7 +----
>  .../bindings/remoteproc/ti,k3-dsp-rproc.yaml  |  8 ------
>  .../bindings/remoteproc/ti,k3-r5f-rproc.yaml  |  8 ------
>  .../remoteproc/xlnx,zynqmp-r5fss.yaml         |  9 +------
>  .../devicetree/bindings/spi/st,stm32-spi.yaml | 10 +++----
>  .../bindings/sram/sram-consumer.yaml          | 26 +++++++++++++++++++
>  16 files changed, 48 insertions(+), 62 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sram/sram-consumer.yaml
> 

-- 
With best wishes
Dmitry


^ permalink raw reply

* Re: [PATCH v5 2/2] PCI: mediatek: Add support for EcoNet EN7528 SoC
From: Caleb James DeLisle @ 2026-05-13 14:31 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: linux-pci, linux-mips, naseefkm, ryder.lee, helgaas, lpieralisi,
	kwilczynski, robh, krzk+dt, conor+dt, matthias.bgg,
	angelogioacchino.delregno, ansuelsmth, linux-mediatek, devicetree,
	linux-kernel
In-Reply-To: <duchbakmiuf4ffmhgkoioq3qpxaybcevtcdduwiv2gf56j5ncr@kszd5v54ph3q>


On 12/05/2026 13:55, Manivannan Sadhasivam wrote:
> On Mon, Apr 13, 2026 at 02:03:39PM +0000, Caleb James DeLisle wrote:
>> Add support for the PCIe present on the EcoNet EN7528 (and EN751221) SoCs.
>>
>> These SoCs have a mix of Gen1 and Gen2 capable ports, but the Gen2 ports
>> require re-training after startup.
>>
>> Co-developed-by: Ahmed Naseef <naseefkm@gmail.com>
>> Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
>> Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
>> ---
>>   drivers/pci/controller/Kconfig         |   2 +-
>>   drivers/pci/controller/pcie-mediatek.c | 133 +++++++++++++++++++++++++
>>   2 files changed, 134 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
>> index 686349e09cd3..5808d5e407fd 100644
>> --- a/drivers/pci/controller/Kconfig
>> +++ b/drivers/pci/controller/Kconfig
>> @@ -209,7 +209,7 @@ config PCI_MVEBU
>>   
>>   config PCIE_MEDIATEK
>>   	tristate "MediaTek PCIe controller"
>> -	depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST
>> +	depends on ARCH_AIROHA || ARCH_MEDIATEK || ECONET || COMPILE_TEST
>>   	depends on OF
>>   	depends on PCI_MSI
>>   	select IRQ_MSI_LIB
>> diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
>> index 75722524fe74..915a35825ce1 100644
>> --- a/drivers/pci/controller/pcie-mediatek.c
>> +++ b/drivers/pci/controller/pcie-mediatek.c
>> @@ -7,6 +7,7 @@
>>    *	   Honghui Zhang <honghui.zhang@mediatek.com>
>>    */
>>   
>> +#include <asm-generic/errno-base.h>
>>   #include <linux/clk.h>
>>   #include <linux/delay.h>
>>   #include <linux/iopoll.h>
>> @@ -14,6 +15,7 @@
>>   #include <linux/irqchip/chained_irq.h>
>>   #include <linux/irqchip/irq-msi-lib.h>
>>   #include <linux/irqdomain.h>
>> +#include <linux/kconfig.h>
>>   #include <linux/kernel.h>
>>   #include <linux/mfd/syscon.h>
>>   #include <linux/msi.h>
>> @@ -77,6 +79,7 @@
>>   
>>   #define PCIE_CONF_VEND_ID	0x100
>>   #define PCIE_CONF_DEVICE_ID	0x102
>> +#define PCIE_CONF_REV_CLASS	0x104
>>   #define PCIE_CONF_CLASS_ID	0x106
>>   
>>   #define PCIE_INT_MASK		0x420
>> @@ -89,6 +92,11 @@
>>   #define MSI_MASK		BIT(23)
>>   #define MTK_MSI_IRQS_NUM	32
>>   
>> +#define EN7528_HOST_MODE	0x00804201
>> +#define EN7528_LINKUP_REG	0x50
>> +#define EN7528_RC0_LINKUP	BIT(1)
>> +#define EN7528_RC1_LINKUP	BIT(2)
>> +
>>   #define PCIE_AHB_TRANS_BASE0_L	0x438
>>   #define PCIE_AHB_TRANS_BASE0_H	0x43c
>>   #define AHB2PCIE_SIZE(x)	((x) & GENMASK(4, 0))
>> @@ -148,12 +156,15 @@ struct mtk_pcie_port;
>>    * @MTK_PCIE_FIX_DEVICE_ID: host's device ID needed to be fixed
>>    * @MTK_PCIE_NO_MSI: Bridge has no MSI support, and relies on an external block
>>    * @MTK_PCIE_SKIP_RSTB: Skip calling RSTB bits on PCIe probe
>> + * @MTK_PCIE_RETRAIN: Re-train link to bridge after startup because some
>> + *                    Gen2-capable devices start as Gen1.
>>    */
>>   enum mtk_pcie_quirks {
>>   	MTK_PCIE_FIX_CLASS_ID = BIT(0),
>>   	MTK_PCIE_FIX_DEVICE_ID = BIT(1),
>>   	MTK_PCIE_NO_MSI = BIT(2),
>>   	MTK_PCIE_SKIP_RSTB = BIT(3),
>> +	MTK_PCIE_RETRAIN = BIT(4),
>>   };
>>   
>>   /**
>> @@ -753,6 +764,80 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
>>   	return 0;
>>   }
>>   
>> +static int mtk_pcie_startup_port_en7528(struct mtk_pcie_port *port)
>> +{
>> +	struct mtk_pcie *pcie = port->pcie;
>> +	struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
>> +	struct resource *mem = NULL;
>> +	struct resource_entry *entry;
>> +	u32 val, link_mask;
>> +	int err;
>> +
>> +	entry = resource_list_first_type(&host->windows, IORESOURCE_MEM);
>> +	if (entry)
>> +		mem = entry->res;
>> +	if (!mem)
>> +		return -EINVAL;
>> +
>> +	if (!pcie->cfg) {
>> +		dev_err(pcie->dev, "EN7528: pciecfg syscon not available\n");
>> +		return -EINVAL;
>> +	}
>> +
>> +	/* Assert all reset signals */
>> +	writel(0, port->base + PCIE_RST_CTRL);
>> +
>> +	/*
>> +	 * Enable PCIe link down reset, if link status changed from link up to
>> +	 * link down, this will reset MAC control registers and configuration
>> +	 * space.
>> +	 */
>> +	writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
>> +
>> +	msleep(PCIE_T_PVPERL_MS);
>> +
>> +	/* De-assert PHY, PE, PIPE, MAC and configuration reset */
>> +	val = readl(port->base + PCIE_RST_CTRL);
>> +	val |= PCIE_PHY_RSTB | PCIE_PERSTB | PCIE_PIPE_SRSTB |
>> +	       PCIE_MAC_SRSTB | PCIE_CRSTB;
>> +	writel(val, port->base + PCIE_RST_CTRL);
>> +
>> +	writel(PCIE_CLASS_CODE | PCIE_REVISION_ID,
>> +	       port->base + PCIE_CONF_REV_CLASS);
>> +	writel(EN7528_HOST_MODE, port->base);
>> +
>> +	link_mask = (port->slot == 0) ? EN7528_RC0_LINKUP : EN7528_RC1_LINKUP;
>> +
>> +	/* 100ms timeout value should be enough for Gen1/2 training */
>> +	err = regmap_read_poll_timeout(pcie->cfg, EN7528_LINKUP_REG, val,
>> +				       !!(val & link_mask), 20,
>> +				       PCI_PM_D3COLD_WAIT * USEC_PER_MSEC);
>> +	if (err) {
>> +		dev_err(pcie->dev, "EN7528: port%d link timeout\n", port->slot);
>> +		return -ETIMEDOUT;
>> +	}
>> +
>> +	/* Activate INTx interrupts */
>> +	val = readl(port->base + PCIE_INT_MASK);
>> +	val &= ~INTX_MASK;
>> +	writel(val, port->base + PCIE_INT_MASK);
>> +
>> +	if (IS_ENABLED(CONFIG_PCI_MSI))
>> +		mtk_pcie_enable_msi(port);
>> +
>> +	/* Set AHB to PCIe translation windows */
>> +	val = lower_32_bits(mem->start) |
>> +	      AHB2PCIE_SIZE(fls(resource_size(mem)));
>> +	writel(val, port->base + PCIE_AHB_TRANS_BASE0_L);
>> +
>> +	val = upper_32_bits(mem->start);
>> +	writel(val, port->base + PCIE_AHB_TRANS_BASE0_H);
>> +
>> +	writel(WIN_ENABLE, port->base + PCIE_AXI_WINDOW0);
>> +
>> +	return 0;
>> +}
>> +
>>   static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
>>   				      unsigned int devfn, int where)
>>   {
>> @@ -1149,6 +1234,46 @@ static int mtk_pcie_probe(struct platform_device *pdev)
>>   	if (err)
>>   		goto put_resources;
>>   
>> +	/* EN7528 PCIe initially comes up as Gen1 even if Gen2 is supported.
>> +	 * The cannonical way to achieve Gen2 is to re-train the link
>> +	 * immediately after setup. However, to save a lot of duplicated code
>> +	 * we use pcie_retrain_link() which is usable once we have the pci_dev
>> +	 * struct for the bridge, i.e. after pci_host_probe(). */
> Use below style:
>
> 	/*
> 	 * ...
> 	 */


Right, sorry, thanks.


>> +	if (pcie->soc->quirks & MTK_PCIE_RETRAIN) {
>> +		int slot = of_get_pci_domain_nr(dev->of_node);
> The returned value is not the slot number, but domain number. Both are different
> numbering schemes.
>
>> +		struct pci_dev *rc = NULL;
>> +		int ret = -ENOENT;
>> +
>> +		if (slot >= 0)
>> +			rc = pci_get_slot(host->bus, PCI_DEVFN(slot, 0));
> This looks wrong. If your intention is to find the Root Port of the hierarchy,
> then you should do:
>
> 		pci_get_slot(host->bus, PCI_DEVFN(0, 0));


Thank you for your review. What's happening here is the hardware exposes 
two sets of registers for the two devices, but it expects that they 
might all be controlled by one driver instance - so they hard-wired the 
second root hub to slot 1. The Mediatek driver here wants to be 
instantiated twice, so we end up with something like this:


0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 0810 (rev 03)
0000:01:00.0 Network controller: MEDIATEK Corp. MT7662E 802.11ac PCI 
Express Wireless Network Adapter
0001:00:01.0 PCI bridge: MEDIATEK Corp. Device 0811 (rev 02)
0001:01:00.0 Network controller: MEDIATEK Corp. MT7603E 802.11bgn PCI 
Express Wireless Network Adapter

So when it's domain 1, it's also slot 1 (unless the DT is written 
backwards).


The original code from Ahmed Naseef used a loop with pci_get_class() to 
get all of the bridges that were on the right bus, but it was pointed 
out in an earlier review that this would also re-train any hypothetical 
bridge downstream of the root. So the current code specifically 
re-trains the right bridge.

I can re-send with this explanation wrapped up in the comment, or I 
guess I could write a loop that tries slot 0 and 1 to find the bridge, 
but I feel like the loop is a bit hair-splitting so I think my 
preference would be to just explain it better.

WDYT?

Caleb


>
> - Mani
>


^ permalink raw reply

* Re: [PATCH v2] drm/mediatek: hdmi: Convert DRM_ERROR() to drm_err()
From: Chun-Kuang Hu @ 2026-05-13 14:44 UTC (permalink / raw)
  To: sai madhu
  Cc: Chun-Kuang Hu, Philipp Zabel, dri-devel, linux-mediatek,
	linux-kernel, linux-arm-kernel
In-Reply-To: <20260420064544.266478-1-suryasaimadhu369@gmail.com>

Hi, sai:

sai madhu <suryasaimadhu369@gmail.com> 於 2026年4月20日週一 上午6:45寫道:
>
> The DRM_ERROR() macro is deprecated in favor of drm_err() which
> provides device-specific logging.
>
> Replace DRM_ERROR() with drm_err() in the Mediatek HDMI bridge
> driver and pass the drm_device pointer via bridge->dev.
>
> No functional change intended.

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

>
> Signed-off-by: sai madhu <suryasaimadhu369@gmail.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index 1ea259854780..4ddcdbf7bc8c 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -981,8 +981,8 @@ static int mtk_hdmi_bridge_attach(struct drm_bridge *bridge,
>         int ret;
>
>         if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) {
> -               DRM_ERROR("%s: The flag DRM_BRIDGE_ATTACH_NO_CONNECTOR must be supplied\n",
> -                         __func__);
> +               drm_err(bridge->dev,
> +                       "DRM_BRIDGE_ATTACH_NO_CONNECTOR must be supplied\n");
>                 return -EINVAL;
>         }
>
> --
> 2.34.1
>


^ permalink raw reply

* Re: [PATCH] drm/mediatek: simplify mtk_crtc allocation
From: Chun-Kuang Hu @ 2026-05-13 14:53 UTC (permalink / raw)
  To: Rosen Penev
  Cc: dri-devel, Chun-Kuang Hu, Philipp Zabel, David Airlie,
	Simona Vetter, Matthias Brugger, AngeloGioacchino Del Regno,
	moderated list:DRM DRIVERS FOR MEDIATEK,
	open list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support
In-Reply-To: <20260331002357.7995-1-rosenp@gmail.com>

Hi, Rosen:

Rosen Penev <rosenp@gmail.com> 於 2026年3月31日週二 上午12:24寫道:
>
> Use a flexible array member to combine allocations.

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_crtc.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_crtc.c b/drivers/gpu/drm/mediatek/mtk_crtc.c
> index fcb16f3f7b23..914841d2396e 100644
> --- a/drivers/gpu/drm/mediatek/mtk_crtc.c
> +++ b/drivers/gpu/drm/mediatek/mtk_crtc.c
> @@ -62,7 +62,6 @@ struct mtk_crtc {
>         struct device                   *dma_dev;
>         struct mtk_mutex                *mutex;
>         unsigned int                    ddp_comp_nr;
> -       struct mtk_ddp_comp             **ddp_comp;
>         unsigned int                    num_conn_routes;
>         const struct mtk_drm_route      *conn_routes;
>
> @@ -71,6 +70,8 @@ struct mtk_crtc {
>         bool                            config_updating;
>         /* lock for config_updating to cmd buffer */
>         spinlock_t                      config_lock;
> +
> +       struct mtk_ddp_comp             *ddp_comp[];
>  };
>
>  struct mtk_crtc_state {
> @@ -1048,18 +1049,12 @@ int mtk_crtc_create(struct drm_device *drm_dev, const unsigned int *path,
>                 }
>         }
>
> -       mtk_crtc = devm_kzalloc(dev, sizeof(*mtk_crtc), GFP_KERNEL);
> +       mtk_crtc = devm_kzalloc(dev, struct_size(mtk_crtc, ddp_comp, path_len + (conn_routes ? 1 : 0)), GFP_KERNEL);
>         if (!mtk_crtc)
>                 return -ENOMEM;
>
> -       mtk_crtc->mmsys_dev = priv->mmsys_dev;
>         mtk_crtc->ddp_comp_nr = path_len;
> -       mtk_crtc->ddp_comp = devm_kcalloc(dev,
> -                                         mtk_crtc->ddp_comp_nr + (conn_routes ? 1 : 0),
> -                                         sizeof(*mtk_crtc->ddp_comp),
> -                                         GFP_KERNEL);
> -       if (!mtk_crtc->ddp_comp)
> -               return -ENOMEM;
> +       mtk_crtc->mmsys_dev = priv->mmsys_dev;
>
>         mtk_crtc->mutex = mtk_mutex_get(priv->mutex_dev);
>         if (IS_ERR(mtk_crtc->mutex)) {
> --
> 2.53.0
>


^ permalink raw reply

* Re: [PATCH] drm/mediatek: mtk_dpi: Open-code drm_simple_encoder_init()
From: Chun-Kuang Hu @ 2026-05-13 14:59 UTC (permalink / raw)
  To: shivamkalra98
  Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
	Matthias Brugger, AngeloGioacchino Del Regno, Thomas Zimmermann,
	dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel
In-Reply-To: <20260403-drm-mediatek-opencode-encoder-init-v1-1-7be86241b876@zohomail.in>

Hi, Shivam:

Shivam Kalra via B4 Relay
<devnull+shivamkalra98.zohomail.in@kernel.org> 於 2026年4月3日週五
下午12:00寫道:
>
> From: Shivam Kalra <shivamkalra98@zohomail.in>
>
> The helper drm_simple_encoder_init() is a trivial wrapper around
> drm_encoder_init() that only provides a static drm_encoder_funcs with
> .destroy set to drm_encoder_cleanup(). Open-code the initialization
> with a driver-specific instance of drm_encoder_funcs and remove the
> dependency on drm_simple_kms_helper.

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

>
> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Shivam Kalra <shivamkalra98@zohomail.in>
> ---
> Addresses the "Open-code drm_simple_encoder_init()" task from
> Documentation/gpu/todo.rst.
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 53360b5d12ba..5b83ca6aecb2 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -25,8 +25,8 @@
>  #include <drm/drm_bridge_connector.h>
>  #include <drm/drm_crtc.h>
>  #include <drm/drm_edid.h>
> +#include <drm/drm_encoder.h>
>  #include <drm/drm_of.h>
> -#include <drm/drm_simple_kms_helper.h>
>
>  #include "mtk_ddp_comp.h"
>  #include "mtk_disp_drv.h"
> @@ -993,6 +993,10 @@ static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
>         .debugfs_init = mtk_dpi_debugfs_init,
>  };
>
> +static const struct drm_encoder_funcs mtk_dpi_encoder_funcs = {
> +       .destroy = drm_encoder_cleanup,
> +};
> +
>  void mtk_dpi_start(struct device *dev)
>  {
>         struct mtk_dpi *dpi = dev_get_drvdata(dev);
> @@ -1026,8 +1030,8 @@ static int mtk_dpi_bind(struct device *dev, struct device *master, void *data)
>         int ret;
>
>         dpi->mmsys_dev = priv->mmsys_dev;
> -       ret = drm_simple_encoder_init(drm_dev, &dpi->encoder,
> -                                     DRM_MODE_ENCODER_TMDS);
> +       ret = drm_encoder_init(drm_dev, &dpi->encoder, &mtk_dpi_encoder_funcs,
> +                              DRM_MODE_ENCODER_TMDS, NULL);
>         if (ret) {
>                 dev_err(dev, "Failed to initialize decoder: %d\n", ret);
>                 return ret;
>
> ---
> base-commit: 4b9c36c83b34f710da9573291404f6a2246251c1
> change-id: 20260403-drm-mediatek-opencode-encoder-init-36336e4c4ff3
>
> Best regards,
> --
> Shivam Kalra <shivamkalra98@zohomail.in>
>
>


^ permalink raw reply

* [PATCH net-next] net: airoha: Reserve RX headroom to avoid skb reallocation
From: Lorenzo Bianconi @ 2026-05-13 15:03 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Lorenzo Bianconi
  Cc: linux-arm-kernel, linux-mediatek, netdev, Xuegang Lu

Reserve NET_SKB_PAD + NET_IP_ALIGN bytes of headroom for received packets
to avoid skb head reallocation when pushing protocol headers into the skb.

Tested-by: Xuegang Lu <xuegang.lu@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/airoha/airoha_eth.c | 14 ++++++++------
 drivers/net/ethernet/airoha/airoha_eth.h |  2 ++
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
index f71fb18197ec..5a027cc7ffcb 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -543,9 +543,10 @@ static int airoha_qdma_fill_rx_queue(struct airoha_queue *q)
 		q->queued++;
 		nframes++;
 
+		offset += AIROHA_RX_HEADROOM;
 		e->buf = page_address(page) + offset;
 		e->dma_addr = page_pool_get_dma_addr(page) + offset;
-		e->dma_len = SKB_WITH_OVERHEAD(q->buf_size);
+		e->dma_len = SKB_WITH_OVERHEAD(AIROHA_RX_LEN(q->buf_size));
 
 		val = FIELD_PREP(QDMA_DESC_LEN_MASK, e->dma_len);
 		WRITE_ONCE(desc->ctrl, cpu_to_le32(val));
@@ -611,13 +612,12 @@ static int airoha_qdma_rx_process(struct airoha_queue *q, int budget)
 		q->tail = (q->tail + 1) % q->ndesc;
 		q->queued--;
 
-		dma_sync_single_for_cpu(eth->dev, e->dma_addr,
-					SKB_WITH_OVERHEAD(q->buf_size), dir);
+		dma_sync_single_for_cpu(eth->dev, e->dma_addr, e->dma_len,
+					dir);
 
 		page = virt_to_head_page(e->buf);
 		len = FIELD_GET(QDMA_DESC_LEN_MASK, desc_ctrl);
-		data_len = q->skb ? q->buf_size
-				  : SKB_WITH_OVERHEAD(q->buf_size);
+		data_len = q->skb ? AIROHA_RX_LEN(q->buf_size) : e->dma_len;
 		if (!len || data_len < len)
 			goto free_frag;
 
@@ -627,10 +627,12 @@ static int airoha_qdma_rx_process(struct airoha_queue *q, int budget)
 
 		port = eth->ports[p];
 		if (!q->skb) { /* first buffer */
-			q->skb = napi_build_skb(e->buf, q->buf_size);
+			q->skb = napi_build_skb(e->buf - AIROHA_RX_HEADROOM,
+						q->buf_size);
 			if (!q->skb)
 				goto free_frag;
 
+			skb_reserve(q->skb, AIROHA_RX_HEADROOM);
 			__skb_put(q->skb, len);
 			skb_mark_for_recycle(q->skb);
 			q->skb->dev = port->dev;
diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
index 58530d096de7..d3781103abb5 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.h
+++ b/drivers/net/ethernet/airoha/airoha_eth.h
@@ -32,6 +32,8 @@
 #define AIROHA_FE_MC_MAX_VLAN_TABLE	64
 #define AIROHA_FE_MC_MAX_VLAN_PORT	16
 #define AIROHA_NUM_TX_IRQ		2
+#define AIROHA_RX_HEADROOM		(NET_SKB_PAD + NET_IP_ALIGN)
+#define AIROHA_RX_LEN(_n)		((_n) - AIROHA_RX_HEADROOM)
 #define HW_DSCP_NUM			2048
 #define IRQ_QUEUE_LEN(_n)		((_n) ? 1024 : 2048)
 #define TX_DSCP_NUM			1024

---
base-commit: 8ebd24a7822cbae25beeafba49b2159d6a68a5f2
change-id: 20260513-airoha-rx-headroom-4d19ca848a14

Best regards,
-- 
Lorenzo Bianconi <lorenzo@kernel.org>



^ permalink raw reply related

* Re: [PATCH v5 2/2] PCI: mediatek: Add support for EcoNet EN7528 SoC
From: Manivannan Sadhasivam @ 2026-05-13 15:15 UTC (permalink / raw)
  To: Caleb James DeLisle
  Cc: linux-pci, linux-mips, naseefkm, ryder.lee, helgaas, lpieralisi,
	kwilczynski, robh, krzk+dt, conor+dt, matthias.bgg,
	angelogioacchino.delregno, ansuelsmth, linux-mediatek, devicetree,
	linux-kernel
In-Reply-To: <a4f84ba5-fe28-4674-b91b-33438f5478fb@cjdns.fr>

On Wed, May 13, 2026 at 04:31:32PM +0200, Caleb James DeLisle wrote:
> 
> On 12/05/2026 13:55, Manivannan Sadhasivam wrote:
> > On Mon, Apr 13, 2026 at 02:03:39PM +0000, Caleb James DeLisle wrote:
> > > Add support for the PCIe present on the EcoNet EN7528 (and EN751221) SoCs.
> > > 
> > > These SoCs have a mix of Gen1 and Gen2 capable ports, but the Gen2 ports
> > > require re-training after startup.
> > > 
> > > Co-developed-by: Ahmed Naseef <naseefkm@gmail.com>
> > > Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
> > > Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
> > > ---
> > >   drivers/pci/controller/Kconfig         |   2 +-
> > >   drivers/pci/controller/pcie-mediatek.c | 133 +++++++++++++++++++++++++
> > >   2 files changed, 134 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> > > index 686349e09cd3..5808d5e407fd 100644
> > > --- a/drivers/pci/controller/Kconfig
> > > +++ b/drivers/pci/controller/Kconfig
> > > @@ -209,7 +209,7 @@ config PCI_MVEBU
> > >   config PCIE_MEDIATEK
> > >   	tristate "MediaTek PCIe controller"
> > > -	depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST
> > > +	depends on ARCH_AIROHA || ARCH_MEDIATEK || ECONET || COMPILE_TEST
> > >   	depends on OF
> > >   	depends on PCI_MSI
> > >   	select IRQ_MSI_LIB
> > > diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
> > > index 75722524fe74..915a35825ce1 100644
> > > --- a/drivers/pci/controller/pcie-mediatek.c
> > > +++ b/drivers/pci/controller/pcie-mediatek.c
> > > @@ -7,6 +7,7 @@
> > >    *	   Honghui Zhang <honghui.zhang@mediatek.com>
> > >    */
> > > +#include <asm-generic/errno-base.h>
> > >   #include <linux/clk.h>
> > >   #include <linux/delay.h>
> > >   #include <linux/iopoll.h>
> > > @@ -14,6 +15,7 @@
> > >   #include <linux/irqchip/chained_irq.h>
> > >   #include <linux/irqchip/irq-msi-lib.h>
> > >   #include <linux/irqdomain.h>
> > > +#include <linux/kconfig.h>
> > >   #include <linux/kernel.h>
> > >   #include <linux/mfd/syscon.h>
> > >   #include <linux/msi.h>
> > > @@ -77,6 +79,7 @@
> > >   #define PCIE_CONF_VEND_ID	0x100
> > >   #define PCIE_CONF_DEVICE_ID	0x102
> > > +#define PCIE_CONF_REV_CLASS	0x104
> > >   #define PCIE_CONF_CLASS_ID	0x106
> > >   #define PCIE_INT_MASK		0x420
> > > @@ -89,6 +92,11 @@
> > >   #define MSI_MASK		BIT(23)
> > >   #define MTK_MSI_IRQS_NUM	32
> > > +#define EN7528_HOST_MODE	0x00804201
> > > +#define EN7528_LINKUP_REG	0x50
> > > +#define EN7528_RC0_LINKUP	BIT(1)
> > > +#define EN7528_RC1_LINKUP	BIT(2)
> > > +
> > >   #define PCIE_AHB_TRANS_BASE0_L	0x438
> > >   #define PCIE_AHB_TRANS_BASE0_H	0x43c
> > >   #define AHB2PCIE_SIZE(x)	((x) & GENMASK(4, 0))
> > > @@ -148,12 +156,15 @@ struct mtk_pcie_port;
> > >    * @MTK_PCIE_FIX_DEVICE_ID: host's device ID needed to be fixed
> > >    * @MTK_PCIE_NO_MSI: Bridge has no MSI support, and relies on an external block
> > >    * @MTK_PCIE_SKIP_RSTB: Skip calling RSTB bits on PCIe probe
> > > + * @MTK_PCIE_RETRAIN: Re-train link to bridge after startup because some
> > > + *                    Gen2-capable devices start as Gen1.
> > >    */
> > >   enum mtk_pcie_quirks {
> > >   	MTK_PCIE_FIX_CLASS_ID = BIT(0),
> > >   	MTK_PCIE_FIX_DEVICE_ID = BIT(1),
> > >   	MTK_PCIE_NO_MSI = BIT(2),
> > >   	MTK_PCIE_SKIP_RSTB = BIT(3),
> > > +	MTK_PCIE_RETRAIN = BIT(4),
> > >   };
> > >   /**
> > > @@ -753,6 +764,80 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
> > >   	return 0;
> > >   }
> > > +static int mtk_pcie_startup_port_en7528(struct mtk_pcie_port *port)
> > > +{
> > > +	struct mtk_pcie *pcie = port->pcie;
> > > +	struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
> > > +	struct resource *mem = NULL;
> > > +	struct resource_entry *entry;
> > > +	u32 val, link_mask;
> > > +	int err;
> > > +
> > > +	entry = resource_list_first_type(&host->windows, IORESOURCE_MEM);
> > > +	if (entry)
> > > +		mem = entry->res;
> > > +	if (!mem)
> > > +		return -EINVAL;
> > > +
> > > +	if (!pcie->cfg) {
> > > +		dev_err(pcie->dev, "EN7528: pciecfg syscon not available\n");
> > > +		return -EINVAL;
> > > +	}
> > > +
> > > +	/* Assert all reset signals */
> > > +	writel(0, port->base + PCIE_RST_CTRL);
> > > +
> > > +	/*
> > > +	 * Enable PCIe link down reset, if link status changed from link up to
> > > +	 * link down, this will reset MAC control registers and configuration
> > > +	 * space.
> > > +	 */
> > > +	writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
> > > +
> > > +	msleep(PCIE_T_PVPERL_MS);
> > > +
> > > +	/* De-assert PHY, PE, PIPE, MAC and configuration reset */
> > > +	val = readl(port->base + PCIE_RST_CTRL);
> > > +	val |= PCIE_PHY_RSTB | PCIE_PERSTB | PCIE_PIPE_SRSTB |
> > > +	       PCIE_MAC_SRSTB | PCIE_CRSTB;
> > > +	writel(val, port->base + PCIE_RST_CTRL);
> > > +
> > > +	writel(PCIE_CLASS_CODE | PCIE_REVISION_ID,
> > > +	       port->base + PCIE_CONF_REV_CLASS);
> > > +	writel(EN7528_HOST_MODE, port->base);
> > > +
> > > +	link_mask = (port->slot == 0) ? EN7528_RC0_LINKUP : EN7528_RC1_LINKUP;
> > > +
> > > +	/* 100ms timeout value should be enough for Gen1/2 training */
> > > +	err = regmap_read_poll_timeout(pcie->cfg, EN7528_LINKUP_REG, val,
> > > +				       !!(val & link_mask), 20,
> > > +				       PCI_PM_D3COLD_WAIT * USEC_PER_MSEC);
> > > +	if (err) {
> > > +		dev_err(pcie->dev, "EN7528: port%d link timeout\n", port->slot);
> > > +		return -ETIMEDOUT;
> > > +	}
> > > +
> > > +	/* Activate INTx interrupts */
> > > +	val = readl(port->base + PCIE_INT_MASK);
> > > +	val &= ~INTX_MASK;
> > > +	writel(val, port->base + PCIE_INT_MASK);
> > > +
> > > +	if (IS_ENABLED(CONFIG_PCI_MSI))
> > > +		mtk_pcie_enable_msi(port);
> > > +
> > > +	/* Set AHB to PCIe translation windows */
> > > +	val = lower_32_bits(mem->start) |
> > > +	      AHB2PCIE_SIZE(fls(resource_size(mem)));
> > > +	writel(val, port->base + PCIE_AHB_TRANS_BASE0_L);
> > > +
> > > +	val = upper_32_bits(mem->start);
> > > +	writel(val, port->base + PCIE_AHB_TRANS_BASE0_H);
> > > +
> > > +	writel(WIN_ENABLE, port->base + PCIE_AXI_WINDOW0);
> > > +
> > > +	return 0;
> > > +}
> > > +
> > >   static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
> > >   				      unsigned int devfn, int where)
> > >   {
> > > @@ -1149,6 +1234,46 @@ static int mtk_pcie_probe(struct platform_device *pdev)
> > >   	if (err)
> > >   		goto put_resources;
> > > +	/* EN7528 PCIe initially comes up as Gen1 even if Gen2 is supported.
> > > +	 * The cannonical way to achieve Gen2 is to re-train the link
> > > +	 * immediately after setup. However, to save a lot of duplicated code
> > > +	 * we use pcie_retrain_link() which is usable once we have the pci_dev
> > > +	 * struct for the bridge, i.e. after pci_host_probe(). */
> > Use below style:
> > 
> > 	/*
> > 	 * ...
> > 	 */
> 
> 
> Right, sorry, thanks.
> 
> 
> > > +	if (pcie->soc->quirks & MTK_PCIE_RETRAIN) {
> > > +		int slot = of_get_pci_domain_nr(dev->of_node);
> > The returned value is not the slot number, but domain number. Both are different
> > numbering schemes.
> > 
> > > +		struct pci_dev *rc = NULL;
> > > +		int ret = -ENOENT;
> > > +
> > > +		if (slot >= 0)
> > > +			rc = pci_get_slot(host->bus, PCI_DEVFN(slot, 0));
> > This looks wrong. If your intention is to find the Root Port of the hierarchy,
> > then you should do:
> > 
> > 		pci_get_slot(host->bus, PCI_DEVFN(0, 0));
> 
> 
> Thank you for your review. What's happening here is the hardware exposes two
> sets of registers for the two devices, but it expects that they might all be
> controlled by one driver instance - so they hard-wired the second root hub
> to slot 1. The Mediatek driver here wants to be instantiated twice, so we
> end up with something like this:
> 
> 
> 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 0810 (rev 03)
> 0000:01:00.0 Network controller: MEDIATEK Corp. MT7662E 802.11ac PCI Express
> Wireless Network Adapter
> 0001:00:01.0 PCI bridge: MEDIATEK Corp. Device 0811 (rev 02)
> 0001:01:00.0 Network controller: MEDIATEK Corp. MT7603E 802.11bgn PCI
> Express Wireless Network Adapter
> 
> So when it's domain 1, it's also slot 1 (unless the DT is written
> backwards).
> 

Oops! Thanks for the explanation.

> 
> The original code from Ahmed Naseef used a loop with pci_get_class() to get
> all of the bridges that were on the right bus, but it was pointed out in an
> earlier review that this would also re-train any hypothetical bridge
> downstream of the root. So the current code specifically re-trains the right
> bridge.
> 
> I can re-send with this explanation wrapped up in the comment, or I guess I
> could write a loop that tries slot 0 and 1 to find the bridge, but I feel
> like the loop is a bit hair-splitting so I think my preference would be to
> just explain it better.
> 
> WDYT?
> 

Adding comments with the above info would suffice.

- Mani

-- 
மணிவண்ணன் சதாசிவம்


^ permalink raw reply

* Re: [PATCH v5 2/2] PCI: mediatek: Add support for EcoNet EN7528 SoC
From: Caleb James DeLisle @ 2026-05-13 15:43 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-mips, naseefkm, ryder.lee, lpieralisi,
	kwilczynski, mani, robh, krzk+dt, conor+dt, matthias.bgg,
	angelogioacchino.delregno, ansuelsmth, linux-mediatek, devicetree,
	linux-kernel
In-Reply-To: <20260512165530.GA228087@bhelgaas>


On 12/05/2026 18:55, Bjorn Helgaas wrote:
> On Mon, Apr 13, 2026 at 02:03:39PM +0000, Caleb James DeLisle wrote:
>> Add support for the PCIe present on the EcoNet EN7528 (and EN751221) SoCs.
>>
>> These SoCs have a mix of Gen1 and Gen2 capable ports, but the Gen2 ports
>> require re-training after startup.
>> +#include <asm-generic/errno-base.h>
> Looks odd; why is this here?  There are basically no other drivers
> that do this.


Whoops :facepalm:, must have been coding in my sleep and I wanted ENOENT.


>
>> @@ -1149,6 +1234,46 @@ static int mtk_pcie_probe(struct platform_device *pdev)
>>   	if (err)
>>   		goto put_resources;
>>   
>> +	/* EN7528 PCIe initially comes up as Gen1 even if Gen2 is supported.
>> +	 * The cannonical way to achieve Gen2 is to re-train the link
>> +	 * immediately after setup. However, to save a lot of duplicated code
>> +	 * we use pcie_retrain_link() which is usable once we have the pci_dev
>> +	 * struct for the bridge, i.e. after pci_host_probe(). */
> s/cannonical/canonical/
OK
>
>> +	if (pcie->soc->quirks & MTK_PCIE_RETRAIN) {
>> +		int slot = of_get_pci_domain_nr(dev->of_node);
> I suppose of_get_pci_domain_nr() is sort of an implicit way to
> identify the Gen2 ports?  Worth at least a comment about this DT
> connection.  Maybe it could be replaced by using
> pcie_get_supported_speeds() or similar?


The explanation for this is here: 
https://lore.kernel.org/linux-mips/20260413140339.16238-1-cjd@cjdns.fr/T/#m6d893b861425378c0d094a142e6191d59dcc5192 
- and please do weigh in if you think I ought to change the logic there.


However you raise a good point about re-training Gen1 links, currently 
we're attempting to re-train everything. All of these hubs self-identify 
as Gen2 so we can't short-circuit with pcie_get_supported_speeds(). 
Re-training will remain at Gen1 if either the PHY is a Gen1-only PHY, or 
if the actual card (e.g. wifi chip) only supports Gen1. My feeling is 
that matching on the PHY DT node and short-circuiting is not a good 
idea, but I can improve the comment a bit.


>
>> +		struct pci_dev *rc = NULL;
> s/rc/rp/ to avoid confusing "root port" for "return code" or "root
> complex".
OK
>
>> +		int ret = -ENOENT;
>> +
>> +		if (slot >= 0)
>> +			rc = pci_get_slot(host->bus, PCI_DEVFN(slot, 0));
> Instead of fiddling with pci_get_slot(), which adds refcount issues
> and artificial device/function number dependencies, I think it would
> be better to iterate over the devices on host->bus, e.g., with
> "for_each_pci_bridge(dev, host->bus)" as in iproc_pcie_setup().
Oh great, thank you !
>
>> +		if (rc) {
>> +			ret = -EOPNOTSUPP;
>> +
>> +			/* pcie_retrain_link() is not an exported symbol but
>> +			 * this driver supports being built as a loadable
>> +			 * module. Someone using this on an EN7528 should make
>> +			 * it builtin, or accept Gen1 PCI. */
>> +#if IS_BUILTIN(CONFIG_PCIE_MEDIATEK)
>> +			ret = pcie_retrain_link(rc, true);
>> +#endif
> This looks like a confusing user experience if built as a module, with
> no hint to the user about why the link is slower than it should be.
> I guess "failed to retrain" is a bit of a hint, but it's not really a
> clue about how to fix it.
My logic was that the person whose going to configure a kernel for one 
of these things is pretty advanced - probably an OpenWRT developer - so 
they don't need that much hand-holding. But I guess it doesn't cost that 
much to add an `if (!IS_BUILTIN(CONFIG_PCIE_MEDIATEK))` with a warning log.
>
>> +		}
>> +
>> +		if (ret) {
>> +			dev_info(dev, "port%d failed to retrain %pe\n", slot,
>> +				 ERR_PTR(ret));
> This is basically an error path and there's nothing else to do, so if
> you return directly here (especially if you factor this to a separate
> function), the "normal" path below can be unindented.
Indeed, and if "not a builtin" is handled separately then this is truly 
an unexpected error so it's quite reasonable to goto put_resources.
>
>> +		} else {
>> +			u16 lnksta;
>> +			u32 speed;
>> +
>> +			pcie_capability_read_word(rc, PCI_EXP_LNKSTA, &lnksta);
>> +			speed = lnksta & PCI_EXP_LNKSTA_CLS;
>> +
>> +			dev_info(dev, "port%d link retrained, speed %s\n", slot,
>> +				 pci_speed_string(pcie_link_speed[speed]));
>> +		}
>> +	}
> Maybe factor the retrain block into a helper function.
Makes sense.
> I'm sort of squinting at this whole link retrain thing to begin with.
> After the controller is configured correctly, the hardware is supposed
> to train the link automatically by itself.
>
> Did something change between mtk_pcie_startup_port_en7528() and now
> that means the link will train at Gen2?  Whatever that change is,
> could it be done in mtk_pcie_startup_port_en7528()?
Per the comment with the misspelled "canonical", the reference code 
finds and pokes the re-training registers immediately during setup, but 
doing that manually is a fair bit of code and it's nicer to wait until 
the registers are mapped and use pcie_retrain_link().
> What happens when the downstream device is put in D3cold and the link
> retrains after power is restored?  Does it train at Gen2 then, without
> assistance like this?

I just tried pulling the driver from the wifi and then unbinding the 
bridge, then re-scanning. All throughout the process current_link_speed 
remains at 5.0. You're much more knowledgeable in this than me, but if I 
had a guess, I'd say this was a hardware bug that was fixed in 
subsequent versions (MT7621) and the workaround was to do a retrain once 
immediately after setup. But I don't want to warrant that as true 
because it's just me guessing...


Thanks,

Caleb




^ permalink raw reply

* [PATCH v1 0/2] ASoC: Rework initialization of i2c_device_ids
From: Uwe Kleine-König (The Capable Hub) @ 2026-05-13 17:23 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Jaroslav Kysela, Takashi Iwai, Oder Chiou, Charles Keepax,
	Kuninori Morimoto, linux-sound, linux-kernel, patches,
	David Rhodes, Richard Fitzgerald, Shenghao Ding, Kevin Lu,
	Baojun Xu, Lars-Peter Clausen, Nuno Sá, Martin Povišer,
	Support Opensource, Nick Li, M R Swami Reddy, Vishwas A Deshpande,
	Peter Rosin, Matthias Brugger, AngeloGioacchino Del Regno,
	Fabio Estevam, Kiseok Jo, Kevin Cernekee, Steven Eckhoff,
	Thorsten Blum, Chris Morgan, Dan Carpenter, Marco Crivellari,
	Weidong Wang, Aaron Kling, Teguh Sobirin, Luca Weiss,
	Bharadwaj Raju, Hsieh Hung-En, Binbin Zhou, Shimrra Shai,
	Zhang Yi, Krzysztof Kozlowski, Srinivas Kandagatla, Qasim Ijaz,
	Sharique Mohammad, Chen Ni, Neo Chang, Cezary Rojewski,
	Cristian Ciocaltea, Kees Cook, Qianfeng Rong, Tim Bird,
	Bram Vlerick, Peter Korsgaard, Linus Walleij, Wenyuan Li,
	Bartosz Golaszewski, Shengjiu Wang, Sebastian Krzyszkowiak,
	Xichao Zhao, asahi, linux-arm-kernel, linux-mediatek,
	Markus Schneider-Pargmann

Hello,

this series is a preparation for

	diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
	index 23ff24080dfd..aebd3a5e90af 100644
	--- a/include/linux/mod_devicetable.h
	+++ b/include/linux/mod_devicetable.h
	@@ -477,7 +477,11 @@ struct rpmsg_device_id {
	 
	 struct i2c_device_id {
		char name[I2C_NAME_SIZE];
	-	kernel_ulong_t driver_data;	/* Data private to the driver */
	+	union {
	+		/* Data private to the driver */
	+		kernel_ulong_t driver_data;
	+		const void *driver_data_ptr;
	+	};
	 };
	 
	 /* pci_epf */

and this requires that .driver_data is assigned via a named initializer
for static data. This requirement isn't a bad one because named
initializers are also much better readable than list initializers.

The union added to struct i2c_device_id enables further cleanups like:

        diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
        index 8a082ff034dd..b2aac7348d22 100644
        --- a/drivers/iio/accel/kxcjk-1013.c
        +++ b/drivers/iio/accel/kxcjk-1013.c
	@@ -1429,7 +1429,7 @@ static int kxcjk1013_probe(struct i2c_client *client)
	 
		if (id) {
			name = id->name;
	-		data->info = (const struct kx_chipset_info *)(id->driver_data);
	+		data->info = id->driver_data_ptr;
		} else {
			name = iio_get_acpi_device_name_and_data(&client->dev, &ddata);
			data->info = ddata;
	@@ -1630,11 +1630,11 @@ static const struct dev_pm_ops kxcjk1013_pm_ops = {
	 };
	 
	 static const struct i2c_device_id kxcjk1013_id[] = {
	-	{ .name = "kxcjk1013", .driver_data = (kernel_ulong_t)&kxcjk1013_info },
	-	{ .name = "kxcj91008", .driver_data = (kernel_ulong_t)&kxcj91008_info },
	-	{ .name = "kxtj21009", .driver_data = (kernel_ulong_t)&kxtj21009_info },
	-	{ .name = "kxtf9", .driver_data = (kernel_ulong_t)&kxtf9_info },
	-	{ .name = "kx023-1025", .driver_data = (kernel_ulong_t)&kx0231025_info },
	+	{ .name = "kxcjk1013", .driver_data_ptr = &kxcjk1013_info },
	+	{ .name = "kxcj91008", .driver_data_ptr = &kxcj91008_info },
	+	{ .name = "kxtj21009", .driver_data_ptr = &kxtj21009_info },
	+	{ .name = "kxtf9", .driver_data_ptr = &kxtf9_info },
	+	{ .name = "kx023-1025", .driver_data_ptr = &kx0231025_info },
		{ }
	 };
	 MODULE_DEVICE_TABLE(i2c, kxcjk1013_id);

that are an improvement for readability (again!) and it keeps some
properties of the pointers (here: being const) without having to pay
attention for that. (I didn't find a good example in sound/soc, so an
iio driver was used to demonstrate the gain.)

My additional motivation for this effort is CHERI[1]. This is a hardware
extension that uses 128 bit pointers but unsigned long is still 64 bit.
So with CHERI you cannot store pointers in unsigned long variables.

The first patch drops a few empty remove callbacks that I found while
working on patch #2. The second converts all hwmon drivers to use named
initializers.

Best regards
Uwe

Uwe Kleine-König (The Capable Hub) (2):
  ASoC: Drop empty i2c remove callbacks
  ASoC: Use named initializers for arrays of i2c_device_data

 .../hda/codecs/side-codecs/cs35l41_hda_i2c.c  |  4 +-
 .../hda/codecs/side-codecs/cs35l56_hda_i2c.c  |  8 ++--
 .../hda/codecs/side-codecs/tas2781_hda_i2c.c  |  4 +-
 sound/soc/codecs/ad193x-i2c.c                 |  4 +-
 sound/soc/codecs/adau1372-i2c.c               |  2 +-
 sound/soc/codecs/adau1373.c                   |  2 +-
 sound/soc/codecs/adau1701.c                   |  8 ++--
 sound/soc/codecs/adau1761-i2c.c               |  8 ++--
 sound/soc/codecs/adau1781-i2c.c               |  4 +-
 sound/soc/codecs/adau1977-i2c.c               |  6 +--
 sound/soc/codecs/adau7118-i2c.c               |  4 +-
 sound/soc/codecs/adav803.c                    |  2 +-
 sound/soc/codecs/ak4118.c                     |  4 +-
 sound/soc/codecs/ak4535.c                     |  2 +-
 sound/soc/codecs/ak4613.c                     |  2 +-
 sound/soc/codecs/ak4619.c                     |  2 +-
 sound/soc/codecs/ak4642.c                     |  8 ++--
 sound/soc/codecs/ak4671.c                     |  2 +-
 sound/soc/codecs/alc5623.c                    |  8 ++--
 sound/soc/codecs/alc5632.c                    |  4 +-
 sound/soc/codecs/aw87390.c                    |  4 +-
 sound/soc/codecs/aw88081.c                    |  4 +-
 sound/soc/codecs/aw88166.c                    |  2 +-
 sound/soc/codecs/aw88261.c                    |  2 +-
 sound/soc/codecs/aw88395/aw88395.c            |  2 +-
 sound/soc/codecs/aw88399.c                    |  2 +-
 sound/soc/codecs/cs35l32.c                    |  4 +-
 sound/soc/codecs/cs35l33.c                    |  4 +-
 sound/soc/codecs/cs35l34.c                    |  4 +-
 sound/soc/codecs/cs35l35.c                    |  4 +-
 sound/soc/codecs/cs35l36.c                    |  4 +-
 sound/soc/codecs/cs35l41-i2c.c                | 10 ++---
 sound/soc/codecs/cs35l45-i2c.c                |  4 +-
 sound/soc/codecs/cs35l56-i2c.c                |  6 +--
 sound/soc/codecs/cs4265.c                     |  2 +-
 sound/soc/codecs/cs4270.c                     |  4 +-
 sound/soc/codecs/cs4271-i2c.c                 |  2 +-
 sound/soc/codecs/cs42l42-i2c.c                |  4 +-
 sound/soc/codecs/cs42l51-i2c.c                |  2 +-
 sound/soc/codecs/cs42l52.c                    |  2 +-
 sound/soc/codecs/cs42l56.c                    |  2 +-
 sound/soc/codecs/cs42l73.c                    |  4 +-
 sound/soc/codecs/cs42l84.c                    |  4 +-
 sound/soc/codecs/cs42xx8-i2c.c                |  6 +--
 sound/soc/codecs/cs43130.c                    | 10 ++---
 sound/soc/codecs/cs4341.c                     |  2 +-
 sound/soc/codecs/cs4349.c                     |  4 +-
 sound/soc/codecs/cs530x-i2c.c                 | 14 +++---
 sound/soc/codecs/cs53l30.c                    |  4 +-
 sound/soc/codecs/cx2072x.c                    |  6 +--
 sound/soc/codecs/da7210.c                     |  2 +-
 sound/soc/codecs/da7213.c                     |  2 +-
 sound/soc/codecs/da7218.c                     |  4 +-
 sound/soc/codecs/da7219.c                     |  2 +-
 sound/soc/codecs/da732x.c                     |  2 +-
 sound/soc/codecs/da9055.c                     |  2 +-
 sound/soc/codecs/es8311.c                     |  2 +-
 sound/soc/codecs/es8316.c                     |  4 +-
 sound/soc/codecs/es8323.c                     |  2 +-
 sound/soc/codecs/es8326.c                     |  4 +-
 sound/soc/codecs/es8328-i2c.c                 |  4 +-
 sound/soc/codecs/es8375.c                     |  2 +-
 sound/soc/codecs/es8389.c                     |  2 +-
 sound/soc/codecs/fs210x.c                     |  6 +--
 sound/soc/codecs/isabelle.c                   |  2 +-
 sound/soc/codecs/lm4857.c                     |  2 +-
 sound/soc/codecs/lm49453.c                    |  2 +-
 sound/soc/codecs/max9768.c                    |  2 +-
 sound/soc/codecs/max98088.c                   |  4 +-
 sound/soc/codecs/max98090.c                   |  4 +-
 sound/soc/codecs/max98095.c                   |  2 +-
 sound/soc/codecs/max98371.c                   |  2 +-
 sound/soc/codecs/max98373-i2c.c               |  4 +-
 sound/soc/codecs/max98388.c                   |  4 +-
 sound/soc/codecs/max98390.c                   |  4 +-
 sound/soc/codecs/max98396.c                   |  6 +--
 sound/soc/codecs/max9850.c                    |  2 +-
 sound/soc/codecs/max98504.c                   |  2 +-
 sound/soc/codecs/max98520.c                   |  4 +-
 sound/soc/codecs/max9860.c                    |  2 +-
 sound/soc/codecs/max9867.c                    |  2 +-
 sound/soc/codecs/max9877.c                    |  2 +-
 sound/soc/codecs/max98925.c                   |  2 +-
 sound/soc/codecs/max98926.c                   |  2 +-
 sound/soc/codecs/max98927.c                   |  4 +-
 sound/soc/codecs/ml26124.c                    |  2 +-
 sound/soc/codecs/mt6660.c                     |  4 +-
 sound/soc/codecs/nau8325.c                    |  2 +-
 sound/soc/codecs/nau8540.c                    |  2 +-
 sound/soc/codecs/nau8810.c                    |  6 +--
 sound/soc/codecs/nau8821.c                    |  2 +-
 sound/soc/codecs/nau8822.c                    |  2 +-
 sound/soc/codecs/nau8824.c                    |  2 +-
 sound/soc/codecs/nau8825.c                    |  6 +--
 sound/soc/codecs/ntp8835.c                    |  4 +-
 sound/soc/codecs/ntp8918.c                    |  4 +-
 sound/soc/codecs/pcm1681.c                    |  4 +-
 sound/soc/codecs/pcm1789-i2c.c                |  2 +-
 sound/soc/codecs/pcm179x-i2c.c                |  2 +-
 sound/soc/codecs/pcm186x-i2c.c                |  8 ++--
 sound/soc/codecs/pcm3168a-i2c.c               |  2 +-
 sound/soc/codecs/pcm512x-i2c.c                | 14 +++---
 sound/soc/codecs/pcm6240.c                    | 44 +++++++++----------
 sound/soc/codecs/rt1011.c                     |  2 +-
 sound/soc/codecs/rt1015.c                     |  2 +-
 sound/soc/codecs/rt1016.c                     |  2 +-
 sound/soc/codecs/rt1019.c                     |  2 +-
 sound/soc/codecs/rt1305.c                     |  4 +-
 sound/soc/codecs/rt1308.c                     |  2 +-
 sound/soc/codecs/rt1318.c                     |  2 +-
 sound/soc/codecs/rt274.c                      |  4 +-
 sound/soc/codecs/rt286.c                      |  6 +--
 sound/soc/codecs/rt298.c                      |  4 +-
 sound/soc/codecs/rt5514.c                     |  2 +-
 sound/soc/codecs/rt5575.c                     |  2 +-
 sound/soc/codecs/rt5616.c                     |  6 +--
 sound/soc/codecs/rt5631.c                     | 10 ++---
 sound/soc/codecs/rt5640.c                     |  6 +--
 sound/soc/codecs/rt5645.c                     |  4 +-
 sound/soc/codecs/rt5651.c                     |  2 +-
 sound/soc/codecs/rt5659.c                     |  4 +-
 sound/soc/codecs/rt5660.c                     |  2 +-
 sound/soc/codecs/rt5663.c                     |  4 +-
 sound/soc/codecs/rt5665.c                     |  4 +-
 sound/soc/codecs/rt5668.c                     |  4 +-
 sound/soc/codecs/rt5670.c                     |  6 +--
 sound/soc/codecs/rt5677.c                     |  2 +-
 sound/soc/codecs/rt5682-i2c.c                 |  4 +-
 sound/soc/codecs/rt5682s.c                    |  4 +-
 sound/soc/codecs/sgtl5000.c                   |  4 +-
 sound/soc/codecs/sma1303.c                    |  4 +-
 sound/soc/codecs/sma1307.c                    |  4 +-
 sound/soc/codecs/src4xxx-i2c.c                |  2 +-
 sound/soc/codecs/ssm2518.c                    |  2 +-
 sound/soc/codecs/ssm2602-i2c.c                |  6 +--
 sound/soc/codecs/ssm4567.c                    |  2 +-
 sound/soc/codecs/sta32x.c                     |  6 +--
 sound/soc/codecs/sta350.c                     |  8 +---
 sound/soc/codecs/sta529.c                     |  2 +-
 sound/soc/codecs/tas2552.c                    |  2 +-
 sound/soc/codecs/tas2562.c                    |  6 +--
 sound/soc/codecs/tas2764.c                    |  2 +-
 sound/soc/codecs/tas2770.c                    |  2 +-
 sound/soc/codecs/tas2780.c                    |  2 +-
 sound/soc/codecs/tas2781-i2c.c                | 42 +++++++++---------
 sound/soc/codecs/tas5086.c                    | 12 ++---
 sound/soc/codecs/tas571x.c                    | 14 +++---
 sound/soc/codecs/tas5720.c                    |  6 +--
 sound/soc/codecs/tas5805m.c                   |  2 +-
 sound/soc/codecs/tas6424.c                    |  2 +-
 sound/soc/codecs/tda7419.c                    |  2 +-
 sound/soc/codecs/tfa9879.c                    |  2 +-
 sound/soc/codecs/tlv320adc3xxx.c              |  6 +--
 sound/soc/codecs/tlv320adcx140.c              |  8 ++--
 sound/soc/codecs/tlv320aic23-i2c.c            |  4 +-
 sound/soc/codecs/tlv320aic31xx.c              | 16 +++----
 sound/soc/codecs/tlv320aic32x4-i2c.c          |  6 +--
 sound/soc/codecs/tlv320aic3x-i2c.c            | 10 ++---
 sound/soc/codecs/ts3a227e.c                   |  2 +-
 sound/soc/codecs/tscs42xx.c                   |  4 +-
 sound/soc/codecs/tscs454.c                    |  2 +-
 sound/soc/codecs/uda1342.c                    |  2 +-
 sound/soc/codecs/uda1380.c                    |  2 +-
 sound/soc/codecs/wm1250-ev1.c                 |  2 +-
 sound/soc/codecs/wm2000.c                     |  2 +-
 sound/soc/codecs/wm2200.c                     |  2 +-
 sound/soc/codecs/wm5100.c                     |  2 +-
 sound/soc/codecs/wm8510.c                     |  2 +-
 sound/soc/codecs/wm8523.c                     |  2 +-
 sound/soc/codecs/wm8580.c                     |  4 +-
 sound/soc/codecs/wm8711.c                     |  2 +-
 sound/soc/codecs/wm8728.c                     |  2 +-
 sound/soc/codecs/wm8731-i2c.c                 |  2 +-
 sound/soc/codecs/wm8737.c                     |  2 +-
 sound/soc/codecs/wm8741.c                     |  2 +-
 sound/soc/codecs/wm8750.c                     |  4 +-
 sound/soc/codecs/wm8753.c                     |  2 +-
 sound/soc/codecs/wm8776.c                     |  4 +-
 sound/soc/codecs/wm8804-i2c.c                 |  2 +-
 sound/soc/codecs/wm8900.c                     |  8 +---
 sound/soc/codecs/wm8903.c                     |  2 +-
 sound/soc/codecs/wm8904.c                     |  6 +--
 sound/soc/codecs/wm8940.c                     |  2 +-
 sound/soc/codecs/wm8955.c                     |  2 +-
 sound/soc/codecs/wm8960.c                     |  2 +-
 sound/soc/codecs/wm8961.c                     |  2 +-
 sound/soc/codecs/wm8962.c                     |  2 +-
 sound/soc/codecs/wm8971.c                     |  2 +-
 sound/soc/codecs/wm8974.c                     |  2 +-
 sound/soc/codecs/wm8978.c                     |  2 +-
 sound/soc/codecs/wm8983.c                     |  2 +-
 sound/soc/codecs/wm8985.c                     |  4 +-
 sound/soc/codecs/wm8988.c                     |  2 +-
 sound/soc/codecs/wm8990.c                     |  2 +-
 sound/soc/codecs/wm8991.c                     |  2 +-
 sound/soc/codecs/wm8993.c                     |  2 +-
 sound/soc/codecs/wm8995.c                     |  4 +-
 sound/soc/codecs/wm8996.c                     |  2 +-
 sound/soc/codecs/wm9081.c                     |  8 +---
 sound/soc/codecs/wm9090.c                     |  4 +-
 200 files changed, 398 insertions(+), 426 deletions(-)


base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
-- 
2.47.3



^ permalink raw reply

* [PATCH v1 2/2] ASoC: Use named initializers for arrays of i2c_device_data
From: Uwe Kleine-König (The Capable Hub) @ 2026-05-13 17:23 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: David Rhodes, Richard Fitzgerald, Jaroslav Kysela, Takashi Iwai,
	Shenghao Ding, Kevin Lu, Baojun Xu, Lars-Peter Clausen,
	Nuno Sá, Martin Povišer, Support Opensource, Nick Li,
	M R Swami Reddy, Vishwas A Deshpande, Peter Rosin,
	Matthias Brugger, AngeloGioacchino Del Regno, Oder Chiou,
	Fabio Estevam, Kiseok Jo, Kevin Cernekee, Steven Eckhoff,
	Kuninori Morimoto, Charles Keepax, Thorsten Blum, Chris Morgan,
	Dan Carpenter, Marco Crivellari, Weidong Wang, Aaron Kling,
	Teguh Sobirin, Luca Weiss, Bharadwaj Raju, Hsieh Hung-En,
	Binbin Zhou, Shimrra Shai, Zhang Yi, Krzysztof Kozlowski,
	Srinivas Kandagatla, Qasim Ijaz, Sharique Mohammad, Chen Ni,
	Neo Chang, Cezary Rojewski, Cristian Ciocaltea, Kees Cook,
	Qianfeng Rong, Tim Bird, Bram Vlerick, Peter Korsgaard,
	Linus Walleij, Wenyuan Li, Bartosz Golaszewski, Shengjiu Wang,
	Sebastian Krzyszkowiak, Xichao Zhao, linux-sound, patches,
	linux-kernel, asahi, linux-arm-kernel, linux-mediatek,
	Markus Schneider-Pargmann
In-Reply-To: <cover.1778692164.git.u.kleine-koenig@baylibre.com>

While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

The mentioned robustness is relevant for a planned change to struct
i2c_device_id that replaces .driver_data by an anonymous union.

While touching all these arrays, unify indention and usage of commas.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits. The former was confirmed with x86 and arm64
builds.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 .../hda/codecs/side-codecs/cs35l41_hda_i2c.c  |  4 +-
 .../hda/codecs/side-codecs/cs35l56_hda_i2c.c  |  8 ++--
 .../hda/codecs/side-codecs/tas2781_hda_i2c.c  |  4 +-
 sound/soc/codecs/ad193x-i2c.c                 |  4 +-
 sound/soc/codecs/adau1372-i2c.c               |  2 +-
 sound/soc/codecs/adau1373.c                   |  2 +-
 sound/soc/codecs/adau1701.c                   |  8 ++--
 sound/soc/codecs/adau1761-i2c.c               |  8 ++--
 sound/soc/codecs/adau1781-i2c.c               |  4 +-
 sound/soc/codecs/adau1977-i2c.c               |  6 +--
 sound/soc/codecs/adau7118-i2c.c               |  4 +-
 sound/soc/codecs/adav803.c                    |  2 +-
 sound/soc/codecs/ak4118.c                     |  4 +-
 sound/soc/codecs/ak4535.c                     |  2 +-
 sound/soc/codecs/ak4613.c                     |  2 +-
 sound/soc/codecs/ak4619.c                     |  2 +-
 sound/soc/codecs/ak4642.c                     |  8 ++--
 sound/soc/codecs/ak4671.c                     |  2 +-
 sound/soc/codecs/alc5623.c                    |  8 ++--
 sound/soc/codecs/alc5632.c                    |  4 +-
 sound/soc/codecs/aw87390.c                    |  4 +-
 sound/soc/codecs/aw88081.c                    |  4 +-
 sound/soc/codecs/aw88166.c                    |  2 +-
 sound/soc/codecs/aw88261.c                    |  2 +-
 sound/soc/codecs/aw88395/aw88395.c            |  2 +-
 sound/soc/codecs/aw88399.c                    |  2 +-
 sound/soc/codecs/cs35l32.c                    |  4 +-
 sound/soc/codecs/cs35l33.c                    |  4 +-
 sound/soc/codecs/cs35l34.c                    |  4 +-
 sound/soc/codecs/cs35l35.c                    |  4 +-
 sound/soc/codecs/cs35l36.c                    |  4 +-
 sound/soc/codecs/cs35l41-i2c.c                | 10 ++---
 sound/soc/codecs/cs35l45-i2c.c                |  4 +-
 sound/soc/codecs/cs35l56-i2c.c                |  6 +--
 sound/soc/codecs/cs4265.c                     |  2 +-
 sound/soc/codecs/cs4270.c                     |  4 +-
 sound/soc/codecs/cs4271-i2c.c                 |  2 +-
 sound/soc/codecs/cs42l42-i2c.c                |  4 +-
 sound/soc/codecs/cs42l51-i2c.c                |  2 +-
 sound/soc/codecs/cs42l52.c                    |  2 +-
 sound/soc/codecs/cs42l56.c                    |  2 +-
 sound/soc/codecs/cs42l73.c                    |  4 +-
 sound/soc/codecs/cs42l84.c                    |  4 +-
 sound/soc/codecs/cs42xx8-i2c.c                |  6 +--
 sound/soc/codecs/cs43130.c                    | 10 ++---
 sound/soc/codecs/cs4341.c                     |  2 +-
 sound/soc/codecs/cs4349.c                     |  4 +-
 sound/soc/codecs/cs530x-i2c.c                 | 14 +++---
 sound/soc/codecs/cs53l30.c                    |  4 +-
 sound/soc/codecs/cx2072x.c                    |  6 +--
 sound/soc/codecs/da7210.c                     |  2 +-
 sound/soc/codecs/da7213.c                     |  2 +-
 sound/soc/codecs/da7218.c                     |  4 +-
 sound/soc/codecs/da7219.c                     |  2 +-
 sound/soc/codecs/da732x.c                     |  2 +-
 sound/soc/codecs/da9055.c                     |  2 +-
 sound/soc/codecs/es8311.c                     |  2 +-
 sound/soc/codecs/es8316.c                     |  4 +-
 sound/soc/codecs/es8323.c                     |  2 +-
 sound/soc/codecs/es8326.c                     |  4 +-
 sound/soc/codecs/es8328-i2c.c                 |  4 +-
 sound/soc/codecs/es8375.c                     |  2 +-
 sound/soc/codecs/es8389.c                     |  2 +-
 sound/soc/codecs/fs210x.c                     |  6 +--
 sound/soc/codecs/isabelle.c                   |  2 +-
 sound/soc/codecs/lm4857.c                     |  2 +-
 sound/soc/codecs/lm49453.c                    |  2 +-
 sound/soc/codecs/max9768.c                    |  2 +-
 sound/soc/codecs/max98088.c                   |  4 +-
 sound/soc/codecs/max98090.c                   |  4 +-
 sound/soc/codecs/max98095.c                   |  2 +-
 sound/soc/codecs/max98371.c                   |  2 +-
 sound/soc/codecs/max98373-i2c.c               |  4 +-
 sound/soc/codecs/max98388.c                   |  4 +-
 sound/soc/codecs/max98390.c                   |  4 +-
 sound/soc/codecs/max98396.c                   |  6 +--
 sound/soc/codecs/max9850.c                    |  2 +-
 sound/soc/codecs/max98504.c                   |  2 +-
 sound/soc/codecs/max98520.c                   |  4 +-
 sound/soc/codecs/max9860.c                    |  2 +-
 sound/soc/codecs/max9867.c                    |  2 +-
 sound/soc/codecs/max9877.c                    |  2 +-
 sound/soc/codecs/max98925.c                   |  2 +-
 sound/soc/codecs/max98926.c                   |  2 +-
 sound/soc/codecs/max98927.c                   |  4 +-
 sound/soc/codecs/ml26124.c                    |  2 +-
 sound/soc/codecs/mt6660.c                     |  4 +-
 sound/soc/codecs/nau8325.c                    |  2 +-
 sound/soc/codecs/nau8540.c                    |  2 +-
 sound/soc/codecs/nau8810.c                    |  6 +--
 sound/soc/codecs/nau8821.c                    |  2 +-
 sound/soc/codecs/nau8822.c                    |  2 +-
 sound/soc/codecs/nau8824.c                    |  2 +-
 sound/soc/codecs/nau8825.c                    |  2 +-
 sound/soc/codecs/ntp8835.c                    |  4 +-
 sound/soc/codecs/ntp8918.c                    |  4 +-
 sound/soc/codecs/pcm1681.c                    |  4 +-
 sound/soc/codecs/pcm1789-i2c.c                |  2 +-
 sound/soc/codecs/pcm179x-i2c.c                |  2 +-
 sound/soc/codecs/pcm186x-i2c.c                |  8 ++--
 sound/soc/codecs/pcm3168a-i2c.c               |  2 +-
 sound/soc/codecs/pcm512x-i2c.c                | 14 +++---
 sound/soc/codecs/pcm6240.c                    | 44 +++++++++----------
 sound/soc/codecs/rt1011.c                     |  2 +-
 sound/soc/codecs/rt1015.c                     |  2 +-
 sound/soc/codecs/rt1016.c                     |  2 +-
 sound/soc/codecs/rt1019.c                     |  2 +-
 sound/soc/codecs/rt1305.c                     |  4 +-
 sound/soc/codecs/rt1308.c                     |  2 +-
 sound/soc/codecs/rt1318.c                     |  2 +-
 sound/soc/codecs/rt274.c                      |  4 +-
 sound/soc/codecs/rt286.c                      |  6 +--
 sound/soc/codecs/rt298.c                      |  4 +-
 sound/soc/codecs/rt5514.c                     |  2 +-
 sound/soc/codecs/rt5575.c                     |  2 +-
 sound/soc/codecs/rt5616.c                     |  2 +-
 sound/soc/codecs/rt5631.c                     |  4 +-
 sound/soc/codecs/rt5640.c                     |  6 +--
 sound/soc/codecs/rt5645.c                     |  4 +-
 sound/soc/codecs/rt5651.c                     |  2 +-
 sound/soc/codecs/rt5659.c                     |  4 +-
 sound/soc/codecs/rt5660.c                     |  2 +-
 sound/soc/codecs/rt5663.c                     |  4 +-
 sound/soc/codecs/rt5665.c                     |  4 +-
 sound/soc/codecs/rt5668.c                     |  4 +-
 sound/soc/codecs/rt5670.c                     |  6 +--
 sound/soc/codecs/rt5677.c                     |  2 +-
 sound/soc/codecs/rt5682-i2c.c                 |  4 +-
 sound/soc/codecs/rt5682s.c                    |  4 +-
 sound/soc/codecs/sgtl5000.c                   |  4 +-
 sound/soc/codecs/sma1303.c                    |  4 +-
 sound/soc/codecs/sma1307.c                    |  4 +-
 sound/soc/codecs/src4xxx-i2c.c                |  2 +-
 sound/soc/codecs/ssm2518.c                    |  2 +-
 sound/soc/codecs/ssm2602-i2c.c                |  6 +--
 sound/soc/codecs/ssm4567.c                    |  2 +-
 sound/soc/codecs/sta32x.c                     |  6 +--
 sound/soc/codecs/sta350.c                     |  2 +-
 sound/soc/codecs/sta529.c                     |  2 +-
 sound/soc/codecs/tas2552.c                    |  2 +-
 sound/soc/codecs/tas2562.c                    |  6 +--
 sound/soc/codecs/tas2764.c                    |  2 +-
 sound/soc/codecs/tas2770.c                    |  2 +-
 sound/soc/codecs/tas2780.c                    |  2 +-
 sound/soc/codecs/tas2781-i2c.c                | 42 +++++++++---------
 sound/soc/codecs/tas5086.c                    |  2 +-
 sound/soc/codecs/tas571x.c                    | 14 +++---
 sound/soc/codecs/tas5720.c                    |  6 +--
 sound/soc/codecs/tas5805m.c                   |  2 +-
 sound/soc/codecs/tas6424.c                    |  2 +-
 sound/soc/codecs/tda7419.c                    |  2 +-
 sound/soc/codecs/tfa9879.c                    |  2 +-
 sound/soc/codecs/tlv320adc3xxx.c              |  6 +--
 sound/soc/codecs/tlv320adcx140.c              |  8 ++--
 sound/soc/codecs/tlv320aic23-i2c.c            |  4 +-
 sound/soc/codecs/tlv320aic31xx.c              | 16 +++----
 sound/soc/codecs/tlv320aic32x4-i2c.c          |  6 +--
 sound/soc/codecs/tlv320aic3x-i2c.c            | 10 ++---
 sound/soc/codecs/ts3a227e.c                   |  2 +-
 sound/soc/codecs/tscs42xx.c                   |  4 +-
 sound/soc/codecs/tscs454.c                    |  2 +-
 sound/soc/codecs/uda1342.c                    |  2 +-
 sound/soc/codecs/uda1380.c                    |  2 +-
 sound/soc/codecs/wm1250-ev1.c                 |  2 +-
 sound/soc/codecs/wm2000.c                     |  2 +-
 sound/soc/codecs/wm2200.c                     |  2 +-
 sound/soc/codecs/wm5100.c                     |  2 +-
 sound/soc/codecs/wm8510.c                     |  2 +-
 sound/soc/codecs/wm8523.c                     |  2 +-
 sound/soc/codecs/wm8580.c                     |  4 +-
 sound/soc/codecs/wm8711.c                     |  2 +-
 sound/soc/codecs/wm8728.c                     |  2 +-
 sound/soc/codecs/wm8731-i2c.c                 |  2 +-
 sound/soc/codecs/wm8737.c                     |  2 +-
 sound/soc/codecs/wm8741.c                     |  2 +-
 sound/soc/codecs/wm8750.c                     |  4 +-
 sound/soc/codecs/wm8753.c                     |  2 +-
 sound/soc/codecs/wm8776.c                     |  4 +-
 sound/soc/codecs/wm8804-i2c.c                 |  2 +-
 sound/soc/codecs/wm8900.c                     |  2 +-
 sound/soc/codecs/wm8903.c                     |  2 +-
 sound/soc/codecs/wm8904.c                     |  6 +--
 sound/soc/codecs/wm8940.c                     |  2 +-
 sound/soc/codecs/wm8955.c                     |  2 +-
 sound/soc/codecs/wm8960.c                     |  2 +-
 sound/soc/codecs/wm8961.c                     |  2 +-
 sound/soc/codecs/wm8962.c                     |  2 +-
 sound/soc/codecs/wm8971.c                     |  2 +-
 sound/soc/codecs/wm8974.c                     |  2 +-
 sound/soc/codecs/wm8978.c                     |  2 +-
 sound/soc/codecs/wm8983.c                     |  2 +-
 sound/soc/codecs/wm8985.c                     |  4 +-
 sound/soc/codecs/wm8988.c                     |  2 +-
 sound/soc/codecs/wm8990.c                     |  2 +-
 sound/soc/codecs/wm8991.c                     |  2 +-
 sound/soc/codecs/wm8993.c                     |  2 +-
 sound/soc/codecs/wm8995.c                     |  4 +-
 sound/soc/codecs/wm8996.c                     |  2 +-
 sound/soc/codecs/wm9081.c                     |  2 +-
 sound/soc/codecs/wm9090.c                     |  4 +-
 200 files changed, 391 insertions(+), 391 deletions(-)

diff --git a/sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c b/sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c
index e77495413c21..96d8cc6c2324 100644
--- a/sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c
@@ -39,8 +39,8 @@ static void cs35l41_hda_i2c_remove(struct i2c_client *clt)
 }
 
 static const struct i2c_device_id cs35l41_hda_i2c_id[] = {
-	{ "cs35l41-hda" },
-	{}
+	{ .name = "cs35l41-hda" },
+	{ }
 };
 
 static const struct acpi_device_id cs35l41_acpi_hda_match[] = {
diff --git a/sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c b/sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c
index 1072f17385ac..e2f51612a73d 100644
--- a/sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c
@@ -51,10 +51,10 @@ static void cs35l56_hda_i2c_remove(struct i2c_client *clt)
 }
 
 static const struct i2c_device_id cs35l56_hda_i2c_id[] = {
-	{ "cs35l54-hda", 0x3554 },
-	{ "cs35l56-hda", 0x3556 },
-	{ "cs35l57-hda", 0x3557 },
-	{}
+	{ .name = "cs35l54-hda", .driver_data = 0x3554 },
+	{ .name = "cs35l56-hda", .driver_data = 0x3556 },
+	{ .name = "cs35l57-hda", .driver_data = 0x3557 },
+	{ }
 };
 
 static const struct acpi_device_id cs35l56_acpi_hda_match[] = {
diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
index 67240ce184e1..d59110402c7a 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
@@ -791,8 +791,8 @@ static const struct dev_pm_ops tas2781_hda_pm_ops = {
 };
 
 static const struct i2c_device_id tas2781_hda_i2c_id[] = {
-	{ "tas2781-hda" },
-	{}
+	{ .name = "tas2781-hda" },
+	{ }
 };
 
 static const struct acpi_device_id tas2781_acpi_hda_match[] = {
diff --git a/sound/soc/codecs/ad193x-i2c.c b/sound/soc/codecs/ad193x-i2c.c
index 6aa168e01fbb..d4d6560bdb80 100644
--- a/sound/soc/codecs/ad193x-i2c.c
+++ b/sound/soc/codecs/ad193x-i2c.c
@@ -14,8 +14,8 @@
 #include "ad193x.h"
 
 static const struct i2c_device_id ad193x_id[] = {
-	{ "ad1936", AD193X },
-	{ "ad1937", AD193X },
+	{ .name = "ad1936", .driver_data = AD193X },
+	{ .name = "ad1937", .driver_data = AD193X },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ad193x_id);
diff --git a/sound/soc/codecs/adau1372-i2c.c b/sound/soc/codecs/adau1372-i2c.c
index 73f83be38f74..4217b7fc349c 100644
--- a/sound/soc/codecs/adau1372-i2c.c
+++ b/sound/soc/codecs/adau1372-i2c.c
@@ -21,7 +21,7 @@ static int adau1372_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adau1372_i2c_ids[] = {
-	{ "adau1372" },
+	{ .name = "adau1372" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adau1372_i2c_ids);
diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
index 16b9b2658341..5dd961b233ce 100644
--- a/sound/soc/codecs/adau1373.c
+++ b/sound/soc/codecs/adau1373.c
@@ -1599,7 +1599,7 @@ static int adau1373_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adau1373_i2c_id[] = {
-	{ "adau1373" },
+	{ .name = "adau1373" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adau1373_i2c_id);
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 6876462d8bdb..329ab01b62c0 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -860,10 +860,10 @@ static int adau1701_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adau1701_i2c_id[] = {
-	{ "adau1401" },
-	{ "adau1401a" },
-	{ "adau1701" },
-	{ "adau1702" },
+	{ .name = "adau1401" },
+	{ .name = "adau1401a" },
+	{ .name = "adau1701" },
+	{ .name = "adau1702" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adau1701_i2c_id);
diff --git a/sound/soc/codecs/adau1761-i2c.c b/sound/soc/codecs/adau1761-i2c.c
index eba7e4f42c78..a329e5bddb99 100644
--- a/sound/soc/codecs/adau1761-i2c.c
+++ b/sound/soc/codecs/adau1761-i2c.c
@@ -33,10 +33,10 @@ static void adau1761_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adau1761_i2c_ids[] = {
-	{ "adau1361", ADAU1361 },
-	{ "adau1461", ADAU1761 },
-	{ "adau1761", ADAU1761 },
-	{ "adau1961", ADAU1361 },
+	{ .name = "adau1361", .driver_data = ADAU1361 },
+	{ .name = "adau1461", .driver_data = ADAU1761 },
+	{ .name = "adau1761", .driver_data = ADAU1761 },
+	{ .name = "adau1961", .driver_data = ADAU1361 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adau1761_i2c_ids);
diff --git a/sound/soc/codecs/adau1781-i2c.c b/sound/soc/codecs/adau1781-i2c.c
index cb67fde8d9a8..0e7954148af7 100644
--- a/sound/soc/codecs/adau1781-i2c.c
+++ b/sound/soc/codecs/adau1781-i2c.c
@@ -33,8 +33,8 @@ static void adau1781_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adau1781_i2c_ids[] = {
-	{ "adau1381", ADAU1381 },
-	{ "adau1781", ADAU1781 },
+	{ .name = "adau1381", .driver_data = ADAU1381 },
+	{ .name = "adau1781", .driver_data = ADAU1781 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adau1781_i2c_ids);
diff --git a/sound/soc/codecs/adau1977-i2c.c b/sound/soc/codecs/adau1977-i2c.c
index 441c8079246a..fc7ed5c1dd74 100644
--- a/sound/soc/codecs/adau1977-i2c.c
+++ b/sound/soc/codecs/adau1977-i2c.c
@@ -28,9 +28,9 @@ static int adau1977_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adau1977_i2c_ids[] = {
-	{ "adau1977", ADAU1977 },
-	{ "adau1978", ADAU1978 },
-	{ "adau1979", ADAU1978 },
+	{ .name = "adau1977", .driver_data = ADAU1977 },
+	{ .name = "adau1978", .driver_data = ADAU1978 },
+	{ .name = "adau1979", .driver_data = ADAU1978 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adau1977_i2c_ids);
diff --git a/sound/soc/codecs/adau7118-i2c.c b/sound/soc/codecs/adau7118-i2c.c
index f9dc8f4ef9a4..7cccb4c6cff7 100644
--- a/sound/soc/codecs/adau7118-i2c.c
+++ b/sound/soc/codecs/adau7118-i2c.c
@@ -68,8 +68,8 @@ static const struct of_device_id adau7118_of_match[] = {
 MODULE_DEVICE_TABLE(of, adau7118_of_match);
 
 static const struct i2c_device_id adau7118_id[] = {
-	{"adau7118"},
-	{}
+	{ .name = "adau7118" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adau7118_id);
 
diff --git a/sound/soc/codecs/adav803.c b/sound/soc/codecs/adav803.c
index 8b96c41f0354..9e5f8e866acb 100644
--- a/sound/soc/codecs/adav803.c
+++ b/sound/soc/codecs/adav803.c
@@ -14,7 +14,7 @@
 #include "adav80x.h"
 
 static const struct i2c_device_id adav803_id[] = {
-	{ "adav803" },
+	{ .name = "adav803" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adav803_id);
diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c
index 23e868e4e3fb..03dadba0b038 100644
--- a/sound/soc/codecs/ak4118.c
+++ b/sound/soc/codecs/ak4118.c
@@ -395,8 +395,8 @@ MODULE_DEVICE_TABLE(of, ak4118_of_match);
 #endif
 
 static const struct i2c_device_id ak4118_id_table[] = {
-	{ "ak4118" },
-	{}
+	{ .name = "ak4118" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ak4118_id_table);
 
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index aadc46a47280..37555674cd15 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -430,7 +430,7 @@ static int ak4535_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id ak4535_i2c_id[] = {
-	{ "ak4535" },
+	{ .name = "ak4535" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ak4535_i2c_id);
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index de9e43185555..3b198b9b4605 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -303,7 +303,7 @@ static const struct of_device_id ak4613_of_match[] = {
 MODULE_DEVICE_TABLE(of, ak4613_of_match);
 
 static const struct i2c_device_id ak4613_i2c_id[] = {
-	{ "ak4613", (kernel_ulong_t)&ak4613_regmap_cfg },
+	{ .name = "ak4613", .driver_data = (kernel_ulong_t)&ak4613_regmap_cfg },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ak4613_i2c_id);
diff --git a/sound/soc/codecs/ak4619.c b/sound/soc/codecs/ak4619.c
index daf6e15b7077..755c002f0f15 100644
--- a/sound/soc/codecs/ak4619.c
+++ b/sound/soc/codecs/ak4619.c
@@ -831,7 +831,7 @@ static const struct of_device_id ak4619_of_match[] = {
 MODULE_DEVICE_TABLE(of, ak4619_of_match);
 
 static const struct i2c_device_id ak4619_i2c_id[] = {
-	{ "ak4619", (kernel_ulong_t)&ak4619_regmap_cfg },
+	{ .name = "ak4619", .driver_data = (kernel_ulong_t)&ak4619_regmap_cfg },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ak4619_i2c_id);
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index fe035d2fc913..08ec2035b270 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -672,10 +672,10 @@ static const struct of_device_id ak4642_of_match[] = {
 MODULE_DEVICE_TABLE(of, ak4642_of_match);
 
 static const struct i2c_device_id ak4642_i2c_id[] = {
-	{ "ak4642", (kernel_ulong_t)&ak4642_drvdata },
-	{ "ak4643", (kernel_ulong_t)&ak4643_drvdata },
-	{ "ak4648", (kernel_ulong_t)&ak4648_drvdata },
-	{}
+	{ .name = "ak4642", .driver_data = (kernel_ulong_t)&ak4642_drvdata },
+	{ .name = "ak4643", .driver_data = (kernel_ulong_t)&ak4643_drvdata },
+	{ .name = "ak4648", .driver_data = (kernel_ulong_t)&ak4648_drvdata },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ak4642_i2c_id);
 
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
index d545aa2e0a39..aac54e9d54ee 100644
--- a/sound/soc/codecs/ak4671.c
+++ b/sound/soc/codecs/ak4671.c
@@ -646,7 +646,7 @@ static int ak4671_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ak4671_i2c_id[] = {
-	{ "ak4671" },
+	{ .name = "ak4671" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ak4671_i2c_id);
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index ec229b315f9f..f5a666c49361 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -963,10 +963,10 @@ static const struct regmap_config alc5623_regmap = {
 };
 
 static const struct i2c_device_id alc5623_i2c_table[] = {
-	{"alc5621", 0x21},
-	{"alc5622", 0x22},
-	{"alc5623", 0x23},
-	{}
+	{ .name = "alc5621", .driver_data = 0x21 },
+	{ .name = "alc5622", .driver_data = 0x22 },
+	{ .name = "alc5623", .driver_data = 0x23 },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, alc5623_i2c_table);
 
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
index 72f4622204ff..2fd3dd7ef8b3 100644
--- a/sound/soc/codecs/alc5632.c
+++ b/sound/soc/codecs/alc5632.c
@@ -1092,8 +1092,8 @@ static const struct regmap_config alc5632_regmap = {
 };
 
 static const struct i2c_device_id alc5632_i2c_table[] = {
-	{"alc5632", 0x5c},
-	{}
+	{ .name = "alc5632", .driver_data = 0x5c },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, alc5632_i2c_table);
 
diff --git a/sound/soc/codecs/aw87390.c b/sound/soc/codecs/aw87390.c
index 37ca42a25889..020213e0ca4b 100644
--- a/sound/soc/codecs/aw87390.c
+++ b/sound/soc/codecs/aw87390.c
@@ -599,8 +599,8 @@ static const struct of_device_id aw87390_of_match[] = {
 MODULE_DEVICE_TABLE(of, aw87390_of_match);
 
 static const struct i2c_device_id aw87390_i2c_id[] = {
-	{ AW87390_I2C_NAME },
-	{ AW87391_I2C_NAME },
+	{ .name = AW87390_I2C_NAME },
+	{ .name = AW87391_I2C_NAME },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, aw87390_i2c_id);
diff --git a/sound/soc/codecs/aw88081.c b/sound/soc/codecs/aw88081.c
index 8c5bb3ea0227..a5ba177a48df 100644
--- a/sound/soc/codecs/aw88081.c
+++ b/sound/soc/codecs/aw88081.c
@@ -1240,8 +1240,8 @@ static const struct snd_soc_component_driver soc_codec_dev_aw88081 = {
 };
 
 static const struct i2c_device_id aw88081_i2c_id[] = {
-	{ AW88081_I2C_NAME, AW88081},
-	{ AW88083_I2C_NAME, AW88083},
+	{ .name = AW88081_I2C_NAME, .driver_data = AW88081 },
+	{ .name = AW88083_I2C_NAME, .driver_data = AW88083 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, aw88081_i2c_id);
diff --git a/sound/soc/codecs/aw88166.c b/sound/soc/codecs/aw88166.c
index ea277a940c44..3f15f4ac51f7 100644
--- a/sound/soc/codecs/aw88166.c
+++ b/sound/soc/codecs/aw88166.c
@@ -1801,7 +1801,7 @@ static int aw88166_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id aw88166_i2c_id[] = {
-	{ AW88166_I2C_NAME },
+	{ .name = AW88166_I2C_NAME },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, aw88166_i2c_id);
diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c
index a6805d5405cd..50521dd2ebb1 100644
--- a/sound/soc/codecs/aw88261.c
+++ b/sound/soc/codecs/aw88261.c
@@ -1274,7 +1274,7 @@ static int aw88261_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id aw88261_i2c_id[] = {
-	{ "aw88261" },
+	{ .name = "aw88261" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, aw88261_i2c_id);
diff --git a/sound/soc/codecs/aw88395/aw88395.c b/sound/soc/codecs/aw88395/aw88395.c
index 3602b5b9f7d7..74708a47209e 100644
--- a/sound/soc/codecs/aw88395/aw88395.c
+++ b/sound/soc/codecs/aw88395/aw88395.c
@@ -558,7 +558,7 @@ static int aw88395_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id aw88395_i2c_id[] = {
-	{ AW88395_I2C_NAME },
+	{ .name = AW88395_I2C_NAME },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, aw88395_i2c_id);
diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index b588c27909b5..b2ec3503f7e2 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -2146,7 +2146,7 @@ static int aw88399_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id aw88399_i2c_id[] = {
-	{ AW88399_I2C_NAME },
+	{ .name = AW88399_I2C_NAME },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, aw88399_i2c_id);
diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c
index 0bb4bdb3deec..c835088de578 100644
--- a/sound/soc/codecs/cs35l32.c
+++ b/sound/soc/codecs/cs35l32.c
@@ -555,8 +555,8 @@ MODULE_DEVICE_TABLE(of, cs35l32_of_match);
 
 
 static const struct i2c_device_id cs35l32_id[] = {
-	{"cs35l32"},
-	{}
+	{ .name = "cs35l32" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs35l32_id);
diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 98b4d371d931..f49edb9ea1f2 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -1262,8 +1262,8 @@ static const struct of_device_id cs35l33_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs35l33_of_match);
 
 static const struct i2c_device_id cs35l33_id[] = {
-	{"cs35l33"},
-	{}
+	{ .name = "cs35l33" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs35l33_id);
diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c
index a5a8075598ff..e80984b22159 100644
--- a/sound/soc/codecs/cs35l34.c
+++ b/sound/soc/codecs/cs35l34.c
@@ -1175,8 +1175,8 @@ static const struct of_device_id cs35l34_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs35l34_of_match);
 
 static const struct i2c_device_id cs35l34_id[] = {
-	{"cs35l34"},
-	{}
+	{ .name = "cs35l34" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs35l34_id);
 
diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c
index 7a01b1d9fc9d..b2439ec3c19f 100644
--- a/sound/soc/codecs/cs35l35.c
+++ b/sound/soc/codecs/cs35l35.c
@@ -1639,8 +1639,8 @@ static const struct of_device_id cs35l35_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs35l35_of_match);
 
 static const struct i2c_device_id cs35l35_id[] = {
-	{"cs35l35"},
-	{}
+	{ .name = "cs35l35" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs35l35_id);
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index 93818d7ec1a7..89645327945f 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -1918,8 +1918,8 @@ static const struct of_device_id cs35l36_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs35l36_of_match);
 
 static const struct i2c_device_id cs35l36_id[] = {
-	{"cs35l36"},
-	{}
+	{ .name = "cs35l36" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs35l36_id);
diff --git a/sound/soc/codecs/cs35l41-i2c.c b/sound/soc/codecs/cs35l41-i2c.c
index 34097996b784..23f59f3025bd 100644
--- a/sound/soc/codecs/cs35l41-i2c.c
+++ b/sound/soc/codecs/cs35l41-i2c.c
@@ -20,11 +20,11 @@
 #include "cs35l41.h"
 
 static const struct i2c_device_id cs35l41_id_i2c[] = {
-	{ "cs35l40" },
-	{ "cs35l41" },
-	{ "cs35l51" },
-	{ "cs35l53" },
-	{}
+	{ .name = "cs35l40" },
+	{ .name = "cs35l41" },
+	{ .name = "cs35l51" },
+	{ .name = "cs35l53" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs35l41_id_i2c);
diff --git a/sound/soc/codecs/cs35l45-i2c.c b/sound/soc/codecs/cs35l45-i2c.c
index a09aa3b92ae1..3eba61e107a5 100644
--- a/sound/soc/codecs/cs35l45-i2c.c
+++ b/sound/soc/codecs/cs35l45-i2c.c
@@ -53,8 +53,8 @@ static const struct of_device_id cs35l45_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs35l45_of_match);
 
 static const struct i2c_device_id cs35l45_id_i2c[] = {
-	{ "cs35l45" },
-	{}
+	{ .name = "cs35l45" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs35l45_id_i2c);
 
diff --git a/sound/soc/codecs/cs35l56-i2c.c b/sound/soc/codecs/cs35l56-i2c.c
index 0492ddc4102d..0f64ab628b03 100644
--- a/sound/soc/codecs/cs35l56-i2c.c
+++ b/sound/soc/codecs/cs35l56-i2c.c
@@ -72,9 +72,9 @@ static void cs35l56_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id cs35l56_id_i2c[] = {
-	{ "cs35l56", 0x3556 },
-	{ "cs35l63", 0x3563 },
-	{}
+	{ .name = "cs35l56", .driver_data = 0x3556 },
+	{ .name = "cs35l63", .driver_data = 0x3563 },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs35l56_id_i2c);
 
diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c
index 3f759c13d6d1..286d5ca29854 100644
--- a/sound/soc/codecs/cs4265.c
+++ b/sound/soc/codecs/cs4265.c
@@ -638,7 +638,7 @@ static const struct of_device_id cs4265_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs4265_of_match);
 
 static const struct i2c_device_id cs4265_id[] = {
-	{ "cs4265" },
+	{ .name = "cs4265" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs4265_id);
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index a48980e746ff..47cb10eb21bb 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -732,8 +732,8 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client)
  * cs4270_id - I2C device IDs supported by this driver
  */
 static const struct i2c_device_id cs4270_id[] = {
-	{"cs4270"},
-	{}
+	{ .name = "cs4270" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs4270_id);
 
diff --git a/sound/soc/codecs/cs4271-i2c.c b/sound/soc/codecs/cs4271-i2c.c
index 1d210b969173..869a5317f677 100644
--- a/sound/soc/codecs/cs4271-i2c.c
+++ b/sound/soc/codecs/cs4271-i2c.c
@@ -23,7 +23,7 @@ static int cs4271_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id cs4271_i2c_id[] = {
-	{ "cs4271" },
+	{ .name = "cs4271" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs4271_i2c_id);
diff --git a/sound/soc/codecs/cs42l42-i2c.c b/sound/soc/codecs/cs42l42-i2c.c
index 98b6718ccabf..c0942f28723b 100644
--- a/sound/soc/codecs/cs42l42-i2c.c
+++ b/sound/soc/codecs/cs42l42-i2c.c
@@ -78,8 +78,8 @@ static const struct acpi_device_id __maybe_unused cs42l42_acpi_match[] = {
 MODULE_DEVICE_TABLE(acpi, cs42l42_acpi_match);
 
 static const struct i2c_device_id cs42l42_id[] = {
-	{"cs42l42"},
-	{}
+	{ .name = "cs42l42" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs42l42_id);
diff --git a/sound/soc/codecs/cs42l51-i2c.c b/sound/soc/codecs/cs42l51-i2c.c
index ba7e237619f2..a20a1030c498 100644
--- a/sound/soc/codecs/cs42l51-i2c.c
+++ b/sound/soc/codecs/cs42l51-i2c.c
@@ -14,7 +14,7 @@
 #include "cs42l51.h"
 
 static const struct i2c_device_id cs42l51_i2c_id[] = {
-	{ "cs42l51" },
+	{ .name = "cs42l51" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs42l51_i2c_id);
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 662dc1a4835b..9d6bcfbbf0b2 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -1226,7 +1226,7 @@ MODULE_DEVICE_TABLE(of, cs42l52_of_match);
 
 
 static const struct i2c_device_id cs42l52_id[] = {
-	{ "cs42l52" },
+	{ .name = "cs42l52" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs42l52_id);
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c
index aabb74f1f43c..4d9a22a1029c 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -1353,7 +1353,7 @@ MODULE_DEVICE_TABLE(of, cs42l56_of_match);
 
 
 static const struct i2c_device_id cs42l56_id[] = {
-	{ "cs42l56" },
+	{ .name = "cs42l56" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs42l56_id);
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index bda8442c1d66..6ddc6549492a 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1369,8 +1369,8 @@ static const struct of_device_id cs42l73_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs42l73_of_match);
 
 static const struct i2c_device_id cs42l73_id[] = {
-	{"cs42l73"},
-	{}
+	{ .name = "cs42l73" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs42l73_id);
diff --git a/sound/soc/codecs/cs42l84.c b/sound/soc/codecs/cs42l84.c
index e590a43559e4..f2a58163de0e 100644
--- a/sound/soc/codecs/cs42l84.c
+++ b/sound/soc/codecs/cs42l84.c
@@ -1101,8 +1101,8 @@ static const struct of_device_id cs42l84_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs42l84_of_match);
 
 static const struct i2c_device_id cs42l84_id[] = {
-	{ "cs42l84" },
-	{}
+	{ .name = "cs42l84" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs42l84_id);
 
diff --git a/sound/soc/codecs/cs42xx8-i2c.c b/sound/soc/codecs/cs42xx8-i2c.c
index 0faca384073a..31debe2d8231 100644
--- a/sound/soc/codecs/cs42xx8-i2c.c
+++ b/sound/soc/codecs/cs42xx8-i2c.c
@@ -49,9 +49,9 @@ static const struct of_device_id cs42xx8_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs42xx8_of_match);
 
 static const struct i2c_device_id cs42xx8_i2c_id[] = {
-	{"cs42448", (kernel_ulong_t)&cs42448_data},
-	{"cs42888", (kernel_ulong_t)&cs42888_data},
-	{}
+	{ .name = "cs42448", .driver_data = (kernel_ulong_t)&cs42448_data },
+	{ .name = "cs42888", .driver_data = (kernel_ulong_t)&cs42888_data },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs42xx8_i2c_id);
 
diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c
index a3bdaac9c059..e7b06f962790 100644
--- a/sound/soc/codecs/cs43130.c
+++ b/sound/soc/codecs/cs43130.c
@@ -2753,11 +2753,11 @@ MODULE_DEVICE_TABLE(acpi, cs43130_acpi_match);
 
 
 static const struct i2c_device_id cs43130_i2c_id[] = {
-	{"cs43130"},
-	{"cs4399"},
-	{"cs43131"},
-	{"cs43198"},
-	{}
+	{ .name = "cs43130" },
+	{ .name = "cs4399" },
+	{ .name = "cs43131" },
+	{ .name = "cs43198" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs43130_i2c_id);
diff --git a/sound/soc/codecs/cs4341.c b/sound/soc/codecs/cs4341.c
index b726e22ef57d..a44e6b3c298e 100644
--- a/sound/soc/codecs/cs4341.c
+++ b/sound/soc/codecs/cs4341.c
@@ -248,7 +248,7 @@ static int cs4341_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id cs4341_i2c_id[] = {
-	{ "cs4341" },
+	{ .name = "cs4341" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs4341_i2c_id);
diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
index d9a9c34fffe3..ced1270c4d68 100644
--- a/sound/soc/codecs/cs4349.c
+++ b/sound/soc/codecs/cs4349.c
@@ -358,8 +358,8 @@ static const struct of_device_id cs4349_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs4349_of_match);
 
 static const struct i2c_device_id cs4349_i2c_id[] = {
-	{"cs4349"},
-	{}
+	{ .name = "cs4349" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs4349_i2c_id);
diff --git a/sound/soc/codecs/cs530x-i2c.c b/sound/soc/codecs/cs530x-i2c.c
index 52b02ceaa7e3..98cb61dd88c1 100644
--- a/sound/soc/codecs/cs530x-i2c.c
+++ b/sound/soc/codecs/cs530x-i2c.c
@@ -40,13 +40,13 @@ static const struct of_device_id cs530x_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs530x_of_match);
 
 static const struct i2c_device_id cs530x_i2c_id[] = {
-	{ "cs4282", CS4282 },
-	{ "cs4302", CS4302 },
-	{ "cs4304", CS4304 },
-	{ "cs4308", CS4308 },
-	{ "cs5302", CS5302 },
-	{ "cs5304", CS5304 },
-	{ "cs5308", CS5308 },
+	{ .name = "cs4282", .driver_data = CS4282 },
+	{ .name = "cs4302", .driver_data = CS4302 },
+	{ .name = "cs4304", .driver_data = CS4304 },
+	{ .name = "cs4308", .driver_data = CS4308 },
+	{ .name = "cs5302", .driver_data = CS5302 },
+	{ .name = "cs5304", .driver_data = CS5304 },
+	{ .name = "cs5308", .driver_data = CS5308 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cs530x_i2c_id);
diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
index 93ea2fb4dae9..511453b4c375 100644
--- a/sound/soc/codecs/cs53l30.c
+++ b/sound/soc/codecs/cs53l30.c
@@ -1083,8 +1083,8 @@ static const struct of_device_id cs53l30_of_match[] = {
 MODULE_DEVICE_TABLE(of, cs53l30_of_match);
 
 static const struct i2c_device_id cs53l30_id[] = {
-	{ "cs53l30" },
-	{}
+	{ .name = "cs53l30" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, cs53l30_id);
diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/codecs/cx2072x.c
index b0033bf9be3a..83c6cbd40804 100644
--- a/sound/soc/codecs/cx2072x.c
+++ b/sound/soc/codecs/cx2072x.c
@@ -1681,9 +1681,9 @@ static void cx2072x_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id cx2072x_i2c_id[] = {
-	{ "cx20721" },
-	{ "cx20723" },
-	{}
+	{ .name = "cx20721" },
+	{ .name = "cx20723" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, cx2072x_i2c_id);
 
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 94e59546c2fe..4df1a25e318b 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -1238,7 +1238,7 @@ static int da7210_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id da7210_i2c_id[] = {
-	{ "da7210" },
+	{ .name = "da7210" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, da7210_i2c_id);
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index 19f69a523f22..98b8858ded02 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -2271,7 +2271,7 @@ static const struct dev_pm_ops da7213_pm = {
 };
 
 static const struct i2c_device_id da7213_i2c_id[] = {
-	{ "da7213" },
+	{ .name = "da7213" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, da7213_i2c_id);
diff --git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c
index 5c80839704c7..93bd045ed870 100644
--- a/sound/soc/codecs/da7218.c
+++ b/sound/soc/codecs/da7218.c
@@ -3282,8 +3282,8 @@ static int da7218_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id da7218_i2c_id[] = {
-	{ "da7217", DA7217_DEV_ID },
-	{ "da7218", DA7218_DEV_ID },
+	{ .name = "da7217", .driver_data = DA7217_DEV_ID },
+	{ .name = "da7218", .driver_data = DA7218_DEV_ID },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, da7218_i2c_id);
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index ec4059f381be..f0874d891e12 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -2712,7 +2712,7 @@ static int da7219_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id da7219_i2c_id[] = {
-	{ "da7219", },
+	{ .name = "da7219" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, da7219_i2c_id);
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index 140e449d3ef4..12d1ac98461e 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -1547,7 +1547,7 @@ static int da732x_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id da732x_i2c_id[] = {
-	{ "da7320"},
+	{ .name = "da7320" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, da732x_i2c_id);
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index a52276e32f2f..a88c13533145 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -1513,7 +1513,7 @@ static int da9055_i2c_probe(struct i2c_client *i2c)
  * and PMIC, which must be different to operate together.
  */
 static const struct i2c_device_id da9055_i2c_id[] = {
-	{ "da9055-codec" },
+	{ .name = "da9055-codec" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
diff --git a/sound/soc/codecs/es8311.c b/sound/soc/codecs/es8311.c
index 564af5c04dbb..6fe3ae41afbd 100644
--- a/sound/soc/codecs/es8311.c
+++ b/sound/soc/codecs/es8311.c
@@ -955,7 +955,7 @@ static int es8311_i2c_probe(struct i2c_client *i2c_client)
 }
 
 static const struct i2c_device_id es8311_id[] = {
-	{ "es8311" },
+	{ .name = "es8311" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, es8311_id);
diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index 9245c33700de..6a428387e496 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -895,8 +895,8 @@ static int es8316_i2c_probe(struct i2c_client *i2c_client)
 }
 
 static const struct i2c_device_id es8316_i2c_id[] = {
-	{"es8316" },
-	{}
+	{ .name = "es8316" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, es8316_i2c_id);
 
diff --git a/sound/soc/codecs/es8323.c b/sound/soc/codecs/es8323.c
index 605375b154c8..d067f7bda03a 100644
--- a/sound/soc/codecs/es8323.c
+++ b/sound/soc/codecs/es8323.c
@@ -787,7 +787,7 @@ static int es8323_i2c_probe(struct i2c_client *i2c_client)
 }
 
 static const struct i2c_device_id es8323_i2c_id[] = {
-	{ "es8323" },
+	{ .name = "es8323" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, es8323_i2c_id);
diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index 55a65ef99208..a79b2da35099 100644
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -1347,8 +1347,8 @@ static void es8326_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id es8326_i2c_id[] = {
-	{"es8326" },
-	{}
+	{ .name = "es8326" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, es8326_i2c_id);
 
diff --git a/sound/soc/codecs/es8328-i2c.c b/sound/soc/codecs/es8328-i2c.c
index 56bfbe9261ce..36a4987e1a59 100644
--- a/sound/soc/codecs/es8328-i2c.c
+++ b/sound/soc/codecs/es8328-i2c.c
@@ -16,8 +16,8 @@
 #include "es8328.h"
 
 static const struct i2c_device_id es8328_id[] = {
-	{ "es8328" },
-	{ "es8388" },
+	{ .name = "es8328" },
+	{ .name = "es8388" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, es8328_id);
diff --git a/sound/soc/codecs/es8375.c b/sound/soc/codecs/es8375.c
index 0b9406e93c0e..e8747bc24433 100644
--- a/sound/soc/codecs/es8375.c
+++ b/sound/soc/codecs/es8375.c
@@ -752,7 +752,7 @@ static void es8375_i2c_shutdown(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id es8375_id[] = {
-	{"es8375"},
+	{ .name = "es8375" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, es8375_id);
diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
index 8d418cae371a..de47b24417d6 100644
--- a/sound/soc/codecs/es8389.c
+++ b/sound/soc/codecs/es8389.c
@@ -1015,7 +1015,7 @@ MODULE_DEVICE_TABLE(of, es8389_if_dt_ids);
 #endif
 
 static const struct i2c_device_id es8389_i2c_id[] = {
-	{"es8389"},
+	{ .name = "es8389" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, es8389_i2c_id);
diff --git a/sound/soc/codecs/fs210x.c b/sound/soc/codecs/fs210x.c
index e6195b71adad..9394922f3d7a 100644
--- a/sound/soc/codecs/fs210x.c
+++ b/sound/soc/codecs/fs210x.c
@@ -1557,9 +1557,9 @@ static void fs210x_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id fs210x_i2c_id[] = {
-	{ "fs2104" },
-	{ "fs2105s" },
-	{}
+	{ .name = "fs2104" },
+	{ .name = "fs2105s" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, fs210x_i2c_id);
 
diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c
index b7a94631d77d..fa1c23dda4eb 100644
--- a/sound/soc/codecs/isabelle.c
+++ b/sound/soc/codecs/isabelle.c
@@ -1133,7 +1133,7 @@ static int isabelle_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id isabelle_i2c_id[] = {
-	{ "isabelle" },
+	{ .name = "isabelle" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, isabelle_i2c_id);
diff --git a/sound/soc/codecs/lm4857.c b/sound/soc/codecs/lm4857.c
index 26cdb750cbca..06add7fb6737 100644
--- a/sound/soc/codecs/lm4857.c
+++ b/sound/soc/codecs/lm4857.c
@@ -128,7 +128,7 @@ static int lm4857_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id lm4857_i2c_id[] = {
-	{ "lm4857" },
+	{ .name = "lm4857" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, lm4857_i2c_id);
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index 043030509795..6e2e292d143b 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -1443,7 +1443,7 @@ static int lm49453_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id lm49453_i2c_id[] = {
-	{ "lm49453" },
+	{ .name = "lm49453" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, lm49453_i2c_id);
diff --git a/sound/soc/codecs/max9768.c b/sound/soc/codecs/max9768.c
index 7ad7a9fb7255..8621d9bdb9fd 100644
--- a/sound/soc/codecs/max9768.c
+++ b/sound/soc/codecs/max9768.c
@@ -213,7 +213,7 @@ static int max9768_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max9768_i2c_id[] = {
-	{ "max9768" },
+	{ .name = "max9768" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max9768_i2c_id);
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index 9f40ca4b60d5..df438baf05dc 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1722,8 +1722,8 @@ static const struct snd_soc_component_driver soc_component_dev_max98088 = {
 };
 
 static const struct i2c_device_id max98088_i2c_id[] = {
-       { "max98088", MAX98088 },
-       { "max98089", MAX98089 },
+       { .name = "max98088", .driver_data = MAX98088 },
+       { .name = "max98089", .driver_data = MAX98089 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 13a15459040f..aaa34ba86802 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2572,8 +2572,8 @@ static const struct regmap_config max98090_regmap = {
 };
 
 static const struct i2c_device_id max98090_i2c_id[] = {
-	{ "max98090", MAX98090 },
-	{ "max98091", MAX98091 },
+	{ .name = "max98090", .driver_data = MAX98090 },
+	{ .name = "max98091", .driver_data = MAX98091 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max98090_i2c_id);
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index aae6423156e1..ced9bd4d94da 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -2109,7 +2109,7 @@ static const struct snd_soc_component_driver soc_component_dev_max98095 = {
 };
 
 static const struct i2c_device_id max98095_i2c_id[] = {
-	{ "max98095", MAX98095 },
+	{ .name = "max98095", .driver_data = MAX98095 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max98095_i2c_id);
diff --git a/sound/soc/codecs/max98371.c b/sound/soc/codecs/max98371.c
index 852db211ba1e..c8d4c68af562 100644
--- a/sound/soc/codecs/max98371.c
+++ b/sound/soc/codecs/max98371.c
@@ -400,7 +400,7 @@ static int max98371_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98371_i2c_id[] = {
-	{ "max98371" },
+	{ .name = "max98371" },
 	{ }
 };
 
diff --git a/sound/soc/codecs/max98373-i2c.c b/sound/soc/codecs/max98373-i2c.c
index f58b8c8625a7..20de379d08de 100644
--- a/sound/soc/codecs/max98373-i2c.c
+++ b/sound/soc/codecs/max98373-i2c.c
@@ -576,8 +576,8 @@ static int max98373_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98373_i2c_id[] = {
-	{ "max98373"},
-	{ },
+	{ .name = "max98373" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, max98373_i2c_id);
diff --git a/sound/soc/codecs/max98388.c b/sound/soc/codecs/max98388.c
index 076f15a9867e..2576841b7de2 100644
--- a/sound/soc/codecs/max98388.c
+++ b/sound/soc/codecs/max98388.c
@@ -977,8 +977,8 @@ static int max98388_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98388_i2c_id[] = {
-	{ "max98388"},
-	{ },
+	{ .name = "max98388" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, max98388_i2c_id);
diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs/max98390.c
index 65f095c47191..2bbedf84ee5d 100644
--- a/sound/soc/codecs/max98390.c
+++ b/sound/soc/codecs/max98390.c
@@ -1096,8 +1096,8 @@ static int max98390_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98390_i2c_id[] = {
-	{ "max98390"},
-	{},
+	{ .name = "max98390" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, max98390_i2c_id);
diff --git a/sound/soc/codecs/max98396.c b/sound/soc/codecs/max98396.c
index 18fd90227187..9c1d7213410c 100644
--- a/sound/soc/codecs/max98396.c
+++ b/sound/soc/codecs/max98396.c
@@ -1871,9 +1871,9 @@ static int max98396_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98396_i2c_id[] = {
-	{ "max98396", CODEC_TYPE_MAX98396},
-	{ "max98397", CODEC_TYPE_MAX98397},
-	{ },
+	{ .name = "max98396", .driver_data = CODEC_TYPE_MAX98396 },
+	{ .name = "max98397", .driver_data = CODEC_TYPE_MAX98397 },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, max98396_i2c_id);
diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c
index 1fcbc64a2771..9bd6a61212c1 100644
--- a/sound/soc/codecs/max9850.c
+++ b/sound/soc/codecs/max9850.c
@@ -321,7 +321,7 @@ static int max9850_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max9850_i2c_id[] = {
-	{ "max9850" },
+	{ .name = "max9850" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max9850_i2c_id);
diff --git a/sound/soc/codecs/max98504.c b/sound/soc/codecs/max98504.c
index c94142768c81..8b2620eaf9b0 100644
--- a/sound/soc/codecs/max98504.c
+++ b/sound/soc/codecs/max98504.c
@@ -363,7 +363,7 @@ MODULE_DEVICE_TABLE(of, max98504_of_match);
 #endif
 
 static const struct i2c_device_id max98504_i2c_id[] = {
-	{ "max98504" },
+	{ .name = "max98504" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max98504_i2c_id);
diff --git a/sound/soc/codecs/max98520.c b/sound/soc/codecs/max98520.c
index 5bc3d95ade5a..4fb98505db1a 100644
--- a/sound/soc/codecs/max98520.c
+++ b/sound/soc/codecs/max98520.c
@@ -734,8 +734,8 @@ static int max98520_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98520_i2c_id[] = {
-	{ "max98520"},
-	{ },
+	{ .name = "max98520" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, max98520_i2c_id);
diff --git a/sound/soc/codecs/max9860.c b/sound/soc/codecs/max9860.c
index 716d16daf7d7..0d7ac37850bb 100644
--- a/sound/soc/codecs/max9860.c
+++ b/sound/soc/codecs/max9860.c
@@ -709,7 +709,7 @@ static void max9860_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max9860_i2c_id[] = {
-	{ "max9860", },
+	{ .name = "max9860" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max9860_i2c_id);
diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index 9cad9b698cf2..07a53ec2a18a 100644
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -689,7 +689,7 @@ static int max9867_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max9867_i2c_id[] = {
-	{ "max9867" },
+	{ .name = "max9867" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max9867_i2c_id);
diff --git a/sound/soc/codecs/max9877.c b/sound/soc/codecs/max9877.c
index 1bd0d4761ca6..7cd07b6f9dd6 100644
--- a/sound/soc/codecs/max9877.c
+++ b/sound/soc/codecs/max9877.c
@@ -151,7 +151,7 @@ static int max9877_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max9877_i2c_id[] = {
-	{ "max9877" },
+	{ .name = "max9877" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max9877_i2c_id);
diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c
index 124af6408d96..4302ab16a642 100644
--- a/sound/soc/codecs/max98925.c
+++ b/sound/soc/codecs/max98925.c
@@ -617,7 +617,7 @@ static int max98925_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98925_i2c_id[] = {
-	{ "max98925" },
+	{ .name = "max98925" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max98925_i2c_id);
diff --git a/sound/soc/codecs/max98926.c b/sound/soc/codecs/max98926.c
index ae962bda163e..5305e1f9d97f 100644
--- a/sound/soc/codecs/max98926.c
+++ b/sound/soc/codecs/max98926.c
@@ -565,7 +565,7 @@ static int max98926_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98926_i2c_id[] = {
-	{ "max98926" },
+	{ .name = "max98926" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max98926_i2c_id);
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c
index 0e9b8970997c..65e6fdb30eec 100644
--- a/sound/soc/codecs/max98927.c
+++ b/sound/soc/codecs/max98927.c
@@ -873,8 +873,8 @@ static void max98927_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id max98927_i2c_id[] = {
-	{ "max98927"},
-	{ },
+	{ .name = "max98927" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, max98927_i2c_id);
diff --git a/sound/soc/codecs/ml26124.c b/sound/soc/codecs/ml26124.c
index fad0cc902346..8a14626d43ff 100644
--- a/sound/soc/codecs/ml26124.c
+++ b/sound/soc/codecs/ml26124.c
@@ -573,7 +573,7 @@ static int ml26124_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id ml26124_i2c_id[] = {
-	{ "ml26124" },
+	{ .name = "ml26124" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ml26124_i2c_id);
diff --git a/sound/soc/codecs/mt6660.c b/sound/soc/codecs/mt6660.c
index ef63fd113cb7..21741afc80ef 100644
--- a/sound/soc/codecs/mt6660.c
+++ b/sound/soc/codecs/mt6660.c
@@ -557,8 +557,8 @@ static const struct of_device_id __maybe_unused mt6660_of_id[] = {
 MODULE_DEVICE_TABLE(of, mt6660_of_id);
 
 static const struct i2c_device_id mt6660_i2c_id[] = {
-	{"mt6660" },
-	{},
+	{ .name = "mt6660" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, mt6660_i2c_id);
 
diff --git a/sound/soc/codecs/nau8325.c b/sound/soc/codecs/nau8325.c
index 58ef5c493835..236d94c29c24 100644
--- a/sound/soc/codecs/nau8325.c
+++ b/sound/soc/codecs/nau8325.c
@@ -877,7 +877,7 @@ static int nau8325_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id nau8325_i2c_ids[] = {
-	{ "nau8325" },
+	{ .name = "nau8325" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, nau8325_i2c_ids);
diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c
index caf2edb23088..fefbd5722c00 100644
--- a/sound/soc/codecs/nau8540.c
+++ b/sound/soc/codecs/nau8540.c
@@ -965,7 +965,7 @@ static int nau8540_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id nau8540_i2c_ids[] = {
-	{ "nau8540" },
+	{ .name = "nau8540" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, nau8540_i2c_ids);
diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c
index 9870e62d372e..a050387dd485 100644
--- a/sound/soc/codecs/nau8810.c
+++ b/sound/soc/codecs/nau8810.c
@@ -896,9 +896,9 @@ static int nau8810_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id nau8810_i2c_id[] = {
-	{ "nau8810" },
-	{ "nau8812" },
-	{ "nau8814" },
+	{ .name = "nau8810" },
+	{ .name = "nau8812" },
+	{ .name = "nau8814" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, nau8810_i2c_id);
diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c
index ffb526de0021..c45c5b864ea4 100644
--- a/sound/soc/codecs/nau8821.c
+++ b/sound/soc/codecs/nau8821.c
@@ -1968,7 +1968,7 @@ static int nau8821_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id nau8821_i2c_ids[] = {
-	{ "nau8821" },
+	{ .name = "nau8821" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, nau8821_i2c_ids);
diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c
index a11759f85eac..19fee5f4bf5f 100644
--- a/sound/soc/codecs/nau8822.c
+++ b/sound/soc/codecs/nau8822.c
@@ -1193,7 +1193,7 @@ static int nau8822_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id nau8822_i2c_id[] = {
-	{ "nau8822" },
+	{ .name = "nau8822" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, nau8822_i2c_id);
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
index 6ce763762443..426a488ff2a3 100644
--- a/sound/soc/codecs/nau8824.c
+++ b/sound/soc/codecs/nau8824.c
@@ -2020,7 +2020,7 @@ static int nau8824_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id nau8824_i2c_ids[] = {
-	{ "nau8824" },
+	{ .name = "nau8824" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, nau8824_i2c_ids);
diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index c6df21b91e36..8db90b933eeb 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -2931,7 +2931,7 @@ static int nau8825_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id nau8825_i2c_ids[] = {
-	{ "nau8825" },
+	{ .name = "nau8825" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, nau8825_i2c_ids);
diff --git a/sound/soc/codecs/ntp8835.c b/sound/soc/codecs/ntp8835.c
index 2b93bea11752..5837b9379fee 100644
--- a/sound/soc/codecs/ntp8835.c
+++ b/sound/soc/codecs/ntp8835.c
@@ -454,8 +454,8 @@ static int ntp8835_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id ntp8835_i2c_id[] = {
-	{ "ntp8835" },
-	{}
+	{ .name = "ntp8835" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ntp8835_i2c_id);
 
diff --git a/sound/soc/codecs/ntp8918.c b/sound/soc/codecs/ntp8918.c
index 5593d48ef696..a18d79aa80aa 100644
--- a/sound/soc/codecs/ntp8918.c
+++ b/sound/soc/codecs/ntp8918.c
@@ -370,8 +370,8 @@ static int ntp8918_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id ntp8918_i2c_id[] = {
-	{ "ntp8918" },
-	{}
+	{ .name = "ntp8918" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ntp8918_i2c_id);
 
diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
index f4e5f3133f2b..cb923cecb47f 100644
--- a/sound/soc/codecs/pcm1681.c
+++ b/sound/soc/codecs/pcm1681.c
@@ -290,8 +290,8 @@ static const struct snd_soc_component_driver soc_component_dev_pcm1681 = {
 };
 
 static const struct i2c_device_id pcm1681_i2c_id[] = {
-	{"pcm1681"},
-	{}
+	{ .name = "pcm1681" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, pcm1681_i2c_id);
 
diff --git a/sound/soc/codecs/pcm1789-i2c.c b/sound/soc/codecs/pcm1789-i2c.c
index abadf4f8ed5e..4f1bb13fd4c3 100644
--- a/sound/soc/codecs/pcm1789-i2c.c
+++ b/sound/soc/codecs/pcm1789-i2c.c
@@ -41,7 +41,7 @@ MODULE_DEVICE_TABLE(of, pcm1789_of_match);
 #endif
 
 static const struct i2c_device_id pcm1789_i2c_ids[] = {
-	{ "pcm1789" },
+	{ .name = "pcm1789" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, pcm1789_i2c_ids);
diff --git a/sound/soc/codecs/pcm179x-i2c.c b/sound/soc/codecs/pcm179x-i2c.c
index effc1dd6df22..5337bcc7c62c 100644
--- a/sound/soc/codecs/pcm179x-i2c.c
+++ b/sound/soc/codecs/pcm179x-i2c.c
@@ -38,7 +38,7 @@ MODULE_DEVICE_TABLE(of, pcm179x_of_match);
 #endif
 
 static const struct i2c_device_id pcm179x_i2c_ids[] = {
-	{ "pcm179x" },
+	{ .name = "pcm179x" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, pcm179x_i2c_ids);
diff --git a/sound/soc/codecs/pcm186x-i2c.c b/sound/soc/codecs/pcm186x-i2c.c
index a50f9f6e39c1..3bd9d557e3c2 100644
--- a/sound/soc/codecs/pcm186x-i2c.c
+++ b/sound/soc/codecs/pcm186x-i2c.c
@@ -23,10 +23,10 @@ static const struct of_device_id pcm186x_of_match[] = {
 MODULE_DEVICE_TABLE(of, pcm186x_of_match);
 
 static const struct i2c_device_id pcm186x_i2c_id[] = {
-	{ "pcm1862", PCM1862 },
-	{ "pcm1863", PCM1863 },
-	{ "pcm1864", PCM1864 },
-	{ "pcm1865", PCM1865 },
+	{ .name = "pcm1862", .driver_data = PCM1862 },
+	{ .name = "pcm1863", .driver_data = PCM1863 },
+	{ .name = "pcm1864", .driver_data = PCM1864 },
+	{ .name = "pcm1865", .driver_data = PCM1865 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, pcm186x_i2c_id);
diff --git a/sound/soc/codecs/pcm3168a-i2c.c b/sound/soc/codecs/pcm3168a-i2c.c
index ff18c74b616c..334f344761aa 100644
--- a/sound/soc/codecs/pcm3168a-i2c.c
+++ b/sound/soc/codecs/pcm3168a-i2c.c
@@ -33,7 +33,7 @@ static void pcm3168a_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id pcm3168a_i2c_id[] = {
-	{ "pcm3168a", },
+	{ .name = "pcm3168a" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, pcm3168a_i2c_id);
diff --git a/sound/soc/codecs/pcm512x-i2c.c b/sound/soc/codecs/pcm512x-i2c.c
index a1d849b0c50f..836865d11d22 100644
--- a/sound/soc/codecs/pcm512x-i2c.c
+++ b/sound/soc/codecs/pcm512x-i2c.c
@@ -35,13 +35,13 @@ static void pcm512x_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id pcm512x_i2c_id[] = {
-	{ "pcm5121", },
-	{ "pcm5122", },
-	{ "pcm5141", },
-	{ "pcm5142", },
-	{ "pcm5242", },
-	{ "tas5754", },
-	{ "tas5756", },
+	{ .name = "pcm5121" },
+	{ .name = "pcm5122" },
+	{ .name = "pcm5141" },
+	{ .name = "pcm5142" },
+	{ .name = "pcm5242" },
+	{ .name = "tas5754" },
+	{ .name = "tas5756" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, pcm512x_i2c_id);
diff --git a/sound/soc/codecs/pcm6240.c b/sound/soc/codecs/pcm6240.c
index 78b21fbfad50..27ff8d0983b0 100644
--- a/sound/soc/codecs/pcm6240.c
+++ b/sound/soc/codecs/pcm6240.c
@@ -27,28 +27,28 @@
 #include "pcm6240.h"
 
 static const struct i2c_device_id pcmdevice_i2c_id[] = {
-	{ "adc3120",  ADC3120  },
-	{ "adc5120",  ADC5120  },
-	{ "adc6120",  ADC6120  },
-	{ "dix4192",  DIX4192  },
-	{ "pcm1690",  PCM1690  },
-	{ "pcm3120",  PCM3120  },
-	{ "pcm3140",  PCM3140  },
-	{ "pcm5120",  PCM5120  },
-	{ "pcm5140",  PCM5140  },
-	{ "pcm6120",  PCM6120  },
-	{ "pcm6140",  PCM6140  },
-	{ "pcm6240",  PCM6240  },
-	{ "pcm6260",  PCM6260  },
-	{ "pcm9211",  PCM9211  },
-	{ "pcmd3140", PCMD3140 },
-	{ "pcmd3180", PCMD3180 },
-	{ "pcmd512x", PCMD512X },
-	{ "taa5212",  TAA5212  },
-	{ "taa5412",  TAA5412  },
-	{ "tad5212",  TAD5212  },
-	{ "tad5412",  TAD5412  },
-	{}
+	{ .name = "adc3120", .driver_data = ADC3120 },
+	{ .name = "adc5120", .driver_data = ADC5120 },
+	{ .name = "adc6120", .driver_data = ADC6120 },
+	{ .name = "dix4192", .driver_data = DIX4192 },
+	{ .name = "pcm1690", .driver_data = PCM1690 },
+	{ .name = "pcm3120", .driver_data = PCM3120 },
+	{ .name = "pcm3140", .driver_data = PCM3140 },
+	{ .name = "pcm5120", .driver_data = PCM5120 },
+	{ .name = "pcm5140", .driver_data = PCM5140 },
+	{ .name = "pcm6120", .driver_data = PCM6120 },
+	{ .name = "pcm6140", .driver_data = PCM6140 },
+	{ .name = "pcm6240", .driver_data = PCM6240 },
+	{ .name = "pcm6260", .driver_data = PCM6260 },
+	{ .name = "pcm9211", .driver_data = PCM9211 },
+	{ .name = "pcmd3140", .driver_data = PCMD3140 },
+	{ .name = "pcmd3180", .driver_data = PCMD3180 },
+	{ .name = "pcmd512x", .driver_data = PCMD512X },
+	{ .name = "taa5212", .driver_data = TAA5212 },
+	{ .name = "taa5412", .driver_data = TAA5412 },
+	{ .name = "tad5212", .driver_data = TAD5212 },
+	{ .name = "tad5412", .driver_data = TAD5412 },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, pcmdevice_i2c_id);
 
diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c
index 03f31d9d916e..15488a059283 100644
--- a/sound/soc/codecs/rt1011.c
+++ b/sound/soc/codecs/rt1011.c
@@ -2201,7 +2201,7 @@ MODULE_DEVICE_TABLE(acpi, rt1011_acpi_match);
 #endif
 
 static const struct i2c_device_id rt1011_i2c_id[] = {
-	{ "rt1011" },
+	{ .name = "rt1011" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt1011_i2c_id);
diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c
index ca1ed9d5a24e..ff0c08ff610e 100644
--- a/sound/soc/codecs/rt1015.c
+++ b/sound/soc/codecs/rt1015.c
@@ -1094,7 +1094,7 @@ static const struct regmap_config rt1015_regmap = {
 };
 
 static const struct i2c_device_id rt1015_i2c_id[] = {
-	{ "rt1015" },
+	{ .name = "rt1015" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt1015_i2c_id);
diff --git a/sound/soc/codecs/rt1016.c b/sound/soc/codecs/rt1016.c
index 9f86f071fca8..11c8c45574a1 100644
--- a/sound/soc/codecs/rt1016.c
+++ b/sound/soc/codecs/rt1016.c
@@ -608,7 +608,7 @@ static const struct regmap_config rt1016_regmap = {
 };
 
 static const struct i2c_device_id rt1016_i2c_id[] = {
-	{ "rt1016" },
+	{ .name = "rt1016" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt1016_i2c_id);
diff --git a/sound/soc/codecs/rt1019.c b/sound/soc/codecs/rt1019.c
index 86539c6f6cc1..370521149ac8 100644
--- a/sound/soc/codecs/rt1019.c
+++ b/sound/soc/codecs/rt1019.c
@@ -540,7 +540,7 @@ static const struct regmap_config rt1019_regmap = {
 };
 
 static const struct i2c_device_id rt1019_i2c_id[] = {
-	{ "rt1019" },
+	{ .name = "rt1019" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt1019_i2c_id);
diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c
index 26b7382f97ef..2d5fad76cf52 100644
--- a/sound/soc/codecs/rt1305.c
+++ b/sound/soc/codecs/rt1305.c
@@ -981,8 +981,8 @@ MODULE_DEVICE_TABLE(acpi, rt1305_acpi_match);
 #endif
 
 static const struct i2c_device_id rt1305_i2c_id[] = {
-	{ "rt1305" },
-	{ "rt1306" },
+	{ .name = "rt1305" },
+	{ .name = "rt1306" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt1305_i2c_id);
diff --git a/sound/soc/codecs/rt1308.c b/sound/soc/codecs/rt1308.c
index df50b38c24b9..630946cd7cdf 100644
--- a/sound/soc/codecs/rt1308.c
+++ b/sound/soc/codecs/rt1308.c
@@ -795,7 +795,7 @@ MODULE_DEVICE_TABLE(acpi, rt1308_acpi_match);
 #endif
 
 static const struct i2c_device_id rt1308_i2c_id[] = {
-	{ "rt1308" },
+	{ .name = "rt1308" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt1308_i2c_id);
diff --git a/sound/soc/codecs/rt1318.c b/sound/soc/codecs/rt1318.c
index a80643099644..d13fd0e14125 100644
--- a/sound/soc/codecs/rt1318.c
+++ b/sound/soc/codecs/rt1318.c
@@ -1139,7 +1139,7 @@ static const struct regmap_config rt1318_regmap = {
 };
 
 static const struct i2c_device_id rt1318_i2c_id[] = {
-	{ "rt1318" },
+	{ .name = "rt1318" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt1318_i2c_id);
diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
index bba714020c70..63b5fc439773 100644
--- a/sound/soc/codecs/rt274.c
+++ b/sound/soc/codecs/rt274.c
@@ -1098,8 +1098,8 @@ MODULE_DEVICE_TABLE(of, rt274_of_match);
 #endif
 
 static const struct i2c_device_id rt274_i2c_id[] = {
-	{"rt274"},
-	{}
+	{ .name = "rt274" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt274_i2c_id);
 
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 195658f626cc..ded0ea332480 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -1077,9 +1077,9 @@ static const struct regmap_config rt286_regmap = {
 };
 
 static const struct i2c_device_id rt286_i2c_id[] = {
-	{"rt286"},
-	{"rt288"},
-	{}
+	{ .name = "rt286" },
+	{ .name = "rt288" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt286_i2c_id);
 
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index 7d532a5a5f73..5414a1712b57 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.c
@@ -1138,8 +1138,8 @@ static const struct regmap_config rt298_regmap = {
 };
 
 static const struct i2c_device_id rt298_i2c_id[] = {
-	{"rt298"},
-	{}
+	{ .name = "rt298" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt298_i2c_id);
 
diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c
index 649b44b790b0..00a4a208d2fa 100644
--- a/sound/soc/codecs/rt5514.c
+++ b/sound/soc/codecs/rt5514.c
@@ -1200,7 +1200,7 @@ static const struct regmap_config rt5514_regmap = {
 };
 
 static const struct i2c_device_id rt5514_i2c_id[] = {
-	{ "rt5514" },
+	{ .name = "rt5514" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5514_i2c_id);
diff --git a/sound/soc/codecs/rt5575.c b/sound/soc/codecs/rt5575.c
index 24e41af29689..5c3e60eaa6a4 100644
--- a/sound/soc/codecs/rt5575.c
+++ b/sound/soc/codecs/rt5575.c
@@ -325,7 +325,7 @@ static int rt5575_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id rt5575_i2c_id[] = {
-	{ "rt5575" },
+	{ .name = "rt5575" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5575_i2c_id);
diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c
index 005a2ffe90ae..46ee412dc81d 100644
--- a/sound/soc/codecs/rt5616.c
+++ b/sound/soc/codecs/rt5616.c
@@ -1321,7 +1321,7 @@ static const struct regmap_config rt5616_regmap = {
 };
 
 static const struct i2c_device_id rt5616_i2c_id[] = {
-	{ "rt5616" },
+	{ .name = "rt5616" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5616_i2c_id);
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 2c404a50b120..ed1233973eb8 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1671,8 +1671,8 @@ static const struct snd_soc_component_driver soc_component_dev_rt5631 = {
 };
 
 static const struct i2c_device_id rt5631_i2c_id[] = {
-	{ "rt5631" },
-	{ "alc5631" },
+	{ .name = "rt5631" },
+	{ .name = "alc5631" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index f6c6294e1588..8ae4033508ab 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -2958,9 +2958,9 @@ static const struct regmap_config rt5640_regmap = {
 };
 
 static const struct i2c_device_id rt5640_i2c_id[] = {
-	{ "rt5640" },
-	{ "rt5639" },
-	{ "rt5642" },
+	{ .name = "rt5640" },
+	{ .name = "rt5639" },
+	{ .name = "rt5642" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id);
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index f7701b8d0d3c..8a9af260e5f7 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3646,8 +3646,8 @@ static const struct regmap_config temp_regmap = {
 };
 
 static const struct i2c_device_id rt5645_i2c_id[] = {
-	{ "rt5645" },
-	{ "rt5650" },
+	{ .name = "rt5645" },
+	{ .name = "rt5650" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id);
diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index 23c4bf3da298..5c729135f71b 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -2202,7 +2202,7 @@ MODULE_DEVICE_TABLE(acpi, rt5651_acpi_match);
 #endif
 
 static const struct i2c_device_id rt5651_i2c_id[] = {
-	{ "rt5651" },
+	{ .name = "rt5651" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5651_i2c_id);
diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
index 3590ebd41c27..3097ee6d4e89 100644
--- a/sound/soc/codecs/rt5659.c
+++ b/sound/soc/codecs/rt5659.c
@@ -3814,8 +3814,8 @@ static const struct regmap_config rt5659_regmap = {
 };
 
 static const struct i2c_device_id rt5659_i2c_id[] = {
-	{ "rt5658" },
-	{ "rt5659" },
+	{ .name = "rt5658" },
+	{ .name = "rt5659" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5659_i2c_id);
diff --git a/sound/soc/codecs/rt5660.c b/sound/soc/codecs/rt5660.c
index 84cdfb810c66..edf2e3e346e4 100644
--- a/sound/soc/codecs/rt5660.c
+++ b/sound/soc/codecs/rt5660.c
@@ -1225,7 +1225,7 @@ static const struct regmap_config rt5660_regmap = {
 };
 
 static const struct i2c_device_id rt5660_i2c_id[] = {
-	{ "rt5660" },
+	{ .name = "rt5660" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5660_i2c_id);
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index eee1c98cc4aa..262d3bba1f3d 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -3307,8 +3307,8 @@ static const struct regmap_config temp_regmap = {
 };
 
 static const struct i2c_device_id rt5663_i2c_id[] = {
-	{ "rt5663" },
-	{}
+	{ .name = "rt5663" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5663_i2c_id);
 
diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c
index 38fb3a277e26..48f57cd0920d 100644
--- a/sound/soc/codecs/rt5665.c
+++ b/sound/soc/codecs/rt5665.c
@@ -4534,8 +4534,8 @@ static const struct regmap_config rt5665_regmap = {
 };
 
 static const struct i2c_device_id rt5665_i2c_id[] = {
-	{"rt5665"},
-	{}
+	{ .name = "rt5665" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5665_i2c_id);
 
diff --git a/sound/soc/codecs/rt5668.c b/sound/soc/codecs/rt5668.c
index c551696ae11a..fed6de40b8c8 100644
--- a/sound/soc/codecs/rt5668.c
+++ b/sound/soc/codecs/rt5668.c
@@ -2334,8 +2334,8 @@ static const struct regmap_config rt5668_regmap = {
 };
 
 static const struct i2c_device_id rt5668_i2c_id[] = {
-	{"rt5668b"},
-	{}
+	{ .name = "rt5668b" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5668_i2c_id);
 
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index cb5d03bf4c7f..1d120b5dc2be 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -2876,9 +2876,9 @@ static const struct regmap_config rt5670_regmap = {
 };
 
 static const struct i2c_device_id rt5670_i2c_id[] = {
-	{ "rt5670" },
-	{ "rt5671" },
-	{ "rt5672" },
+	{ .name = "rt5670" },
+	{ .name = "rt5671" },
+	{ .name = "rt5672" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id);
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index 60a93c3fe2e7..ac084ca008f3 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -5210,7 +5210,7 @@ static const struct acpi_device_id rt5677_acpi_match[] = {
 MODULE_DEVICE_TABLE(acpi, rt5677_acpi_match);
 
 static const struct i2c_device_id rt5677_i2c_id[] = {
-	{ "rt5677", RT5677 },
+	{ .name = "rt5677", .driver_data = RT5677 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5677_i2c_id);
diff --git a/sound/soc/codecs/rt5682-i2c.c b/sound/soc/codecs/rt5682-i2c.c
index e556a365adc8..286cf0d17968 100644
--- a/sound/soc/codecs/rt5682-i2c.c
+++ b/sound/soc/codecs/rt5682-i2c.c
@@ -324,8 +324,8 @@ static const struct acpi_device_id rt5682_acpi_match[] = {
 MODULE_DEVICE_TABLE(acpi, rt5682_acpi_match);
 
 static const struct i2c_device_id rt5682_i2c_id[] = {
-	{"rt5682"},
-	{}
+	{ .name = "rt5682" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5682_i2c_id);
 
diff --git a/sound/soc/codecs/rt5682s.c b/sound/soc/codecs/rt5682s.c
index 98de94a79260..3624067950c0 100644
--- a/sound/soc/codecs/rt5682s.c
+++ b/sound/soc/codecs/rt5682s.c
@@ -3325,8 +3325,8 @@ static const struct acpi_device_id rt5682s_acpi_match[] = {
 MODULE_DEVICE_TABLE(acpi, rt5682s_acpi_match);
 
 static const struct i2c_device_id rt5682s_i2c_id[] = {
-	{"rt5682s"},
-	{}
+	{ .name = "rt5682s" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, rt5682s_i2c_id);
 
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 320312f8db92..59642673b4cb 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1809,8 +1809,8 @@ static void sgtl5000_i2c_shutdown(struct i2c_client *client)
 }
 
 static const struct i2c_device_id sgtl5000_id[] = {
-	{"sgtl5000"},
-	{},
+	{ .name = "sgtl5000" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, sgtl5000_id);
diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c
index 06de2b4fce5e..c7aaf98ef71e 100644
--- a/sound/soc/codecs/sma1303.c
+++ b/sound/soc/codecs/sma1303.c
@@ -1782,8 +1782,8 @@ static void sma1303_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id sma1303_i2c_id[] = {
-	{"sma1303"},
-	{}
+	{ .name = "sma1303" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, sma1303_i2c_id);
 
diff --git a/sound/soc/codecs/sma1307.c b/sound/soc/codecs/sma1307.c
index 5850bf6e71ca..1de6bd1e4ee7 100644
--- a/sound/soc/codecs/sma1307.c
+++ b/sound/soc/codecs/sma1307.c
@@ -2008,8 +2008,8 @@ static void sma1307_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id sma1307_i2c_id[] = {
-	{ "sma1307a" },
-	{ "sma1307aq" },
+	{ .name = "sma1307a" },
+	{ .name = "sma1307aq" },
 	{ }
 };
 
diff --git a/sound/soc/codecs/src4xxx-i2c.c b/sound/soc/codecs/src4xxx-i2c.c
index 55f00ce7c718..34b3abdb9a70 100644
--- a/sound/soc/codecs/src4xxx-i2c.c
+++ b/sound/soc/codecs/src4xxx-i2c.c
@@ -19,7 +19,7 @@ static int src4xxx_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id src4xxx_i2c_ids[] = {
-	{ "src4392" },
+	{ .name = "src4392" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, src4xxx_i2c_ids);
diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
index 9008e5416004..5192569ba6a8 100644
--- a/sound/soc/codecs/ssm2518.c
+++ b/sound/soc/codecs/ssm2518.c
@@ -794,7 +794,7 @@ MODULE_DEVICE_TABLE(of, ssm2518_dt_ids);
 #endif
 
 static const struct i2c_device_id ssm2518_i2c_ids[] = {
-	{ "ssm2518" },
+	{ .name = "ssm2518" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ssm2518_i2c_ids);
diff --git a/sound/soc/codecs/ssm2602-i2c.c b/sound/soc/codecs/ssm2602-i2c.c
index 49c74cba17c7..23570d0a2f53 100644
--- a/sound/soc/codecs/ssm2602-i2c.c
+++ b/sound/soc/codecs/ssm2602-i2c.c
@@ -26,9 +26,9 @@ static int ssm2602_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ssm2602_i2c_id[] = {
-	{ "ssm2602", SSM2602 },
-	{ "ssm2603", SSM2602 },
-	{ "ssm2604", SSM2604 },
+	{ .name = "ssm2602", .driver_data = SSM2602 },
+	{ .name = "ssm2603", .driver_data = SSM2602 },
+	{ .name = "ssm2604", .driver_data = SSM2604 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ssm2602_i2c_id);
diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c
index 15f88624faeb..8415dd163edd 100644
--- a/sound/soc/codecs/ssm4567.c
+++ b/sound/soc/codecs/ssm4567.c
@@ -472,7 +472,7 @@ static int ssm4567_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id ssm4567_i2c_ids[] = {
-	{ "ssm4567" },
+	{ .name = "ssm4567" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ssm4567_i2c_ids);
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index b9f9784f5164..652c6e3a9e63 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -1154,9 +1154,9 @@ static int sta32x_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id sta32x_i2c_id[] = {
-	{ "sta326" },
-	{ "sta328" },
-	{ "sta329" },
+	{ .name = "sta326" },
+	{ .name = "sta328" },
+	{ .name = "sta329" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, sta32x_i2c_id);
diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c
index 0d36cb06dced..99c7f7ac807b 100644
--- a/sound/soc/codecs/sta350.c
+++ b/sound/soc/codecs/sta350.c
@@ -1237,7 +1237,7 @@ static int sta350_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id sta350_i2c_id[] = {
-	{ "sta350" },
+	{ .name = "sta350" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, sta350_i2c_id);
diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c
index 946aa6a4e57c..7d57999f9cb1 100644
--- a/sound/soc/codecs/sta529.c
+++ b/sound/soc/codecs/sta529.c
@@ -361,7 +361,7 @@ static int sta529_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id sta529_i2c_id[] = {
-	{ "sta529" },
+	{ .name = "sta529" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, sta529_i2c_id);
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index 80206c2e0946..1a7650b9b2a7 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -745,7 +745,7 @@ static void tas2552_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tas2552_id[] = {
-	{ "tas2552" },
+	{ .name = "tas2552" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas2552_id);
diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c
index ceb367ae05ba..2f7cfc2be970 100644
--- a/sound/soc/codecs/tas2562.c
+++ b/sound/soc/codecs/tas2562.c
@@ -711,9 +711,9 @@ static int tas2562_parse_dt(struct tas2562_data *tas2562)
 }
 
 static const struct i2c_device_id tas2562_id[] = {
-	{ "tas2562", TAS2562 },
-	{ "tas2564", TAS2564 },
-	{ "tas2110", TAS2110 },
+	{ .name = "tas2562", .driver_data = TAS2562 },
+	{ .name = "tas2564", .driver_data = TAS2564 },
+	{ .name = "tas2110", .driver_data = TAS2110 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas2562_id);
diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c
index 423b7073b302..ea3f92499fc6 100644
--- a/sound/soc/codecs/tas2764.c
+++ b/sound/soc/codecs/tas2764.c
@@ -1016,7 +1016,7 @@ static int tas2764_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tas2764_i2c_id[] = {
-	{ "tas2764"},
+	{ .name = "tas2764" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas2764_i2c_id);
diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c
index d4d7d056141b..7b75ae3bff4a 100644
--- a/sound/soc/codecs/tas2770.c
+++ b/sound/soc/codecs/tas2770.c
@@ -937,7 +937,7 @@ static int tas2770_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tas2770_i2c_id[] = {
-	{ "tas2770"},
+	{ .name = "tas2770" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas2770_i2c_id);
diff --git a/sound/soc/codecs/tas2780.c b/sound/soc/codecs/tas2780.c
index cf3f6abd7e7b..1ec1c076204f 100644
--- a/sound/soc/codecs/tas2780.c
+++ b/sound/soc/codecs/tas2780.c
@@ -621,7 +621,7 @@ static int tas2780_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tas2780_i2c_id[] = {
-	{ "tas2780"},
+	{ .name = "tas2780" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas2780_i2c_id);
diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index a78a8f9b9833..620ed4ef577d 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -100,27 +100,27 @@ static const struct bulk_reg_val tas2781_cali_start_reg[] = {
 };
 
 static const struct i2c_device_id tasdevice_id[] = {
-	{ "tas2020", TAS2020 },
-	{ "tas2118", TAS2118 },
-	{ "tas2120", TAS2120 },
-	{ "tas2320", TAS2320 },
-	{ "tas2563", TAS2563 },
-	{ "tas2568", TAS2568 },
-	{ "tas2570", TAS2570 },
-	{ "tas2572", TAS2572 },
-	{ "tas2574", TAS2574 },
-	{ "tas2781", TAS2781 },
-	{ "tas5802", TAS5802 },
-	{ "tas5806m", TAS5806M },
-	{ "tas5806md", TAS5806MD },
-	{ "tas5815", TAS5815 },
-	{ "tas5822", TAS5822 },
-	{ "tas5825", TAS5825 },
-	{ "tas5827", TAS5827 },
-	{ "tas5828", TAS5828 },
-	{ "tas5830", TAS5830 },
-	{ "tas5832", TAS5832 },
-	{}
+	{ .name = "tas2020", .driver_data = TAS2020 },
+	{ .name = "tas2118", .driver_data = TAS2118 },
+	{ .name = "tas2120", .driver_data = TAS2120 },
+	{ .name = "tas2320", .driver_data = TAS2320 },
+	{ .name = "tas2563", .driver_data = TAS2563 },
+	{ .name = "tas2568", .driver_data = TAS2568 },
+	{ .name = "tas2570", .driver_data = TAS2570 },
+	{ .name = "tas2572", .driver_data = TAS2572 },
+	{ .name = "tas2574", .driver_data = TAS2574 },
+	{ .name = "tas2781", .driver_data = TAS2781 },
+	{ .name = "tas5802", .driver_data = TAS5802 },
+	{ .name = "tas5806m", .driver_data = TAS5806M },
+	{ .name = "tas5806md", .driver_data = TAS5806MD },
+	{ .name = "tas5815", .driver_data = TAS5815 },
+	{ .name = "tas5822", .driver_data = TAS5822 },
+	{ .name = "tas5825", .driver_data = TAS5825 },
+	{ .name = "tas5827", .driver_data = TAS5827 },
+	{ .name = "tas5828", .driver_data = TAS5828 },
+	{ .name = "tas5830", .driver_data = TAS5830 },
+	{ .name = "tas5832", .driver_data = TAS5832 },
+	{ }
 };
 
 static const struct of_device_id tasdevice_of_match[] = {
diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
index 36596b00ca69..4d1c122c8f04 100644
--- a/sound/soc/codecs/tas5086.c
+++ b/sound/soc/codecs/tas5086.c
@@ -891,7 +891,7 @@ static const struct snd_soc_component_driver soc_component_dev_tas5086 = {
 };
 
 static const struct i2c_device_id tas5086_i2c_id[] = {
-	{ "tas5086" },
+	{ .name = "tas5086" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas5086_i2c_id);
diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index 19ccf8641e16..8b5f9accf120 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -1064,13 +1064,13 @@ static const struct of_device_id tas571x_of_match[] __maybe_unused = {
 MODULE_DEVICE_TABLE(of, tas571x_of_match);
 
 static const struct i2c_device_id tas571x_i2c_id[] = {
-	{ "tas5707", (kernel_ulong_t) &tas5707_chip },
-	{ "tas5711", (kernel_ulong_t) &tas5711_chip },
-	{ "tas5717", (kernel_ulong_t) &tas5717_chip },
-	{ "tas5719", (kernel_ulong_t) &tas5717_chip },
-	{ "tas5721", (kernel_ulong_t) &tas5721_chip },
-	{ "tas5733", (kernel_ulong_t) &tas5733_chip },
-	{ "tas5753", (kernel_ulong_t) &tas5753_chip },
+	{ .name = "tas5707", .driver_data = (kernel_ulong_t)&tas5707_chip },
+	{ .name = "tas5711", .driver_data = (kernel_ulong_t)&tas5711_chip },
+	{ .name = "tas5717", .driver_data = (kernel_ulong_t)&tas5717_chip },
+	{ .name = "tas5719", .driver_data = (kernel_ulong_t)&tas5717_chip },
+	{ .name = "tas5721", .driver_data = (kernel_ulong_t)&tas5721_chip },
+	{ .name = "tas5733", .driver_data = (kernel_ulong_t)&tas5733_chip },
+	{ .name = "tas5753", .driver_data = (kernel_ulong_t)&tas5753_chip },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas571x_i2c_id);
diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c
index 2dcdd0a4bf80..0bbcfaadf3f2 100644
--- a/sound/soc/codecs/tas5720.c
+++ b/sound/soc/codecs/tas5720.c
@@ -716,9 +716,9 @@ static struct snd_soc_dai_driver tas5720_dai[] = {
 };
 
 static const struct i2c_device_id tas5720_id[] = {
-	{ "tas5720", TAS5720 },
-	{ "tas5720a-q1", TAS5720A_Q1 },
-	{ "tas5722", TAS5722 },
+	{ .name = "tas5720", .driver_data = TAS5720 },
+	{ .name = "tas5720a-q1", .driver_data = TAS5720A_Q1 },
+	{ .name = "tas5722", .driver_data = TAS5722 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas5720_id);
diff --git a/sound/soc/codecs/tas5805m.c b/sound/soc/codecs/tas5805m.c
index 867046b7aaa0..bcc8cab8d667 100644
--- a/sound/soc/codecs/tas5805m.c
+++ b/sound/soc/codecs/tas5805m.c
@@ -580,7 +580,7 @@ static void tas5805m_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tas5805m_i2c_id[] = {
-	{ "tas5805m", },
+	{ .name = "tas5805m" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas5805m_i2c_id);
diff --git a/sound/soc/codecs/tas6424.c b/sound/soc/codecs/tas6424.c
index 85ecc246896f..f5d50f8a1cfb 100644
--- a/sound/soc/codecs/tas6424.c
+++ b/sound/soc/codecs/tas6424.c
@@ -794,7 +794,7 @@ static void tas6424_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tas6424_i2c_ids[] = {
-	{ "tas6424" },
+	{ .name = "tas6424" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas6424_i2c_ids);
diff --git a/sound/soc/codecs/tda7419.c b/sound/soc/codecs/tda7419.c
index 7d6fcba9986e..7ddea2fbe2d2 100644
--- a/sound/soc/codecs/tda7419.c
+++ b/sound/soc/codecs/tda7419.c
@@ -614,7 +614,7 @@ static int tda7419_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tda7419_i2c_id[] = {
-	{ "tda7419" },
+	{ .name = "tda7419" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tda7419_i2c_id);
diff --git a/sound/soc/codecs/tfa9879.c b/sound/soc/codecs/tfa9879.c
index ac0c5c337677..f30479f1f53b 100644
--- a/sound/soc/codecs/tfa9879.c
+++ b/sound/soc/codecs/tfa9879.c
@@ -296,7 +296,7 @@ static int tfa9879_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tfa9879_i2c_id[] = {
-	{ "tfa9879" },
+	{ .name = "tfa9879" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tfa9879_i2c_id);
diff --git a/sound/soc/codecs/tlv320adc3xxx.c b/sound/soc/codecs/tlv320adc3xxx.c
index 270eee1ea534..d7d958ecd8db 100644
--- a/sound/soc/codecs/tlv320adc3xxx.c
+++ b/sound/soc/codecs/tlv320adc3xxx.c
@@ -1391,9 +1391,9 @@ static const struct snd_soc_component_driver soc_component_dev_adc3xxx = {
 };
 
 static const struct i2c_device_id adc3xxx_i2c_id[] = {
-	{ "tlv320adc3001", ADC3001 },
-	{ "tlv320adc3101", ADC3101 },
-	{}
+	{ .name = "tlv320adc3001", .driver_data = ADC3001 },
+	{ .name = "tlv320adc3101", .driver_data = ADC3101 },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adc3xxx_i2c_id);
 
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index e4f27a734501..4eb9cea27276 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -1326,10 +1326,10 @@ static int adcx140_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id adcx140_i2c_id[] = {
-	{ "tlv320adc3140", 0 },
-	{ "tlv320adc5140", 1 },
-	{ "tlv320adc6140", 2 },
-	{}
+	{ .name = "tlv320adc3140", .driver_data = 0 },
+	{ .name = "tlv320adc5140", .driver_data = 1 },
+	{ .name = "tlv320adc6140", .driver_data = 2 },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, adcx140_i2c_id);
 
diff --git a/sound/soc/codecs/tlv320aic23-i2c.c b/sound/soc/codecs/tlv320aic23-i2c.c
index a31fb95048b8..2f928ae23887 100644
--- a/sound/soc/codecs/tlv320aic23-i2c.c
+++ b/sound/soc/codecs/tlv320aic23-i2c.c
@@ -28,8 +28,8 @@ static int tlv320aic23_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tlv320aic23_id[] = {
-	{"tlv320aic23"},
-	{}
+	{ .name = "tlv320aic23" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, tlv320aic23_id);
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index 4362c2c06ce8..1d2e0ea6d4fe 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1630,14 +1630,14 @@ static void aic31xx_configure_ocmv(struct aic31xx_priv *priv)
 }
 
 static const struct i2c_device_id aic31xx_i2c_id[] = {
-	{ "tlv320aic310x", AIC3100 },
-	{ "tlv320aic311x", AIC3110 },
-	{ "tlv320aic3100", AIC3100 },
-	{ "tlv320aic3110", AIC3110 },
-	{ "tlv320aic3120", AIC3120 },
-	{ "tlv320aic3111", AIC3111 },
-	{ "tlv320dac3100", DAC3100 },
-	{ "tlv320dac3101", DAC3101 },
+	{ .name = "tlv320aic310x", .driver_data = AIC3100 },
+	{ .name = "tlv320aic311x", .driver_data = AIC3110 },
+	{ .name = "tlv320aic3100", .driver_data = AIC3100 },
+	{ .name = "tlv320aic3110", .driver_data = AIC3110 },
+	{ .name = "tlv320aic3120", .driver_data = AIC3120 },
+	{ .name = "tlv320aic3111", .driver_data = AIC3111 },
+	{ .name = "tlv320dac3100", .driver_data = DAC3100 },
+	{ .name = "tlv320dac3101", .driver_data = DAC3101 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, aic31xx_i2c_id);
diff --git a/sound/soc/codecs/tlv320aic32x4-i2c.c b/sound/soc/codecs/tlv320aic32x4-i2c.c
index b27b5ae1e4b2..449353d5f088 100644
--- a/sound/soc/codecs/tlv320aic32x4-i2c.c
+++ b/sound/soc/codecs/tlv320aic32x4-i2c.c
@@ -38,9 +38,9 @@ static void aic32x4_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id aic32x4_i2c_id[] = {
-	{ "tlv320aic32x4", (kernel_ulong_t)AIC32X4_TYPE_AIC32X4 },
-	{ "tlv320aic32x6", (kernel_ulong_t)AIC32X4_TYPE_AIC32X6 },
-	{ "tas2505", (kernel_ulong_t)AIC32X4_TYPE_TAS2505 },
+	{ .name = "tlv320aic32x4", .driver_data = (kernel_ulong_t)AIC32X4_TYPE_AIC32X4 },
+	{ .name = "tlv320aic32x6", .driver_data = (kernel_ulong_t)AIC32X4_TYPE_AIC32X6 },
+	{ .name = "tas2505", .driver_data = (kernel_ulong_t)AIC32X4_TYPE_TAS2505 },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, aic32x4_i2c_id);
diff --git a/sound/soc/codecs/tlv320aic3x-i2c.c b/sound/soc/codecs/tlv320aic3x-i2c.c
index 0b585925c1ac..71528ad3a3b6 100644
--- a/sound/soc/codecs/tlv320aic3x-i2c.c
+++ b/sound/soc/codecs/tlv320aic3x-i2c.c
@@ -18,11 +18,11 @@
 #include "tlv320aic3x.h"
 
 static const struct i2c_device_id aic3x_i2c_id[] = {
-	{ "tlv320aic3x", AIC3X_MODEL_3X },
-	{ "tlv320aic33", AIC3X_MODEL_33 },
-	{ "tlv320aic3007", AIC3X_MODEL_3007 },
-	{ "tlv320aic3104", AIC3X_MODEL_3104 },
-	{ "tlv320aic3106", AIC3X_MODEL_3106 },
+	{ .name = "tlv320aic3x", .driver_data = AIC3X_MODEL_3X },
+	{ .name = "tlv320aic33", .driver_data = AIC3X_MODEL_33 },
+	{ .name = "tlv320aic3007", .driver_data = AIC3X_MODEL_3007 },
+	{ .name = "tlv320aic3104", .driver_data = AIC3X_MODEL_3104 },
+	{ .name = "tlv320aic3106", .driver_data = AIC3X_MODEL_3106 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, aic3x_i2c_id);
diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c
index 5a7beeadb009..39284e4d420e 100644
--- a/sound/soc/codecs/ts3a227e.c
+++ b/sound/soc/codecs/ts3a227e.c
@@ -423,7 +423,7 @@ static const struct dev_pm_ops ts3a227e_pm = {
 };
 
 static const struct i2c_device_id ts3a227e_i2c_ids[] = {
-	{ "ts3a227e" },
+	{ .name = "ts3a227e" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ts3a227e_i2c_ids);
diff --git a/sound/soc/codecs/tscs42xx.c b/sound/soc/codecs/tscs42xx.c
index 7390ab250ebb..dba581857920 100644
--- a/sound/soc/codecs/tscs42xx.c
+++ b/sound/soc/codecs/tscs42xx.c
@@ -1483,8 +1483,8 @@ static int tscs42xx_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tscs42xx_i2c_id[] = {
-	{ "tscs42A1" },
-	{ "tscs42A2" },
+	{ .name = "tscs42A1" },
+	{ .name = "tscs42A2" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tscs42xx_i2c_id);
diff --git a/sound/soc/codecs/tscs454.c b/sound/soc/codecs/tscs454.c
index 64d0da40fbaf..aad394937ce6 100644
--- a/sound/soc/codecs/tscs454.c
+++ b/sound/soc/codecs/tscs454.c
@@ -3454,7 +3454,7 @@ static int tscs454_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tscs454_i2c_id[] = {
-	{ "tscs454" },
+	{ .name = "tscs454" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tscs454_i2c_id);
diff --git a/sound/soc/codecs/uda1342.c b/sound/soc/codecs/uda1342.c
index b0b29012842d..12f5757f4210 100644
--- a/sound/soc/codecs/uda1342.c
+++ b/sound/soc/codecs/uda1342.c
@@ -319,7 +319,7 @@ static DEFINE_RUNTIME_DEV_PM_OPS(uda1342_pm_ops,
 				 uda1342_suspend, uda1342_resume, NULL);
 
 static const struct i2c_device_id uda1342_i2c_id[] = {
-	 { "uda1342" },
+	 { .name = "uda1342" },
 	 { }
 };
 MODULE_DEVICE_TABLE(i2c, uda1342_i2c_id);
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 55c83d95bfba..e11884669d1c 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -803,7 +803,7 @@ static int uda1380_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id uda1380_i2c_id[] = {
-	{ "uda1380" },
+	{ .name = "uda1380" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, uda1380_i2c_id);
diff --git a/sound/soc/codecs/wm1250-ev1.c b/sound/soc/codecs/wm1250-ev1.c
index 1f59309d8c69..5c1b00acb5bf 100644
--- a/sound/soc/codecs/wm1250-ev1.c
+++ b/sound/soc/codecs/wm1250-ev1.c
@@ -204,7 +204,7 @@ static int wm1250_ev1_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm1250_ev1_i2c_id[] = {
-	{ "wm1250-ev1" },
+	{ .name = "wm1250-ev1" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm1250_ev1_i2c_id);
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 126be2a2a8f3..9b68ee69324b 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -929,7 +929,7 @@ static int wm2000_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm2000_i2c_id[] = {
-	{ "wm2000" },
+	{ .name = "wm2000" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm2000_i2c_id);
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index 87418c838ca0..ba8ce2e6e615 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -2471,7 +2471,7 @@ static const struct dev_pm_ops wm2200_pm = {
 };
 
 static const struct i2c_device_id wm2200_i2c_id[] = {
-	{ "wm2200" },
+	{ .name = "wm2200" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm2200_i2c_id);
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 96fd098a9d36..bd94fa53c362 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2669,7 +2669,7 @@ static const struct dev_pm_ops wm5100_pm = {
 };
 
 static const struct i2c_device_id wm5100_i2c_id[] = {
-	{ "wm5100" },
+	{ .name = "wm5100" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm5100_i2c_id);
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index bebee333d3fd..589a89564813 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -669,7 +669,7 @@ static int wm8510_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8510_i2c_id[] = {
-	{ "wm8510" },
+	{ .name = "wm8510" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8510_i2c_id);
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index f003f19766e2..65108a041c92 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -518,7 +518,7 @@ static int wm8523_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8523_i2c_id[] = {
-	{ "wm8523" },
+	{ .name = "wm8523" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8523_i2c_id);
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 2be265bb0751..ca7bbe5d4fc3 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -1034,8 +1034,8 @@ static const struct of_device_id wm8580_of_match[] = {
 MODULE_DEVICE_TABLE(of, wm8580_of_match);
 
 static const struct i2c_device_id wm8580_i2c_id[] = {
-	{ "wm8580", (kernel_ulong_t)&wm8580_data },
-	{ "wm8581", (kernel_ulong_t)&wm8581_data },
+	{ .name = "wm8580", .driver_data = (kernel_ulong_t)&wm8580_data },
+	{ .name = "wm8581", .driver_data = (kernel_ulong_t)&wm8581_data },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8580_i2c_id);
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index 2bab9d189519..5271966b1615 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -455,7 +455,7 @@ static int wm8711_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id wm8711_i2c_id[] = {
-	{ "wm8711" },
+	{ .name = "wm8711" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8711_i2c_id);
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index 4c1a80561f06..6e6fd77c3020 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -296,7 +296,7 @@ static int wm8728_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8728_i2c_id[] = {
-	{ "wm8728" },
+	{ .name = "wm8728" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8728_i2c_id);
diff --git a/sound/soc/codecs/wm8731-i2c.c b/sound/soc/codecs/wm8731-i2c.c
index 1254e583af51..5d19fcc46606 100644
--- a/sound/soc/codecs/wm8731-i2c.c
+++ b/sound/soc/codecs/wm8731-i2c.c
@@ -47,7 +47,7 @@ static int wm8731_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8731_i2c_id[] = {
-	{ "wm8731" },
+	{ .name = "wm8731" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8731_i2c_id);
diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c
index fee8a37ed1df..4eb42d19bc7e 100644
--- a/sound/soc/codecs/wm8737.c
+++ b/sound/soc/codecs/wm8737.c
@@ -641,7 +641,7 @@ static int wm8737_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8737_i2c_id[] = {
-	{ "wm8737" },
+	{ .name = "wm8737" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8737_i2c_id);
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 4dfbb33edb09..ca56fdfb5088 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -606,7 +606,7 @@ static int wm8741_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8741_i2c_id[] = {
-	{ "wm8741" },
+	{ .name = "wm8741" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8741_i2c_id);
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 0e1d3ebb15c4..d3f1178c2d34 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -803,8 +803,8 @@ static int wm8750_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8750_i2c_id[] = {
-	{ "wm8750" },
-	{ "wm8987" },
+	{ .name = "wm8750" },
+	{ .name = "wm8987" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8750_i2c_id);
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index a532a95e8048..95b23504f68d 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1581,7 +1581,7 @@ static int wm8753_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8753_i2c_id[] = {
-	{ "wm8753" },
+	{ .name = "wm8753" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8753_i2c_id);
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c
index c3f340657f0c..f3b02c77314f 100644
--- a/sound/soc/codecs/wm8776.c
+++ b/sound/soc/codecs/wm8776.c
@@ -513,8 +513,8 @@ static int wm8776_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8776_i2c_id[] = {
-	{ "wm8775", WM8775 },
-	{ "wm8776", WM8776 },
+	{ .name = "wm8775", .driver_data = WM8775 },
+	{ .name = "wm8776", .driver_data = WM8776 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8776_i2c_id);
diff --git a/sound/soc/codecs/wm8804-i2c.c b/sound/soc/codecs/wm8804-i2c.c
index 3380d7301b17..3c49abd33d28 100644
--- a/sound/soc/codecs/wm8804-i2c.c
+++ b/sound/soc/codecs/wm8804-i2c.c
@@ -31,7 +31,7 @@ static void wm8804_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8804_i2c_id[] = {
-	{ "wm8804" },
+	{ .name = "wm8804" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8804_i2c_id);
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index 5312eb70dd29..a9128cfa6ff1 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -1287,7 +1287,7 @@ static int wm8900_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8900_i2c_id[] = {
-	{ "wm8900" },
+	{ .name = "wm8900" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8900_i2c_id);
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index f73f6ad06b38..320d7737699d 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -2203,7 +2203,7 @@ static const struct of_device_id wm8903_of_match[] = {
 MODULE_DEVICE_TABLE(of, wm8903_of_match);
 
 static const struct i2c_device_id wm8903_i2c_id[] = {
-	{ "wm8903" },
+	{ .name = "wm8903" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8903_i2c_id);
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 4c73a340f25f..9e5782e50f47 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -2621,9 +2621,9 @@ static int wm8904_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8904_i2c_id[] = {
-	{ "wm8904", WM8904 },
-	{ "wm8912", WM8912 },
-	{ "wm8918", WM8904 },   /* Actually a subset, updates to follow */
+	{ .name = "wm8904", .driver_data = WM8904 },
+	{ .name = "wm8912", .driver_data = WM8912 },
+	{ .name = "wm8918", .driver_data = WM8904 },   /* Actually a subset, updates to follow */
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8904_i2c_id);
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index 2f55d0c572a4..e631ec072249 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -851,7 +851,7 @@ static int wm8940_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8940_i2c_id[] = {
-	{ "wm8940" },
+	{ .name = "wm8940" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8940_i2c_id);
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
index e1c61e026cbc..c897a9ab764d 100644
--- a/sound/soc/codecs/wm8955.c
+++ b/sound/soc/codecs/wm8955.c
@@ -996,7 +996,7 @@ static int wm8955_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8955_i2c_id[] = {
-	{ "wm8955" },
+	{ .name = "wm8955" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8955_i2c_id);
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 384e8e703446..a810732c6af0 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -1551,7 +1551,7 @@ static void wm8960_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id wm8960_i2c_id[] = {
-	{ "wm8960" },
+	{ .name = "wm8960" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8960_i2c_id);
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index cfb8cfc91873..504fc59e4be2 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -967,7 +967,7 @@ static int wm8961_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8961_i2c_id[] = {
-	{ "wm8961" },
+	{ .name = "wm8961" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8961_i2c_id);
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 8d2435bf44ea..de18b1f85a32 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3991,7 +3991,7 @@ static const struct dev_pm_ops wm8962_pm = {
 };
 
 static const struct i2c_device_id wm8962_i2c_id[] = {
-	{ "wm8962" },
+	{ .name = "wm8962" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8962_i2c_id);
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index 46aa556b44fa..a5d2e91b66bb 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -692,7 +692,7 @@ static int wm8971_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8971_i2c_id[] = {
-	{ "wm8971" },
+	{ .name = "wm8971" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8971_i2c_id);
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index 0bb5e947f46d..4656652b8e97 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -712,7 +712,7 @@ static int wm8974_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8974_i2c_id[] = {
-	{ "wm8974" },
+	{ .name = "wm8974" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8974_i2c_id);
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c
index 935761e50865..ad8064bbaaac 100644
--- a/sound/soc/codecs/wm8978.c
+++ b/sound/soc/codecs/wm8978.c
@@ -1059,7 +1059,7 @@ static int wm8978_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8978_i2c_id[] = {
-	{ "wm8978" },
+	{ .name = "wm8978" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8978_i2c_id);
diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
index cd34f71cf42a..fab25f35fd14 100644
--- a/sound/soc/codecs/wm8983.c
+++ b/sound/soc/codecs/wm8983.c
@@ -1060,7 +1060,7 @@ static int wm8983_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8983_i2c_id[] = {
-	{ "wm8983" },
+	{ .name = "wm8983" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8983_i2c_id);
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index be23c0c608d1..2a64d5a851da 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -1195,8 +1195,8 @@ static int wm8985_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8985_i2c_id[] = {
-	{ "wm8985", WM8985 },
-	{ "wm8758", WM8758 },
+	{ .name = "wm8985", .driver_data = WM8985 },
+	{ .name = "wm8758", .driver_data = WM8758 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8985_i2c_id);
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index 9bffe7a6ccec..741aecc7641a 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -897,7 +897,7 @@ static int wm8988_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8988_i2c_id[] = {
-	{ "wm8988" },
+	{ .name = "wm8988" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8988_i2c_id);
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 9f2b42025ec9..11dfbbbdcd92 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -1241,7 +1241,7 @@ static int wm8990_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8990_i2c_id[] = {
-	{ "wm8990" },
+	{ .name = "wm8990" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8990_i2c_id);
diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c
index b8ed2a3e699b..225c235d3d89 100644
--- a/sound/soc/codecs/wm8991.c
+++ b/sound/soc/codecs/wm8991.c
@@ -1315,7 +1315,7 @@ static int wm8991_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8991_i2c_id[] = {
-	{ "wm8991" },
+	{ .name = "wm8991" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8991_i2c_id);
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 1c9299979898..2a94b23319b5 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -1735,7 +1735,7 @@ static void wm8993_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8993_i2c_id[] = {
-	{ "wm8993" },
+	{ .name = "wm8993" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8993_i2c_id);
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c
index 104ce09c02e0..799989a5bf0f 100644
--- a/sound/soc/codecs/wm8995.c
+++ b/sound/soc/codecs/wm8995.c
@@ -2259,8 +2259,8 @@ static int wm8995_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm8995_i2c_id[] = {
-	{"wm8995"},
-	{}
+	{ .name = "wm8995" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, wm8995_i2c_id);
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 2d9cbf66f7d4..dface555f928 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -3072,7 +3072,7 @@ static void wm8996_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id wm8996_i2c_id[] = {
-	{ "wm8996" },
+	{ .name = "wm8996" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm8996_i2c_id);
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index 521c55280f07..2e4e0a76499d 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1358,7 +1358,7 @@ static int wm9081_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm9081_i2c_id[] = {
-	{ "wm9081" },
+	{ .name = "wm9081" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm9081_i2c_id);
diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c
index 5182f0839b7c..8fc24b19313d 100644
--- a/sound/soc/codecs/wm9090.c
+++ b/sound/soc/codecs/wm9090.c
@@ -607,8 +607,8 @@ static int wm9090_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id wm9090_id[] = {
-	{ "wm9090" },
-	{ "wm9093" },
+	{ .name = "wm9090" },
+	{ .name = "wm9093" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, wm9090_id);
-- 
2.47.3



^ permalink raw reply related

* Re: [PATCH v1] Bluetooth: btusb: MT7925: Add VID/PID 13d3/3609 Add VID 13d3 & PID 3609 for MediaTek MT7925 USB Bluetooth chip.
From: patchwork-bot+bluetooth @ 2026-05-13 17:30 UTC (permalink / raw)
  To: Luke-yj Chen
  Cc: marcel, johan.hedberg, luiz.dentz, sean.wang, chris.lu,
	will-cy.lee, ss.wu, steve.lee, linux-bluetooth, linux-kernel,
	linux-mediatek
In-Reply-To: <20260512033422.3242781-1-luke-yj.chen@mediatek.com>

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 12 May 2026 11:34:21 +0800 you wrote:
> From: "luke-yj.chen" <luke-yj.chen@mediatek.com>
> 
> The information in /sys/kernel/debug/usb/devices about the Bluetooth
> device is listed as the below.
> 
> T:  Bus=06 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
> D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
> P:  Vendor=13d3 ProdID=3609 Rev= 1.00
> S:  Manufacturer=MediaTek Inc.
> S:  Product=Wireless_Device
> S:  SerialNumber=000000000
> C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
> A:  FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01
> I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
> E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
> I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
> I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
> I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
> I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
> I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
> I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
> E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
> I:  If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
> E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
> I:* If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
> E:  Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us
> E:  Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us
> 
> [...]

Here is the summary with links:
  - [v1] Bluetooth: btusb: MT7925: Add VID/PID 13d3/3609 Add VID 13d3 & PID 3609 for MediaTek MT7925 USB Bluetooth chip.
    https://git.kernel.org/bluetooth/bluetooth-next/c/ae3ff17c6240

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




^ permalink raw reply

* Re: [PATCH v2] Bluetooth: btusb: MT7925: Add VID/PID 13d3/3609
From: patchwork-bot+bluetooth @ 2026-05-13 17:30 UTC (permalink / raw)
  To: Luke-yj Chen
  Cc: marcel, johan.hedberg, luiz.dentz, sean.wang, chris.lu,
	will-cy.lee, ss.wu, steve.lee, linux-bluetooth, linux-kernel,
	linux-mediatek
In-Reply-To: <20260512060318.3288273-1-luke-yj.chen@mediatek.com>

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 12 May 2026 14:03:18 +0800 you wrote:
> From: "luke-yj.chen" <luke-yj.chen@mediatek.com>
> 
> Add VID 13d3 & PID 3609 for MediaTek MT7925 USB Bluetooth chip.
> 
> The information in /sys/kernel/debug/usb/devices about the Bluetooth
> device is listed as the below.
> 
> [...]

Here is the summary with links:
  - [v2] Bluetooth: btusb: MT7925: Add VID/PID 13d3/3609
    https://git.kernel.org/bluetooth/bluetooth-next/c/ae3ff17c6240

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




^ permalink raw reply

* Re: [PATCH] dt-bindings: Consolidate "sram" property definition
From: Krzysztof Kozlowski @ 2026-05-13 17:59 UTC (permalink / raw)
  To: Rob Herring (Arm), Liu Ying, Philipp Zabel, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Rob Clark, Sean Paul,
	Konrad Dybcio, Akhil P Oommen, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Marijn Suijten, Vinod Koul, Nas Chung, Jackson Lee,
	Mauro Carvalho Chehab, Mirela Rabulea, Detlev Casanova,
	Ezequiel Garcia, Heiko Stuebner, Hugues Fruchet, Alain Volmat,
	Maxime Coquelin, Alexandre Torgue, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, MD Danish Anwar,
	Roger Quadros, Parvathi Pudi, Mohan Reddy Putluru,
	Bjorn Andersson, Mathieu Poirier, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl, Michal Simek, Mark Brown,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Lorenzo Bianconi, Felix Fietkau, Andrew F. Davis, Hussain Khaja,
	Suman Anna, Ben Levinsky, Tanmay Shah, Erwan Leray,
	Fabrice Gasnier
  Cc: Roger Quadros, dri-devel, devicetree, imx, linux-arm-kernel,
	linux-kernel, linux-arm-msm, freedreno, dmaengine, linux-media,
	linux-rockchip, linux-stm32, netdev, linux-remoteproc,
	linux-amlogic, linux-spi, linux-mediatek
In-Reply-To: <20260511165942.2774868-1-robh@kernel.org>

On 11/05/2026 18:59, Rob Herring (Arm) wrote:
> The "sram" property has become a de facto standard property, so create a
> common schema for it and drop all the duplicated definitions.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


^ permalink raw reply

* Re: [PATCH v2 6/8] PCI: aardvark: Add 100 ms delay after link training
From: Pali Rohár @ 2026-05-13 18:54 UTC (permalink / raw)
  To: Hans Zhang
  Cc: bhelgaas, lpieralisi, kwilczynski, mani, vigneshr, jingoohan1,
	thomas.petazzoni, ryder.lee, jianjun.wang, claudiu.beznea.uj,
	mpillai, robh, s-vadapalli, linux-omap, linux-arm-kernel,
	linux-mediatek, linux-renesas-soc, linux-pci, linux-kernel
In-Reply-To: <15532890-ce22-4b20-96d9-e7f7c47050d2@163.com>

On Wednesday 13 May 2026 15:34:46 Hans Zhang wrote:
> On 5/13/26 15:20, Pali Rohár wrote:
> > On Wednesday 13 May 2026 15:00:04 Hans Zhang wrote:
> > > 
> > > 
> > > On 5/13/26 05:25, Pali Rohár wrote:
> > > > On Wednesday 06 May 2026 23:23:44 Hans Zhang wrote:
> > > > > The Aardvark PCIe controller driver waits for the link to come up but
> > > > > does not implement the mandatory 100 ms delay after link training
> > > > > completes for speeds greater than 5.0 GT/s (PCIe r6.0 sec 6.6.1).
> > > > > 
> > > > > The driver already maintains a 'link_gen' field that holds the negotiated
> > > > > link speed. Use it together with pcie_wait_after_link_train() to insert
> > > > > the required delay immediately after confirming that the link is up.
> > > > > 
> > > > > Signed-off-by: Hans Zhang <18255117159@163.com>
> > > > > ---
> > > > >    drivers/pci/controller/pci-aardvark.c | 4 +++-
> > > > >    1 file changed, 3 insertions(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
> > > > > index e34bea1ff0ac..526351c21c49 100644
> > > > > --- a/drivers/pci/controller/pci-aardvark.c
> > > > > +++ b/drivers/pci/controller/pci-aardvark.c
> > > > > @@ -350,8 +350,10 @@ static int advk_pcie_wait_for_link(struct advk_pcie *pcie)
> > > > >    	/* check if the link is up or not */
> > > > >    	for (retries = 0; retries < LINK_WAIT_MAX_RETRIES; retries++) {
> > > > > -		if (advk_pcie_link_up(pcie))
> > > > > +		if (advk_pcie_link_up(pcie)) {
> > > > > +			pcie_wait_after_link_train(pcie->link_gen);
> > > > >    			return 0;
> > > > > +		}
> > > > >    		usleep_range(LINK_WAIT_USLEEP_MIN, LINK_WAIT_USLEEP_MAX);
> > > > >    	}
> > > > > -- 
> > > > > 2.34.1
> > > > > 
> > > > 
> > > > Are you sure that this is correct to do? Have you checked the A3720
> > > > Functional Specification which describes how to bring PCIe link up?
> > > > 
> > > > A3720 PCIe controller is buggy and needs more timing hacks to make it
> > > > behave. Playing with random sleeps can break its internal logic.
> > > > I'm not sure if it could be safe without proper testing.
> > > > 
> > > > And IIRC A3720 PCIe controller is just PCIe2.0 with 5 GT/s.
> > > 
> > > 
> > > Hi Pali,
> > > 
> > > 1. This driver does not support A3720.
> > > 
> > > static const struct of_device_id advk_pcie_of_match_table[] = {
> > > 	{ .compatible = "marvell,armada-3700-pcie", },
> > > 	{},
> > > };
> > > MODULE_DEVICE_TABLE(of, advk_pcie_of_match_table);
> > > 
> > > If you need support for A3720, please submit the corresponding patch so that
> > > Bjorn and Mani can review it.
> > 
> > 3700 (or 37xx) is family and covers both a3710 and a3720. In most cases is the
> > a3720 dominant and hence identifiers 3700 and 3720 are begin mixed.
> > 
> > > 
> > > 2. If A3720 only supports GEN2, you can configure "max-link-speed" to be 2
> > > in the DT. This will not affect the functionality of this patch.
> > 
> > Whole A37xx supports only GEN2. And in DT files for 37xx should be
> > already there max-link-speed.
> > 
> > Seems that in advk_pcie_of_match_table there is no GEN3 device
> > specified.
> > 
> 
> Hi Pali,
> 
> However, I saw many GEN3 assignments and conditions in the code.
> 
> ret = of_pci_get_max_link_speed(dev->of_node);
> if (ret <= 0 || ret > 3)
> 	pcie->link_gen = 3;
> else
> 	pcie->link_gen = ret;
> 
> 
> static void advk_pcie_train_link(struct advk_pcie *pcie)
> {
> 	struct device *dev = &pcie->pdev->dev;
> 	u32 reg;
> 	int ret;
> 
> 	/*
> 	 * Setup PCIe rev / gen compliance based on device tree property
> 	 * 'max-link-speed' which also forces maximal link speed.
> 	 */
> 	reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG);
> 	reg &= ~PCIE_GEN_SEL_MSK;
> 	if (pcie->link_gen == 3)
> 		reg |= SPEED_GEN_3;
> 	else if (pcie->link_gen == 2)
> 		reg |= SPEED_GEN_2;
> 	else
> 		reg |= SPEED_GEN_1;
> 	advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);
> 
> 	/*
> 	 * Set maximal link speed value also into PCIe Link Control 2 register.
> 	 * Armada 3700 Functional Specification says that default value is based
> 	 * on SPEED_GEN but tests showed that default value is always 8.0 GT/s.
> 	 */
> 	reg = advk_readl(pcie, PCIE_CORE_PCIEXP_CAP + PCI_EXP_LNKCTL2);
> 	reg &= ~PCI_EXP_LNKCTL2_TLS;
> 	if (pcie->link_gen == 3)
> 		reg |= PCI_EXP_LNKCTL2_TLS_8_0GT;
> 	else if (pcie->link_gen == 2)
> 		reg |= PCI_EXP_LNKCTL2_TLS_5_0GT;
> 	else
> 		reg |= PCI_EXP_LNKCTL2_TLS_2_5GT;
> 	advk_writel(pcie, reg, PCIE_CORE_PCIEXP_CAP + PCI_EXP_LNKCTL2);
> 
> ....
> 
> 
> If you are certain about the relevant information. Is it understandable that
> we need to delete the code related to GEN3?

Ok. So some explanation. pci-aardvark.c is implementing driver for PCIe
controller with codename aardvark. I have no idea from what this
codename comes and what is represents. What we know that the driver was
written for A37xx SoC platform according to A37xx functional specification.
As it is common in SoC world, vendors just buy some IP and integrate it
into SoC. In this case Marvell bought this PCIe controller IP and
integrated it into the A37xx. In past I tried to investigate what it
could be and IIRC my assumption was that it was PCIe IP from Denali.
Denali was acquired by Cadence, and when I compared Cadence PCIe
controller registers and PCIe controller registers in A37xx functional
specification there were large overlap. For me it looked like new
Cadence PCIe controller is an evolution (or new version) of what is in
A37xx. So this was some confirmation of my theory. Linux kernel has
separate driver for PCIe controller from Cadence and for refactoring
there were ideas to merge these two drivers... But there were more
important things, fix issues related to A37xx PCIe, lot of changes
which address these issues were sent to the list but they were not
taken. I do not think that it makes sense to do refactoring or doing any
other changes before addressing any existing issues with these
drivers (like PCIe card is not working correctly).

There are reported more HW erratas for this PCIe controller which needs
to be addressed in the software (meaning in Linux kernel) to make PCIe
card working properly. And there are more design HW decision which needs
does not conform to the PCIe specification and those deviations needs to
be "fixed" or "adjusted" in software (meaning in pci-aardvark.c driver)
to make PCI/PCIe compatible drivers to work correctly.

Now about GEN3. From register allocation it looks like that PCIe IP
supports GEN3. A37xx does not support it (or at least officially). This
does not mean that there cannot be some SoC with this "aardvark" PCIe IP
that is GEN3 capable. Just we see that such SoC is not supported by Linux.
Also as the comment in above code says, by default the speed is reported
as 8.0 GT/s, so changing it to 5.0 GT/s or 2.5 GT/s is needed as so code
some parts of GEN3 code in the driver is needed.

Does it makes sense to remove it? Does it makes sense to spend time on
such thing which does not address any existing issue? For me not.
Because it does not fix any _real_ issue with existing PCIe cards. And
for refactoring it is better to merge drivers as explained above and
IIRC cadence driver has HW on which is GEN3 used.

Now about your change. If you are sure that pcie_wait_after_link_train()
function is noop for pcie->link_gen == 2 || pcie->link_gen == 1 then go
ahead, I have no objects. I have not looked deeply at the change. I just
spotted some change which is touching timing critical code path which
was problematic in the past and broke many wifi cards. So I'm really
careful to prevent breaking Linux support again.

As maintainers decided to not take any new changes from me for this
driver, I have no motivation to prepare any new changes. I will rather
spend my free time on something which will make sense and not be wasting
of my free time.

> 
> Best regards,
> Hans
> 
> 
> > > 3. This patch is a common delay requirement stipulated by the PCIe
> > > specification. If it is greater than GEN2, then msleep(100) will be added;
> > > otherwise, there will be no such delay.
> > > 
> > > 4. For instance, we often come across the situation where some common APIs
> > > are modified, and in many cases, their functionality does not require the
> > > actual development board for verification. I believe that many other
> > > developers and maintainers have modified different parts of the code. For
> > > example, the recent submission:
> > 
> > Switching one API to another is one thing. But changing code which looks
> > to be critical, specially when it is known that hw has bugs, can cause
> > breaking of existing boards.
> > 
> > > commit 750277048afe7ce8ebfc0b120de7dfbc745058a7
> > > Author: Nam Cao <namcao@linutronix.de>
> > > Date:   Thu Jun 26 16:47:53 2025 +0200
> > > 
> > >      PCI: aardvark: Switch to msi_create_parent_irq_domain()
> > > 
> > >      Switch to msi_create_parent_irq_domain() from
> > > pci_msi_create_irq_domain()
> > >      which was using legacy MSI domain setup.
> > > 
> > > 
> > > And many controller drivers have been modified.
> > > 
> > > 
> > > Best regards,
> > > Hans
> > > 
> > > 
> 


^ permalink raw reply

* Re: [PATCH v1 2/2] ASoC: Use named initializers for arrays of i2c_device_data
From: Krzysztof Kozlowski @ 2026-05-13 19:00 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub), Liam Girdwood,
	Mark Brown
  Cc: David Rhodes, Richard Fitzgerald, Jaroslav Kysela, Takashi Iwai,
	Shenghao Ding, Kevin Lu, Baojun Xu, Lars-Peter Clausen,
	Nuno Sá, Martin Povišer, Support Opensource, Nick Li,
	M R Swami Reddy, Vishwas A Deshpande, Peter Rosin,
	Matthias Brugger, AngeloGioacchino Del Regno, Oder Chiou,
	Fabio Estevam, Kiseok Jo, Kevin Cernekee, Steven Eckhoff,
	Kuninori Morimoto, Charles Keepax, Thorsten Blum, Chris Morgan,
	Dan Carpenter, Marco Crivellari, Weidong Wang, Aaron Kling,
	Teguh Sobirin, Luca Weiss, Bharadwaj Raju, Hsieh Hung-En,
	Binbin Zhou, Shimrra Shai, Zhang Yi, Srinivas Kandagatla,
	Qasim Ijaz, Sharique Mohammad, Chen Ni, Neo Chang,
	Cezary Rojewski, Cristian Ciocaltea, Kees Cook, Qianfeng Rong,
	Tim Bird, Bram Vlerick, Peter Korsgaard, Linus Walleij,
	Wenyuan Li, Bartosz Golaszewski, Shengjiu Wang,
	Sebastian Krzyszkowiak, Xichao Zhao, linux-sound, patches,
	linux-kernel, asahi, linux-arm-kernel, linux-mediatek,
	Markus Schneider-Pargmann
In-Reply-To: <ae2ff4898eb340bd8bcafb7b75443eb4a0ce3e76.1778692164.git.u.kleine-koenig@baylibre.com>

On 13/05/2026 19:23, Uwe Kleine-König (The Capable Hub) wrote:
>  MODULE_DEVICE_TABLE(i2c, adau1372_i2c_ids);
> diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
> index 16b9b2658341..5dd961b233ce 100644
> --- a/sound/soc/codecs/adau1373.c
> +++ b/sound/soc/codecs/adau1373.c
> @@ -1599,7 +1599,7 @@ static int adau1373_i2c_probe(struct i2c_client *client)
>  }
>  
>  static const struct i2c_device_id adau1373_i2c_id[] = {
> -	{ "adau1373" },
> +	{ .name = "adau1373" },
>  	{ }
>  };

This is inconsistent with most (or all?) of other xx_device_id table
usages and, IIUC, is not even necessary to achieve your goal (which
itself is good).

Best regards,
Krzysztof


^ permalink raw reply

* Re: [PATCH v2] media: dt-bindings: mediatek: Constrain iommus
From: Rob Herring @ 2026-05-13 19:03 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, dri-devel, linux-mediatek, devicetree,
	linux-kernel, linux-arm-kernel, Conor Dooley
In-Reply-To: <20250821065900.17430-2-krzysztof.kozlowski@linaro.org>

On Thu, Aug 21, 2025 at 08:59:01AM +0200, Krzysztof Kozlowski wrote:
> Lists should have fixed constraints, because binding must be specific in
> respect to hardware.  Add missing constraints to number of iommus in
> Mediatek media devices and remove completely redundant and obvious
> description.
> 
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Changes in v2:
> 1. Ack
> 2. Mention dropping description
> ---
>  .../bindings/display/mediatek/mediatek,ovl-2l.yaml           | 5 ++---
>  .../devicetree/bindings/display/mediatek/mediatek,ovl.yaml   | 5 ++---
>  .../devicetree/bindings/display/mediatek/mediatek,rdma.yaml  | 4 +---
>  .../devicetree/bindings/display/mediatek/mediatek,wdma.yaml  | 4 +---
>  4 files changed, 6 insertions(+), 12 deletions(-)

Applied, thanks.

Rob


^ permalink raw reply

* [PATCH v6 0/2] Add EcoNet EN7528 (and EN751221) PCIe support.
From: Caleb James DeLisle @ 2026-05-13 19:16 UTC (permalink / raw)
  To: linux-pci
  Cc: linux-mips, naseefkm, ryder.lee, helgaas, lpieralisi, kwilczynski,
	mani, robh, krzk+dt, conor+dt, matthias.bgg,
	angelogioacchino.delregno, ansuelsmth, linux-mediatek, devicetree,
	linux-kernel, Caleb James DeLisle

Changes from v5:
* s/errno-base.h/errno.h/
* Breakout mtk_pcie_retrain() into a function
* Use for_each_pci_bridge() to find root bridge
* v5: https://lore.kernel.org/linux-mips/20260413140339.16238-1-cjd@cjdns.fr/

Changes from v4:
* Fixed missing Acked-by
* Rebased to 66672af7a095d89f082c5327f3b15bc2f93d558e
* v4: https://lore.kernel.org/linux-mips/20260404182854.2183651-1-cjd@cjdns.fr/

Changes from v3:
* s/initiallized/initialized/
* Use PCIE_T_PVPERL_MS for sleep time
* Use PCI_PM_D3COLD_WAIT for startup wait time
* Clarify comment "Activate INTx interrupts"
* Add MTK_PCIE_RETRAIN quirk for devices which require link re-train
* Do not retrain *all* bridges, only root bridge
* Better comments and logging in retraining logic
* v3: https://lore.kernel.org/linux-mips/20260320094212.696671-1-cjd@cjdns.fr/

Changes from v2:
* mediatek-pcie.yaml -> s/power-domain/power-domains/ and drop example
* Patch 3 dropped as it has been applied (Thanks!)
* v2: https://lore.kernel.org/linux-mips/20260316155157.679533-1-cjd@cjdns.fr/

Changes from v1:
* mediatek-pcie.yaml slot0 needs device-type = "pci", fix dt_binding_check
Link: https://lore.kernel.org/linux-mips/177334026016.3889069.9474337544951486443.robh@kernel.org
* v1: https://lore.kernel.org/linux-mips/20260312165332.569772-1-cjd@cjdns.fr/

This was split from a larger PCIe patchset which crossed multiple
subsystems. I'm not labeling this a v3 because it's a new patchset, but
I'm keeping the historical record anyway.

Changes from econet-pcie v2:
* mediatek-pcie.yaml add missing constraints to PCI node properties
* econet-pcie v2: https://lore.kernel.org/linux-mips/20260309131818.74467-1-cjd@cjdns.fr

Changes from econet-pcie v1:
* pcie-mediatek.c Exclude pcie_retrain_link() when building as a module
* econet-pcie v1: https://lore.kernel.org/linux-mips/20260303190948.694783-1-cjd@cjdns.fr/


Caleb James DeLisle (2):
  dt-bindings: PCI: mediatek: Add support for EcoNet EN7528
  PCI: mediatek: Add support for EcoNet EN7528 SoC

 .../bindings/pci/mediatek-pcie.yaml           |  26 +++
 drivers/pci/controller/Kconfig                |   2 +-
 drivers/pci/controller/pcie-mediatek.c        | 150 ++++++++++++++++++
 3 files changed, 177 insertions(+), 1 deletion(-)


base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
-- 
2.39.5



^ permalink raw reply

* [PATCH v6 1/2] dt-bindings: PCI: mediatek: Add support for EcoNet EN7528
From: Caleb James DeLisle @ 2026-05-13 19:16 UTC (permalink / raw)
  To: linux-pci
  Cc: linux-mips, naseefkm, ryder.lee, helgaas, lpieralisi, kwilczynski,
	mani, robh, krzk+dt, conor+dt, matthias.bgg,
	angelogioacchino.delregno, ansuelsmth, linux-mediatek, devicetree,
	linux-kernel, Caleb James DeLisle, Conor Dooley
In-Reply-To: <20260513191652.3200607-1-cjd@cjdns.fr>

Introduce EcoNet EN7528 SoC compatible in MediaTek PCIe controller
binding.

EcoNet PCIe controller has the same configuration model as
Mediatek v2 but is initialized more similarly to an MT7621
PCIe.

Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../bindings/pci/mediatek-pcie.yaml           | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie.yaml
index 0b8c78ec4f91..7e1b0876c291 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.yaml
@@ -14,6 +14,7 @@ properties:
     oneOf:
       - enum:
           - airoha,an7583-pcie
+          - econet,en7528-pcie
           - mediatek,mt2712-pcie
           - mediatek,mt7622-pcie
           - mediatek,mt7629-pcie
@@ -226,6 +227,31 @@ allOf:
 
         mediatek,pbus-csr: false
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: econet,en7528-pcie
+    then:
+      properties:
+        clocks:
+          maxItems: 1
+
+        clock-names:
+          maxItems: 1
+
+        reset: false
+
+        reset-names: false
+
+        power-domains: false
+
+        mediatek,pbus-csr: false
+
+      required:
+        - phys
+        - phy-names
+
 unevaluatedProperties: false
 
 examples:
-- 
2.39.5



^ permalink raw reply related

* [PATCH v6 2/2] PCI: mediatek: Add support for EcoNet EN7528 SoC
From: Caleb James DeLisle @ 2026-05-13 19:16 UTC (permalink / raw)
  To: linux-pci
  Cc: linux-mips, naseefkm, ryder.lee, helgaas, lpieralisi, kwilczynski,
	mani, robh, krzk+dt, conor+dt, matthias.bgg,
	angelogioacchino.delregno, ansuelsmth, linux-mediatek, devicetree,
	linux-kernel, Caleb James DeLisle
In-Reply-To: <20260513191652.3200607-1-cjd@cjdns.fr>

Add support for the PCIe present on the EcoNet EN7528 (and EN751221) SoCs.

These SoCs have a mix of Gen1 and Gen2 capable ports, but the Gen2 ports
require re-training after startup.

Co-developed-by: Ahmed Naseef <naseefkm@gmail.com>
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
---
 drivers/pci/controller/Kconfig         |   2 +-
 drivers/pci/controller/pcie-mediatek.c | 150 +++++++++++++++++++++++++
 2 files changed, 151 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 2247709ef6d6..8a3a31b2bc12 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -209,7 +209,7 @@ config PCI_MVEBU
 
 config PCIE_MEDIATEK
 	tristate "MediaTek PCIe controller"
-	depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST
+	depends on ARCH_AIROHA || ARCH_MEDIATEK || ECONET || COMPILE_TEST
 	depends on OF
 	depends on PCI_MSI
 	select IRQ_MSI_LIB
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 75722524fe74..540cc0822be4 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -9,11 +9,13 @@
 
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/errno.h>
 #include <linux/iopoll.h>
 #include <linux/irq.h>
 #include <linux/irqchip/chained_irq.h>
 #include <linux/irqchip/irq-msi-lib.h>
 #include <linux/irqdomain.h>
+#include <linux/kconfig.h>
 #include <linux/kernel.h>
 #include <linux/mfd/syscon.h>
 #include <linux/msi.h>
@@ -77,6 +79,7 @@
 
 #define PCIE_CONF_VEND_ID	0x100
 #define PCIE_CONF_DEVICE_ID	0x102
+#define PCIE_CONF_REV_CLASS	0x104
 #define PCIE_CONF_CLASS_ID	0x106
 
 #define PCIE_INT_MASK		0x420
@@ -89,6 +92,11 @@
 #define MSI_MASK		BIT(23)
 #define MTK_MSI_IRQS_NUM	32
 
+#define EN7528_HOST_MODE	0x00804201
+#define EN7528_LINKUP_REG	0x50
+#define EN7528_RC0_LINKUP	BIT(1)
+#define EN7528_RC1_LINKUP	BIT(2)
+
 #define PCIE_AHB_TRANS_BASE0_L	0x438
 #define PCIE_AHB_TRANS_BASE0_H	0x43c
 #define AHB2PCIE_SIZE(x)	((x) & GENMASK(4, 0))
@@ -148,12 +156,15 @@ struct mtk_pcie_port;
  * @MTK_PCIE_FIX_DEVICE_ID: host's device ID needed to be fixed
  * @MTK_PCIE_NO_MSI: Bridge has no MSI support, and relies on an external block
  * @MTK_PCIE_SKIP_RSTB: Skip calling RSTB bits on PCIe probe
+ * @MTK_PCIE_RETRAIN: Re-train link to bridge after startup because some
+ *                    Gen2-capable devices start as Gen1.
  */
 enum mtk_pcie_quirks {
 	MTK_PCIE_FIX_CLASS_ID = BIT(0),
 	MTK_PCIE_FIX_DEVICE_ID = BIT(1),
 	MTK_PCIE_NO_MSI = BIT(2),
 	MTK_PCIE_SKIP_RSTB = BIT(3),
+	MTK_PCIE_RETRAIN = BIT(4),
 };
 
 /**
@@ -753,6 +764,132 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
 	return 0;
 }
 
+static int mtk_pcie_startup_port_en7528(struct mtk_pcie_port *port)
+{
+	struct mtk_pcie *pcie = port->pcie;
+	struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
+	struct resource *mem = NULL;
+	struct resource_entry *entry;
+	u32 val, link_mask;
+	int err;
+
+	entry = resource_list_first_type(&host->windows, IORESOURCE_MEM);
+	if (entry)
+		mem = entry->res;
+	if (!mem)
+		return -EINVAL;
+
+	if (!pcie->cfg) {
+		dev_err(pcie->dev, "EN7528: pciecfg syscon not available\n");
+		return -EINVAL;
+	}
+
+	/* Assert all reset signals */
+	writel(0, port->base + PCIE_RST_CTRL);
+
+	/*
+	 * Enable PCIe link down reset, if link status changed from link up to
+	 * link down, this will reset MAC control registers and configuration
+	 * space.
+	 */
+	writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
+
+	msleep(PCIE_T_PVPERL_MS);
+
+	/* De-assert PHY, PE, PIPE, MAC and configuration reset */
+	val = readl(port->base + PCIE_RST_CTRL);
+	val |= PCIE_PHY_RSTB | PCIE_PERSTB | PCIE_PIPE_SRSTB |
+	       PCIE_MAC_SRSTB | PCIE_CRSTB;
+	writel(val, port->base + PCIE_RST_CTRL);
+
+	writel(PCIE_CLASS_CODE | PCIE_REVISION_ID,
+	       port->base + PCIE_CONF_REV_CLASS);
+	writel(EN7528_HOST_MODE, port->base);
+
+	link_mask = (port->slot == 0) ? EN7528_RC0_LINKUP : EN7528_RC1_LINKUP;
+
+	/* 100ms timeout value should be enough for Gen1/2 training */
+	err = regmap_read_poll_timeout(pcie->cfg, EN7528_LINKUP_REG, val,
+				       !!(val & link_mask), 20,
+				       PCI_PM_D3COLD_WAIT * USEC_PER_MSEC);
+	if (err) {
+		dev_err(pcie->dev, "EN7528: port%d link timeout\n", port->slot);
+		return -ETIMEDOUT;
+	}
+
+	/* Activate INTx interrupts */
+	val = readl(port->base + PCIE_INT_MASK);
+	val &= ~INTX_MASK;
+	writel(val, port->base + PCIE_INT_MASK);
+
+	if (IS_ENABLED(CONFIG_PCI_MSI))
+		mtk_pcie_enable_msi(port);
+
+	/* Set AHB to PCIe translation windows */
+	val = lower_32_bits(mem->start) |
+	      AHB2PCIE_SIZE(fls(resource_size(mem)));
+	writel(val, port->base + PCIE_AHB_TRANS_BASE0_L);
+
+	val = upper_32_bits(mem->start);
+	writel(val, port->base + PCIE_AHB_TRANS_BASE0_H);
+
+	writel(WIN_ENABLE, port->base + PCIE_AXI_WINDOW0);
+
+	return 0;
+}
+
+/**
+ * mtk_pcie_retrain - retrain the root bridge link if needed
+ * @dev: The device, for use in logging
+ * @host: The host bridge which contains the link
+ *
+ * Due to what is likely a hardware bug, some devices (notably EcoNet) start up
+ * as Gen1, and must be re-trained once after initial configuration in order to
+ * reach Gen2.
+ *
+ * These devices always self-identify as Gen2 capable, but sometimes the PHY is
+ * only capable of Gen1 operation, and sometimes the PCIe card (e.g. wifi) is
+ * only Gen1 capable. Therefore it is most convenient to re-train every port
+ * after startup.
+ */
+static int mtk_pcie_retrain(struct device *dev, struct pci_host_bridge *host)
+{
+	struct pci_dev *rp;
+	int ret = -ENOENT;
+	u16 lnksta = 0;
+	u32 speed;
+
+	for_each_pci_bridge(rp, host->bus) {
+		if (pci_pcie_type(rp) == PCI_EXP_TYPE_ROOT_PORT)
+			goto found_port;
+	}
+
+	/* Should not happen */
+	return dev_err_probe(dev, ret, "root bridge not found\n");
+
+found_port:
+	if (!IS_BUILTIN(CONFIG_PCIE_MEDIATEK)) {
+		/* Let it go because the device will work as Gen1 */
+		dev_warn(dev, "module must be built-in to retrain to Gen2\n");
+		return 0;
+	}
+
+#if IS_BUILTIN(CONFIG_PCIE_MEDIATEK)
+	ret = pcie_retrain_link(rp, true);
+#endif
+
+	if (ret)
+		return dev_err_probe(dev, ret, "failed to retrain port\n");
+
+	pcie_capability_read_word(rp, PCI_EXP_LNKSTA, &lnksta);
+	speed = lnksta & PCI_EXP_LNKSTA_CLS;
+
+	dev_info(dev, "link retrained, speed %s\n",
+		 pci_speed_string(pcie_link_speed[speed]));
+
+	return 0;
+}
+
 static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
 				      unsigned int devfn, int where)
 {
@@ -1149,6 +1286,11 @@ static int mtk_pcie_probe(struct platform_device *pdev)
 	if (err)
 		goto put_resources;
 
+	if (pcie->soc->quirks & MTK_PCIE_RETRAIN)
+		err = mtk_pcie_retrain(dev, host);
+	if (err)
+		goto put_resources;
+
 	return 0;
 
 put_resources:
@@ -1264,8 +1406,16 @@ static const struct mtk_pcie_soc mtk_pcie_soc_mt7629 = {
 	.quirks = MTK_PCIE_FIX_CLASS_ID | MTK_PCIE_FIX_DEVICE_ID,
 };
 
+static const struct mtk_pcie_soc mtk_pcie_soc_en7528 = {
+	.ops = &mtk_pcie_ops_v2,
+	.startup = mtk_pcie_startup_port_en7528,
+	.setup_irq = mtk_pcie_setup_irq,
+	.quirks = MTK_PCIE_RETRAIN,
+};
+
 static const struct of_device_id mtk_pcie_ids[] = {
 	{ .compatible = "airoha,an7583-pcie", .data = &mtk_pcie_soc_an7583 },
+	{ .compatible = "econet,en7528-pcie", .data = &mtk_pcie_soc_en7528 },
 	{ .compatible = "mediatek,mt2701-pcie", .data = &mtk_pcie_soc_v1 },
 	{ .compatible = "mediatek,mt7623-pcie", .data = &mtk_pcie_soc_v1 },
 	{ .compatible = "mediatek,mt2712-pcie", .data = &mtk_pcie_soc_mt2712 },
-- 
2.39.5



^ permalink raw reply related

* [PATCH v2 0/2] Introduce Airoha AN7583 SoC and AN7583 Evaluation Board
From: Lorenzo Bianconi @ 2026-05-13 19:21 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Felix Fietkau,
	John Crispin, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Christian Marangi, devicetree, linux-arm-kernel, linux-mediatek,
	Lorenzo Bianconi

Introduce the Airoha AN7583 SoC's dtsi and the Airoha AN7583 Evaluation
Board's dts file.

---
Changes in v2:
- Fix RAM size for AN7583 evb
- Remove unused properties in an7583.dtsi
- Use ns16550a as compatible string for an7583 uart
- Add airoha,an7583-wdt compatible string for an7583 watchdog
- Link to v1: https://lore.kernel.org/r/20260509-airoha-7583-v1-0-e5ad085b258e@kernel.org

---
Lorenzo Bianconi (2):
      dt-bindings: arm64: dts: airoha: Add an7583 entry
      arm64: dts: Add Airoha AN7583 SoC and AN7583 Evaluation Board

 Documentation/devicetree/bindings/arm/airoha.yaml |   4 +
 arch/arm64/boot/dts/airoha/Makefile               |   2 +-
 arch/arm64/boot/dts/airoha/an7583-evb.dts         |  23 ++++
 arch/arm64/boot/dts/airoha/an7583.dtsi            | 133 ++++++++++++++++++++++
 4 files changed, 161 insertions(+), 1 deletion(-)
---
base-commit: e6490a169f6d5f5bdea7a2e8a673890d43afadc0
change-id: 20260509-airoha-7583-145246084016

Best regards,
-- 
Lorenzo Bianconi <lorenzo@kernel.org>



^ permalink raw reply

* [PATCH v2 1/2] dt-bindings: arm64: dts: airoha: Add an7583 entry
From: Lorenzo Bianconi @ 2026-05-13 19:21 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Felix Fietkau,
	John Crispin, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Christian Marangi, devicetree, linux-arm-kernel, linux-mediatek,
	Lorenzo Bianconi
In-Reply-To: <20260513-airoha-7583-v2-0-ee0d82b37ce7@kernel.org>

Introduce Airoha AN7583 entry in Airoha dts binding.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 Documentation/devicetree/bindings/arm/airoha.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/airoha.yaml b/Documentation/devicetree/bindings/arm/airoha.yaml
index 7c38c08dbf3f..6506c64af4f3 100644
--- a/Documentation/devicetree/bindings/arm/airoha.yaml
+++ b/Documentation/devicetree/bindings/arm/airoha.yaml
@@ -26,6 +26,10 @@ properties:
           - enum:
               - airoha,en7581-evb
           - const: airoha,en7581
+      - items:
+          - enum:
+              - airoha,an7583-evb
+          - const: airoha,an7583
 
 additionalProperties: true
 

-- 
2.54.0



^ permalink raw reply related

* [PATCH v2 2/2] arm64: dts: Add Airoha AN7583 SoC and AN7583 Evaluation Board
From: Lorenzo Bianconi @ 2026-05-13 19:21 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Felix Fietkau,
	John Crispin, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Christian Marangi, devicetree, linux-arm-kernel, linux-mediatek,
	Lorenzo Bianconi
In-Reply-To: <20260513-airoha-7583-v2-0-ee0d82b37ce7@kernel.org>

Introduce the Airoha AN7583 SoC's dtsi and the Airoha AN7583 Evaluation
Board's dts file.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 arch/arm64/boot/dts/airoha/Makefile       |   2 +-
 arch/arm64/boot/dts/airoha/an7583-evb.dts |  23 ++++++
 arch/arm64/boot/dts/airoha/an7583.dtsi    | 133 ++++++++++++++++++++++++++++++
 3 files changed, 157 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/airoha/Makefile b/arch/arm64/boot/dts/airoha/Makefile
index ebea112ce1d7..6027978a35c2 100644
--- a/arch/arm64/boot/dts/airoha/Makefile
+++ b/arch/arm64/boot/dts/airoha/Makefile
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-dtb-$(CONFIG_ARCH_AIROHA) += en7581-evb.dtb
+dtb-$(CONFIG_ARCH_AIROHA) += en7581-evb.dtb an7583-evb.dtb
diff --git a/arch/arm64/boot/dts/airoha/an7583-evb.dts b/arch/arm64/boot/dts/airoha/an7583-evb.dts
new file mode 100644
index 000000000000..fa260f6e41c1
--- /dev/null
+++ b/arch/arm64/boot/dts/airoha/an7583-evb.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/dts-v1/;
+
+#include "an7583.dtsi"
+
+/ {
+	model = "Airoha AN7583 Evaluation Board";
+	compatible = "airoha,an7583-evb", "airoha,an7583";
+
+	aliases {
+		serial0 = &uart1;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200 earlycon";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x0 0x20000000>;
+	};
+};
diff --git a/arch/arm64/boot/dts/airoha/an7583.dtsi b/arch/arm64/boot/dts/airoha/an7583.dtsi
new file mode 100644
index 000000000000..a82ed916e61d
--- /dev/null
+++ b/arch/arm64/boot/dts/airoha/an7583.dtsi
@@ -0,0 +1,133 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		atf@80000000 {
+			no-map;
+			reg = <0x0 0x80000000 0x0 0x200000>;
+		};
+	};
+
+	psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu0>;
+				};
+
+				core1 {
+					cpu = <&cpu1>;
+				};
+			};
+		};
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0>;
+			enable-method = "psci";
+			next-level-cache = <&l2>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x1>;
+			enable-method = "psci";
+			next-level-cache = <&l2>;
+		};
+
+		l2: l2-cache {
+			compatible = "cache";
+			cache-size = <0x80000>;
+			cache-line-size = <64>;
+			cache-level = <2>;
+			cache-unified;
+		};
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupt-parent = <&gic>;
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+	};
+
+	clk25m: clock-25000000 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <25000000>;
+		clock-output-names = "clkxtal";
+	};
+
+	i2c_clock: clock-20000000 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <20000000>;
+		clock-output-names = "i2c_clock";
+	};
+
+	sys_hclk: clock-100000000 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <100000000>;
+		clock-output-names = "sys_hclk";
+	};
+
+	soc {
+		compatible = "simple-bus";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		gic: interrupt-controller@9000000 {
+			compatible = "arm,gic-v3";
+			interrupt-controller;
+			#interrupt-cells = <3>;
+			reg = <0x0 0x09000000 0x0 0x20000>,
+			      <0x0 0x09080000 0x0 0x80000>,
+			      <0x0 0x09400000 0x0 0x2000>,
+			      <0x0 0x09500000 0x0 0x2000>,
+			      <0x0 0x09600000 0x0 0x20000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
+		uart1: serial@1fbf0000 {
+			compatible = "ns16550a";
+			reg = <0x0 0x1fbf0000 0x0 0x30>;
+			reg-io-width = <4>;
+			reg-shift = <2>;
+			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+			clock-frequency = <1843200>;
+		};
+
+		watchdog@1fbf0100 {
+			compatible = "airoha,an7583-wdt", "airoha,en7581-wdt";
+			reg = <0x0 0x1fbf0100 0x0 0x38>;
+
+			clocks = <&sys_hclk>;
+			clock-names = "bus";
+		};
+	};
+};

-- 
2.54.0



^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox