mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] i2c: mux: pca954x: Track unknown mux state and report deselect failures
@ 2026-11-06 20:33 Bart Van Assche
  2026-11-06 20:33 ` [PATCH 1/3] i2c: mux: pca954x: Track unknown channel state Bart Van Assche
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bart Van Assche @ 2026-11-06 20:33 UTC (permalink / raw)
  To: Peter Rosin
  Cc: Andi Shyti, Wolfram Sang, linux-i2c, linux-kernel, Bart Van Assche

Hi Peter,

If a control register write to a pca954x mux fails (e.g. if only the ACK
was lost), the write may still have reached the hardware, leaving the
mux in an unknown state. Currently the driver records last_chan as 0
(disconnected) after any failed write, which causes idle_state_store()
to skip the disconnect write if the idle state is updated to
MUX_IDLE_DISCONNECT. In addition, failures in pca954x_deselect_mux() go
unnoticed because the i2c-mux core ignores the deselect return value.
Track an unknown mux state by setting last_chan to -1 after any failed
control register write, split out pca954x_set_idle_state() from
pca954x_deselect_mux(), and log a rate-limited warning when deselecting
a channel fails.

Please consider this series for the next merge window.

Thanks,

Bart.

Bart Van Assche (3):
  i2c: mux: pca954x: Track unknown channel state
  i2c: mux: pca954x: Introduce pca954x_set_idle_state()
  i2c: mux: pca954x: Report deselect failures

 drivers/i2c/muxes/i2c-mux-pca954x.c | 60 +++++++++++++++++++----------
 1 file changed, 40 insertions(+), 20 deletions(-)


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

end of thread, other threads:[~2026-11-06 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-06 20:33 [PATCH 0/3] i2c: mux: pca954x: Track unknown mux state and report deselect failures Bart Van Assche
2026-11-06 20:33 ` [PATCH 1/3] i2c: mux: pca954x: Track unknown channel state Bart Van Assche
2026-11-06 20:33 ` [PATCH 2/3] i2c: mux: pca954x: Introduce pca954x_set_idle_state() Bart Van Assche
2026-11-06 20:33 ` [PATCH 3/3] i2c: mux: pca954x: Report deselect failures Bart Van Assche

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

all inboxes | Powered by JetHome®