]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge tag 'i2c-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 May 2025 17:07:53 +0000 (10:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 May 2025 17:07:53 +0000 (10:07 -0700)
Pull i2c updates from Wolfram Sang:
 "Core updates:
   - move towards using the 'fwnode' handle instead of 'of_node'
     (meaning 'of_node' even gets removed from i2c_board_info)
   - add support for Write Disable-aware SPD eeproms
   - minor stuff (use new helpers, typo fixes)

  i2c-atr (address translator) updates:
   - support per-channel alias pools
   - added support for dynamic address translation (also adds FPC202
     driver as its user)
   - add 'static' and 'passthrough' flags

  Cleanups and refactorings
   - Many drivers switched to dev_err_probe()
   - Generic cleanups applied to designware, iproc, ismt, mlxbf,
     npcm7xx, qcom-geni, pasemi, and thunderx
   - davinci: declare I2C mangling support among I2C features
   - designware: clean up DTS handling
   - designware: fix PM runtime on driver unregister
   - imx: improve error logging during probe
   - lpc2k: improve checks in probe error path
   - xgene-slimpro: improve PCC shared memory handling
   - pasemi: improve error handling in reset, smbus clear, timeouts
   - tegra: validate buffer length during transfers
   - wmt: convert binding to YAML format

  Improvements and extended support:
   - microchip-core: add SMBus support
   - mlxbf: add support for repeated start in block transfers
   - mlxbf: improve timer configuration
   - npcm: attempt clock toggle recovery before failing init
   - octeon: add support for block mode operations
   - pasemi: add support for unjam device feature
   - riic: add support for bus recovery

  New device support:
   - MediaTek Dimensity 1200 (MT6893)
   - Sophgo SG2044
   - Renesas RZ/V2N (R9A09G056)
   - Rockchip RK3528
   - AMD ISP (new driver)"

* tag 'i2c-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (89 commits)
  i2c: Use str_read_write() helper
  i2c: mlxbf: avoid 64-bit division
  i2c: viai2c-wmt: Replace dev_err() with dev_err_probe() in probe function
  i2c: designware: Don't warn about missing get_clk_rate_khz
  i2c: designware: Invoke runtime suspend on quick slave re-registration
  i2c-mlxbf: Improve I2C bus timing configuration
  i2c-mlxbf: Add repeated start condition support
  i2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function
  dt-bindings: i2c: i2c-wmt: Convert to YAML
  i2c: microchip-corei2c: add smbus support
  i2c: mlxbf: Allow build with COMPILE_TEST
  i2c: I2C_DESIGNWARE_AMDISP should depend on DRM_AMD_ISP
  i2c: atr: add passthrough flag
  i2c: atr: add static flag
  i2c: atr: allow replacing mappings in attach_addr()
  i2c: atr: deduplicate logic in attach_addr()
  i2c: atr: do not create mapping in detach_addr()
  i2c: atr: split up i2c_atr_get_mapping_by_addr()
  i2c: atr: find_mapping() -> get_mapping()
  i2c: atr: Fix lockdep for nested ATRs
  ...

1  2 
MAINTAINERS
drivers/i2c/busses/Kconfig
drivers/i2c/busses/i2c-piix4.c
drivers/media/i2c/ds90ub913.c
drivers/media/i2c/ds90ub953.c
drivers/media/i2c/ds90ub960.c

diff --cc MAINTAINERS
index 84fcc115b3c95eb6e4eee8f88585d6333b186383,eb11c6f57500aa43fdd5e6184948ff318aca6eeb..1d24abc83d908ec13568e42a2ac70ccac05fff1d
@@@ -3480,9 -3434,7 +3480,9 @@@ M:      Alexey Charkov <alchark@gmail.com
  M:    Krzysztof Kozlowski <krzk@kernel.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Odd Fixes
- F:    Documentation/devicetree/bindings/i2c/i2c-wmt.txt
+ F:    Documentation/devicetree/bindings/i2c/wm,wm8505-i2c.yaml
 +F:    Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
 +F:    Documentation/devicetree/bindings/pwm/via,vt8500-pwm.yaml
  F:    arch/arm/boot/dts/vt8500/
  F:    arch/arm/mach-vt8500/
  F:    drivers/clocksource/timer-vt8500.c
Simple merge
Simple merge
Simple merge
Simple merge
index ed9ace1a54766b6c549ccb11b0b7e44186848cd3,94b20ba6cb86fd9f6d4c67c66ae5f85e5611a96c..082fc62b0f5b9703ccfa34ef6473d9afab8d5b85
@@@ -1271,10 -1056,11 +1274,12 @@@ static int ub960_atr_attach_addr(struc
        struct ub960_rxport *rxport = priv->rxports[chan_id];
        struct device *dev = &priv->client->dev;
        unsigned int reg_idx;
 +      int ret = 0;
  
-       for (reg_idx = 0; reg_idx < ARRAY_SIZE(rxport->aliased_clients); reg_idx++) {
-               if (!rxport->aliased_clients[reg_idx])
+       guard(mutex)(&rxport->aliased_addrs_lock);
+       for (reg_idx = 0; reg_idx < ARRAY_SIZE(rxport->aliased_addrs); reg_idx++) {
+               if (!rxport->aliased_addrs[reg_idx])
                        break;
        }
  
                return -EADDRNOTAVAIL;
        }
  
-       rxport->aliased_clients[reg_idx] = client;
+       rxport->aliased_addrs[reg_idx] = addr;
  
        ub960_rxport_write(priv, chan_id, UB960_RR_SLAVE_ID(reg_idx),
-                          client->addr << 1, &ret);
 -                         addr << 1);
++                         addr << 1, &ret);
        ub960_rxport_write(priv, chan_id, UB960_RR_SLAVE_ALIAS(reg_idx),
 -                         alias << 1);
 +                         alias << 1, &ret);
 +
 +      if (ret)
 +              return ret;
  
        dev_dbg(dev, "rx%u: client 0x%02x assigned alias 0x%02x at slot %u\n",
-               rxport->nport, client->addr, alias, reg_idx);
+               rxport->nport, addr, alias, reg_idx);
  
        return 0;
  }
@@@ -1306,10 -1089,11 +1311,12 @@@ static void ub960_atr_detach_addr(struc
        struct ub960_rxport *rxport = priv->rxports[chan_id];
        struct device *dev = &priv->client->dev;
        unsigned int reg_idx;
 +      int ret;
  
-       for (reg_idx = 0; reg_idx < ARRAY_SIZE(rxport->aliased_clients); reg_idx++) {
-               if (rxport->aliased_clients[reg_idx] == client)
+       guard(mutex)(&rxport->aliased_addrs_lock);
+       for (reg_idx = 0; reg_idx < ARRAY_SIZE(rxport->aliased_addrs); reg_idx++) {
+               if (rxport->aliased_addrs[reg_idx] == addr)
                        break;
        }
  
                return;
        }
  
-       rxport->aliased_clients[reg_idx] = NULL;
+       rxport->aliased_addrs[reg_idx] = 0;
  
 -      ub960_rxport_write(priv, chan_id, UB960_RR_SLAVE_ALIAS(reg_idx), 0);
 +      ret = ub960_rxport_write(priv, chan_id, UB960_RR_SLAVE_ALIAS(reg_idx),
 +                               0, NULL);
 +      if (ret) {
 +              dev_err(dev, "rx%u: unable to fully unmap client 0x%02x: %d\n",
-                       rxport->nport, client->addr, ret);
++                      rxport->nport, addr, ret);
 +              return;
 +      }
  
        dev_dbg(dev, "rx%u: client 0x%02x released at slot %u\n", rxport->nport,
-               client->addr, reg_idx);
+               addr, reg_idx);
  }
  
  static const struct i2c_atr_ops ub960_atr_ops = {
@@@ -4370,12 -3231,21 +4376,14 @@@ static void ub960_txport_free_ports(str
  
  static void ub960_rxport_free_ports(struct ub960_data *priv)
  {
 -      unsigned int nport;
 -
 -      for (nport = 0; nport < priv->hw_data->num_rxports; nport++) {
 -              struct ub960_rxport *rxport = priv->rxports[nport];
 -
 -              if (!rxport)
 -                      continue;
 -
 -              fwnode_handle_put(rxport->source.ep_fwnode);
 -              fwnode_handle_put(rxport->ser.fwnode);
 +      for_each_active_rxport(priv, it) {
 +              fwnode_handle_put(it.rxport->source.ep_fwnode);
 +              fwnode_handle_put(it.rxport->ser.fwnode);
  
 -              mutex_destroy(&rxport->aliased_addrs_lock);
++              mutex_destroy(&it.rxport->aliased_addrs_lock);
 -              kfree(rxport);
 -              priv->rxports[nport] = NULL;
 +              kfree(it.rxport);
 +              priv->rxports[it.nport] = NULL;
        }
  }