Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add NXP PCA9641 I2C bus master arbiter support
@ 2026-09-17  8:58 Shiv Prakash Gupta
  2026-09-17  8:58 ` [PATCH v2 1/2] dt-bindings: i2c: Add NXP PCA9641 I2C bus master arbiter Shiv Prakash Gupta
  2026-09-17  8:58 ` [PATCH v2 2/2] i2c: mux: Add NXP PCA9641 I2C bus master arbiter driver Shiv Prakash Gupta
  0 siblings, 2 replies; 4+ messages in thread
From: Shiv Prakash Gupta @ 2026-09-17  8:58 UTC (permalink / raw)
  To: andi.shyti, robh, krzk+dt, conor+dt, peda, linux-i2c, devicetree,
	linux-kernel
  Cc: vikash.bansal, priyanka.jain, Shiv Prakash Gupta

This series adds device tree bindings and an I2C mux driver for the NXP
PCA9641 2-to-1 I2C bus master arbiter. The PCA9641 lets two upstream I2C
masters share a single downstream slave bus using a lock/grant protocol:
a master asserts LOCK_REQ, waits for LOCK_GRANT, sets BUS_CONNECT to open
the switch, performs its transactions, and then clears LOCK_REQ to release
the bus. The driver plugs into the i2c-mux core as an I2C_MUX_ARBITRATOR
and supports interrupt-assisted arbitration (via INT0/INT1 wired to a
GPIO) with a fallback to polling when no interrupt is configured.

Changes in v2:
- Binding: add Acked-by from Conor Dooley (no functional changes).
- Driver: drop IRQF_SHARED from the threaded IRQ request.
- Driver: clear the latched LOCK_REQ on every timeout path in
  select_chan() so a master that gives up does not block the peer.
- Driver: reorder probe interrupt setup - mask all sources and clear
  stale INT_STATUS before requesting the IRQ, then unmask LOCK_GRANT
  and BUS_LOST.
- Driver: re-mask interrupts if i2c_mux_add_adapter() fails.
- Driver: unregister the child adapter before masking interrupts in
  remove().
- Driver: use a named initializer for the i2c_device_id table.

Shiv Prakash Gupta (2):
  dt-bindings: i2c: Add NXP PCA9641 I2C bus master arbiter
  i2c: mux: Add NXP PCA9641 I2C bus master arbiter driver

 .../devicetree/bindings/i2c/nxp,pca9641.yaml  | 109 +++++
 MAINTAINERS                                   |   7 +
 drivers/i2c/muxes/Kconfig                     |  15 +
 drivers/i2c/muxes/Makefile                    |   1 +
 drivers/i2c/muxes/i2c-mux-pca9641.c           | 420 ++++++++++++++++++
 5 files changed, 552 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/nxp,pca9641.yaml
 create mode 100644 drivers/i2c/muxes/i2c-mux-pca9641.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-17  9:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17  8:58 [PATCH v2 0/2] Add NXP PCA9641 I2C bus master arbiter support Shiv Prakash Gupta
2026-09-17  8:58 ` [PATCH v2 1/2] dt-bindings: i2c: Add NXP PCA9641 I2C bus master arbiter Shiv Prakash Gupta
2026-09-17  8:58 ` [PATCH v2 2/2] i2c: mux: Add NXP PCA9641 I2C bus master arbiter driver Shiv Prakash Gupta
2026-09-17  9:10   ` sashiko-bot

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