linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 RESEND 0/2] i2c: muxes: pca954x: Reset if (de)select fails
@ 2025-06-03 12:47 Wojciech Siudy
  2025-06-03 12:47 ` [PATCH v6 RESEND 1/2] i2c: muxes: pca954x: Use reset controller only Wojciech Siudy
  2025-06-03 12:47 ` [PATCH v6 RESEND 2/2] i2c: muxes: pca954x: Reset if (de)select fails Wojciech Siudy
  0 siblings, 2 replies; 7+ messages in thread
From: Wojciech Siudy @ 2025-06-03 12:47 UTC (permalink / raw)
  To: linux-kernel, linux-i2c, peda; +Cc: andi.shyti, mariusz.madej, Wojciech Siudy

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(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-08-01  2:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 12:47 [PATCH v6 RESEND 0/2] i2c: muxes: pca954x: Reset if (de)select fails Wojciech Siudy
2025-06-03 12:47 ` [PATCH v6 RESEND 1/2] i2c: muxes: pca954x: Use reset controller only Wojciech Siudy
2025-07-28 10:31   ` Wolfram Sang
2025-08-01  2:10   ` Wolfram Sang
2025-06-03 12:47 ` [PATCH v6 RESEND 2/2] i2c: muxes: pca954x: Reset if (de)select fails Wojciech Siudy
2025-07-28 10:39   ` Wolfram Sang
2025-08-01  2:14     ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).