devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Wojciech Siudy <wojciech.siudy@nokia.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, andi.shyti@kernel.org,
	peda@axentia.se
Subject: Re: [PATCH v5 1/2] dt-bindings: i2c: pca954x: Add timeout reset property
Date: Fri, 18 Oct 2024 08:53:14 -0500	[thread overview]
Message-ID: <20241018135314.GA91900-robh@kernel.org> (raw)
In-Reply-To: <20241018100338.19420-2-wojciech.siudy@nokia.com>

On Fri, Oct 18, 2024 at 12:03:37PM +0200, Wojciech Siudy wrote:
> For cases when the mux shares reset line with other chips we cannot
> use it always when channel selection or deselection times out, because
> it could break them without proper init/probe. The property is
> necessary, because reset lines are board-specific.
> 
> Signed-off-by: Wojciech Siudy <wojciech.siudy@nokia.com>
> 
> ---
> Changelog:
> v5:
>   * Declare dependency of a new property
> ---
>  .../devicetree/bindings/i2c/i2c-mux-pca954x.yaml      | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
> index 9aa0585200c9..37882a5a8c87 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
> @@ -63,6 +63,11 @@ 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. Do not use if other chips share the same reset line.

If you have a reset GPIO for the mux, then why wouldn't just use it on 
timeout? What happens if you timeout and don't have this property? Just 
give up? 

Does the timeout time need to be configurable?

> +
>    idle-state:
>      description: if present, overrides i2c-mux-idle-disconnect
>      $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state
> @@ -88,6 +93,9 @@ properties:
>        register activates a channel to detect a stuck high fault. On fault the
>        channel is isolated from the upstream bus.
>  
> +dependencies:
> +  i2c-mux-timeout-reset: [ reset-gpios ]
> +
>  required:
>    - compatible
>    - reg
> @@ -146,6 +154,9 @@ examples:
>              interrupt-parent = <&ipic>;
>              interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
>              interrupt-controller;
> +            reset-gpios = <&gpio1 27 1>;
> +            i2c-mux-idle-disconnect;
> +            i2c-mux-timeout-reset;
>              #interrupt-cells = <2>;
>  
>              i2c@2 {
> -- 
> 2.34.1
> 

  reply	other threads:[~2024-10-18 13:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 10:03 [PATCH v5 0/2] pca954x: Add DT bindings and driver changes for reset after timeout Wojciech Siudy
2024-10-18 10:03 ` [PATCH v5 1/2] dt-bindings: i2c: pca954x: Add timeout reset property Wojciech Siudy
2024-10-18 13:53   ` Rob Herring [this message]
2024-10-19 11:09     ` Wojciech Siudy (Nokia)
2024-10-21  7:27       ` Krzysztof Kozlowski
2024-10-24  7:05         ` ODP: " Wojciech Siudy (Nokia)
2024-10-24  7:08           ` Krzysztof Kozlowski
2024-10-24  9:18             ` Wojciech Siudy (Nokia)
2024-10-24  9:40               ` Krzysztof Kozlowski
2024-10-18 10:03 ` [PATCH v5 2/2] pca954x: Reset if channel select fails Wojciech Siudy
2024-10-24 10:59   ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241018135314.GA91900-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=wojciech.siudy@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).