public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] i2c: mux: gpio: Add 'transition-delay-ms' property
@ 2024-05-27 11:39 Bastien Curutchet
  2024-05-27 11:39 ` [PATCH 1/3] dt-bindings: i2c: " Bastien Curutchet
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bastien Curutchet @ 2024-05-27 11:39 UTC (permalink / raw)
  To: Peter Rosin, Andi Shyti, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Peter Korsgaard, Wolfram Sang
  Cc: linux-i2c, devicetree, linux-kernel, Thomas Petazzoni,
	herve.codina, christophercordahi, Bastien Curutchet

Hi all,

The i2c-gpio-mux can be used to describe a multiplexer built upon
several i2c isolators having an enable pin (such as LTC4310):

 +---------------+                     +------+  +------+
 | +-----------+ |                     | dev  |  | dev  |
 | | GPIO_EN_A |-|-----------|         +------+  +------+
 | +-----------+ |     +-----+---+         |         |
 |               |  |--| isol. A |---------+---------+
 |     +-----+   |  |  +---------+
 | SOC | I2C |---|--|
 |     +-----+   |  |  +---------+
 |               |  |--| isol. B |------+---------+---------+
 | +-----------+ |     +-----+---+      |         |         |
 | | GPIO_EN_B |-|-----------|      +------+  +------+  +------+
 | +-----------+ |                  | dev  |  | dev  |  | dev  |
 +---------------+                  +------+  +------+  +------+

These isolators often need some time between their enable pin's
assertion and the first i2c transfer. If the first i2c transfer
happens before this enabling time is reached, transfer fails.

There is no available option to configure such a time in the
i2c-gpio-mux driver.

Add a optional property in the bindings called 'transition-delay-ms'.
If present, driver waits for this delay every time a new bus is
selected, i.e. before returning from the bus_select() callback.

Bastien Curutchet (3):
  dt-bindings: i2c: gpio: Add 'transition-delay-ms' property
  i2c: mux: gpio: Re-order #include to match alphabetic order
  i2c: mux: gpio: Add support for the 'transition-delay-ms' property

 .../devicetree/bindings/i2c/i2c-mux-gpio.yaml      |  3 +++
 drivers/i2c/muxes/i2c-mux-gpio.c                   | 14 ++++++++++----
 include/linux/platform_data/i2c-mux-gpio.h         |  2 ++
 3 files changed, 15 insertions(+), 4 deletions(-)

-- 
2.44.0


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

end of thread, other threads:[~2024-05-28  7:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27 11:39 [PATCH 0/3] i2c: mux: gpio: Add 'transition-delay-ms' property Bastien Curutchet
2024-05-27 11:39 ` [PATCH 1/3] dt-bindings: i2c: " Bastien Curutchet
2024-05-27 14:38   ` Krzysztof Kozlowski
2024-05-28  6:59     ` Bastien Curutchet
2024-05-28  7:49       ` Krzysztof Kozlowski
2024-05-27 11:39 ` [PATCH 2/3] i2c: mux: gpio: Re-order #include to match alphabetic order Bastien Curutchet
2024-05-27 11:39 ` [PATCH 3/3] i2c: mux: gpio: Add support for the 'transition-delay-ms' property Bastien Curutchet

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