diff mbox series

[v2,1/3] dt-bindings: i2c: gpio: Add 'transition-delay-us' property

Message ID 20240529091739.10808-2-bastien.curutchet@bootlin.com
State Superseded
Headers show
Series i2c: mux: gpio: Add 'transition-delay-us' property | expand

Commit Message

Bastien Curutchet May 29, 2024, 9:17 a.m. UTC
I2C MUXes described by the i2c-gpio-mux sometimes need a significant
amount of time to switch from a bus to another. When a new bus is
selected, the first I2C transfer can fail if it occurs too early. There
is no way to describe this transition delay that has to be waited before
starting the first I2C transfer.

Add a 'transition-delay-us' property that indicates the delay to be
respected before doing the first i2c transfer.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
---
 Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rob Herring (Arm) June 3, 2024, 3:58 p.m. UTC | #1
On Wed, May 29, 2024 at 02:13:37PM +0200, Peter Rosin wrote:
> Hi!
> 
> 2024-05-29 at 11:17, Bastien Curutchet wrote:
> > I2C MUXes described by the i2c-gpio-mux sometimes need a significant
> > amount of time to switch from a bus to another. When a new bus is
> > selected, the first I2C transfer can fail if it occurs too early. There
> > is no way to describe this transition delay that has to be waited before
> > starting the first I2C transfer.
> > 
> > Add a 'transition-delay-us' property that indicates the delay to be
> > respected before doing the first i2c transfer.
> 
> The io-channel-mux has a property with very similar intent named
> settle-time-us [1]. I think we should use the same name here.
> 
> [1] Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.yaml

Agreed. I knew we had something and went looking... I only checked the 
base mux and i2c mux bindings.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml
index f34cc7ad5a00..20d72c3e1e10 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml
@@ -57,6 +57,9 @@  properties:
       last value used.
     $ref: /schemas/types.yaml#/definitions/uint32
 
+  transition-delay-us:
+    description: Delay to wait before doing any transfer when a new bus gets selected.
+
 allOf:
   - $ref: i2c-mux.yaml