i2c: mux: pca954x: Track unknown mux state and report deselect failures
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | i2c: mux: pca954x: Track unknown channel statedrivers/ | +14 | 0 replies | |
| 2/3 | i2c: mux: pca954x: Introduce pca954x_set_idle_state()drivers/ | +15 | 0 replies | |
| 3/3 | i2c: mux: pca954x: Report deselect failuresdrivers/ | +15 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] i2c: mux: pca954x: Track unknown mux state and report deselect failures
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(-)