mbox series

[v6,0/2] i2c: muxes: pca954x: Reset if (de)select fails

Message ID 20250514122226.3267855-1-wojciech.siudy@nokia.com
Headers show
Series i2c: muxes: pca954x: Reset if (de)select fails | expand

Message

Wojciech Siudy May 14, 2025, 12:22 p.m. UTC
The pca954x mux might not respond under certain circumstances, like
device behind it holding SDA after recovery loop or some internal issue
in mux itself. Those situations are indicated by ETIMEDOUT returned
from I2C transaction attempting selecting or deselecting the channel.
According to device documentation the reset pulse restores I2C
subsystem of the mux and deselects the channel.

Since the mux switches using transistor switches, the failure of line
behind mux that is currently connected prevents sending commands to mux
itself, so external reset signal is required. 

The following series of patches removes legacy gpio-based reset calls,
because reset controller framework already uses reset-gpios property
and resets the device when channel selection or deselection fails.

Even through the current transaction will fail anyway, the next will
be possible to perform without resetting the whole system.

---
Changelog:
v2:
  * Removed mail header from the commit log
  * Decreased reset pulse hold time from 10 to 1 ms
v3:
  * Make this functionality enabled by appropriate property in
    devicetree
v4:
  * Fix missing condition check from devicetree
v5:
  * Declare dependency of a new property
v6:
  * Don't add any new properties, use reset controller only
---

Wojciech Siudy (2):
  i2c: muxes: pca954x: Use reset controller only
  i2c: muxes: pca954x: Reset if (de)select fails

 drivers/i2c/muxes/i2c-mux-pca954x.c | 49 ++++++++++++++++-------------
 1 file changed, 27 insertions(+), 22 deletions(-)