Skip to content

RFC i2c: core and si7020: Add adapter transfer callback

Eddie James linux-i2c linux-iio lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2i2c: core: Add adapter transfer callbackdrivers/i2c/i2c-core-base.c include/linux/i2c.h+28 -01 reply
2/2iio: humidity: si7020: Use core transfer callback to sleep after resetdrivers/iio/humidity/si7020.c+10 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/2] i2c: core and si7020: Add adapter transfer callback

This series adds a callback function pointer to be executed after the adapter performs a transfer. The purpose of such a callback is for a client to execute some code while "owning" the bus entirely. Holding the adapter lock is insufficient in the case where the client is behind a mux, as the mux driver could perform mux selection operations on the bus while locked. The only use case for now is the SI7020 driver. While the SI7020 is starting up after power on or reset, any I2C commands on the bus can potentially upset the startup sequence. Since the SI7020 may be behind a mux, the driver needs to use the new transfer callback to sleep while the chip starts up.

Eddie James (2):
i2c: core: Add adapter transfer callback
iio: humidity: si7020: Use core transfer callback to sleep after reset

 drivers/i2c/i2c-core-base.c   |  3 +++
 drivers/iio/humidity/si7020.c | 12 ++++++++++--
 include/linux/i2c.h           | 25 +++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 2 deletions(-)
Signature · 1 line
2.27.0