diff mbox series

[v4,1/2] dt-bindings: i2c: pca954x: Add timeout reset property

Message ID DB6PR07MB3509DBD6C72832E8ABE7FA539D652@DB6PR07MB3509.eurprd07.prod.outlook.com
State New
Headers show
Series pca954x: Add DT bindings and driver changes for reset after timeout | expand

Commit Message

Wojciech Siudy (Nokia) Sept. 13, 2024, 10:37 a.m. UTC
From: Wojciech Siudy <wojciech.siudy@nokia.com>

For cases when the mux shares reset line with other chips we cannot
use it when channel selection or deselection times out, because it
could break them without proper init/probe.

Signed-off-by: Wojciech Siudy <wojciech.siudy@nokia.com>
---
 .../devicetree/bindings/i2c/i2c-mux-pca954x.yaml          | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Conor Dooley Sept. 13, 2024, 5:39 p.m. UTC | #1
On Fri, Sep 13, 2024 at 10:37:30AM +0000, Wojciech Siudy (Nokia) wrote:
> From: Wojciech Siudy <wojciech.siudy@nokia.com>
> 
> For cases when the mux shares reset line with other chips we cannot
> use it when channel selection or deselection times out, because it
> could break them without proper init/probe.
> 
> Signed-off-by: Wojciech Siudy <wojciech.siudy@nokia.com>
> ---
>  .../devicetree/bindings/i2c/i2c-mux-pca954x.yaml          | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
> index 9aa0585200c9..872be72da965 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
> @@ -63,6 +63,12 @@ properties:
>        necessary for example, if there are several multiplexers on the bus and
>        the devices behind them use same I2C addresses.
>  
> +  i2c-mux-timeout-reset:
> +    type: boolean
> +    description: Sends reset pulse if channel selection or deselection times
> +      out. Works only if reset GPIO provided. Do not use if other chips share
> +      the same reset line.

Why is a dedicated property required for this? Why is it not sufficient to
attempt an exclusive request of the reset line, and always perform a
reset if selection or deselection times out?

Rather than "Works only if reset GPIO provided", enforce this with a
dependency.

Thanks,
Conor.

> +
>    idle-state:
>      description: if present, overrides i2c-mux-idle-disconnect
>      $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state
> @@ -146,6 +152,8 @@ examples:
>              interrupt-parent = <&ipic>;
>              interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
>              interrupt-controller;
> +            i2c-mux-idle-disconnect;
> +            i2c-mux-timeout-reset;
>              #interrupt-cells = <2>;
>  
>              i2c@2 {
> -- 
> 2.34.1
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
index 9aa0585200c9..872be72da965 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
@@ -63,6 +63,12 @@  properties:
       necessary for example, if there are several multiplexers on the bus and
       the devices behind them use same I2C addresses.
 
+  i2c-mux-timeout-reset:
+    type: boolean
+    description: Sends reset pulse if channel selection or deselection times
+      out. Works only if reset GPIO provided. Do not use if other chips share
+      the same reset line.
+
   idle-state:
     description: if present, overrides i2c-mux-idle-disconnect
     $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state
@@ -146,6 +152,8 @@  examples:
             interrupt-parent = <&ipic>;
             interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
             interrupt-controller;
+            i2c-mux-idle-disconnect;
+            i2c-mux-timeout-reset;
             #interrupt-cells = <2>;
 
             i2c@2 {