[PATCH v7 0/2] i2c: i2c-gpio: Enhance driver for buses with shared SCL

Markus Stockhausen <[email protected]>
Newsgroups org.kernel.vger.linux-i2c,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
This series adds support for devices with multiple I2C buses 
that share a single clock line.

Signed-off-by: Markus Stockhausen <[email protected]>
---

v6 -> v7
  - Handle devicetree GPIO node attributes opaque. E.g. do not 
    interpret a pin from args[0]. With this generalize the shared 
    SCL detection by simply comparing all attributes.
  - Gracefully disable pin sharing if devicetree lookup does not 
    work as expected. This avoids interference with otherwise sane
    setups. 
  - Disable bit_test only if a (potentially) shared SCL pin is
    detected.
v6: https://lore.kernel.org/linux-i2c/[email protected]/
v6 Sashiko: https://sashiko.dev/#/patchset/20260714062018.3009830-1-markus.stockhausen%40gmx.de

v5 -> v6
  - Add legacy system detection (without dts/fwnode)
  - Add skip_bit_test setting to algorithm options via pre-commit
  - Make use of skip_bit_test in the driver
v5: https://lore.kernel.org/linux-i2c/[email protected]/
v5 Sashiko: https://sashiko.dev/#/patchset/20260713062021.2995641-1-markus.stockhausen%40gmx.de

v4 -> v5
  - Whitespace cleanup
  - Send to LKML for Sashiko review
  - Add Reviewed-by
v4: https://lore.kernel.org/linux-i2c/[email protected]/

v3 -> v4
  - add Reviewed-by and Tested-by
v3: https://lore.kernel.org/linux-i2c/[email protected]/

v2 -> v3
  - Fix lockdep_set_class() with DEBUG_LOCK_ALLOC=y
v2: https://lore.kernel.org/linux-i2c/[email protected]/

v1 -> v2
  - Convert fault injector to scl->gpio (reported by test robot)
  - Use rt_mutex and i2c_lock_operations instead of pre/post_xfer
    (logic taken from i2c-cht-wc.c and enhanced)
  - i2c_gpio_lookup_scl()
    - Improve list control flow
    - Improve comment
    - Carve out SCL node comparison into i2c_gpio_scl_matches()
  - Drop "valid" attribute and directly check gpiod instead
  - Improve fwnode args check for #gpio-cells=1 case
  - Add sda/scl cleanup during probe failures
  - Replace dev_info() with dev_dbg()
  - Reflect changed locking in commmit message
  - Tested with config option GPIO_SHARED/GPIO_SHARED_PROXY
    as requested by Bartosz
v1: https://lore.kernel.org/linux-i2c/[email protected]/

v0 -> v1
  - Initially this enhancement was submitted as a new driver with
    a new devicetree structure. After some discussion Wolfram
    advised to make only an enhancement to the i2c-gpio driver.
v0: https://lore.kernel.org/linux-i2c/[email protected]/


Markus Stockhausen (2):
  i2c: algo: bit: Allow to skip bit test
  i2c: i2c-gpio: Enhance driver for buses with shared SCL

 drivers/i2c/algos/i2c-algo-bit.c |   2 +-
 drivers/i2c/busses/i2c-gpio.c    | 223 +++++++++++++++++++++++++++++--
 include/linux/i2c-algo-bit.h     |   1 +
 3 files changed, 211 insertions(+), 15 deletions(-)

-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.