Skip to content

i2c: core: Add mux root adapter operations

Eddie James linux-i2c linux-iio lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 5 repliesIn review
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Correct spelling of i2c_unlock_deselect_bus comment.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2i2c: core: Add mux root adapter operationsdrivers/i2c/i2c-core-base.c drivers/i2c/i2c-mux.c include/linux/i2c.h+130 -00 replies
2/2iio: si7020: Lock root adapter to wait for resetdrivers/iio/humidity/si7020.c+14 -25 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJoel Stanley
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] i2c: core: Add mux root adapter operations

Some I2C clients need the ability to control the root I2C bus even if the endpoint device is behind a mux. For example, a driver for a chip that can't handle any I2C traffic on the bus while coming out of reset (including an I2C-driven mux switching channels) may need to lock the root bus with the mux selection fixed for the entire time the device is in reset.
The SI7020 is such a device. This series adds the ability to the I2C core to lock the root adapter of a client and fix the mux channel selection until unlocked. The patch to the SI7020 driver then uses the new functions to do just that and make sure the chip reset is safe.
I included the IIO patch for context, I can split and resubmit to iio list only if necessary.
Thanks to Milton for the general idea here.

Changes since v1:
- Correct spelling of i2c_unlock_deselect_bus comment.

Eddie James (2):
i2c: core: Add mux root adapter operations
iio: si7020: Lock root adapter to wait for reset

 drivers/i2c/i2c-core-base.c   | 38 ++++++++++++++++++++++++++
 drivers/i2c/i2c-mux.c         | 50 +++++++++++++++++++++++++++++++++++
 drivers/iio/humidity/si7020.c | 16 +++++++++--
 include/linux/i2c.h           | 42 +++++++++++++++++++++++++++++
 4 files changed, 144 insertions(+), 2 deletions(-)
Signature · 1 line
2.31.1