mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Cc: Linus Walleij <linusw@kernel.org>, Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	 devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: pinctrl: mcp23s08: Add multi-chip example
Date: Wed, 14 Jan 2026 10:21:40 +0100	[thread overview]
Message-ID: <20260114-woodoo-ubiquitous-turtle-bddbee@quoll> (raw)
In-Reply-To: <20260113-mcp23s17-multiple-addr-names-v1-2-f14b60f92c82@yoseli.org>

On Tue, Jan 13, 2026 at 03:29:48PM +0100, Jean-Michel Hautbois wrote:
> Enable gpio-line-names property in the schema and add example showing
> how to use it with multiple MCP23S08/17/18 chips sharing the same SPI
> chip select. Names are assigned sequentially in hardware address order.
> 
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
> ---
>  .../bindings/pinctrl/microchip,mcp23s08.yaml       | 33 ++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/microchip,mcp23s08.yaml b/Documentation/devicetree/bindings/pinctrl/microchip,mcp23s08.yaml
> index e07f4723de17..667be31b6da3 100644
> --- a/Documentation/devicetree/bindings/pinctrl/microchip,mcp23s08.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/microchip,mcp23s08.yaml
> @@ -42,6 +42,8 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> +  gpio-line-names: true

Variable number of GPIOs? No constraints possible at all? 

> +
>    reset-gpios:
>      description: GPIO specifier for active-low reset pin.
>      maxItems: 1
> @@ -159,3 +161,34 @@ examples:
>              microchip,spi-present-mask = /bits/ 8 <0x01>;
>          };
>      };
> +
> +  - |
> +    /* Multiple chips sharing same SPI CS with gpio-line-names */
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        gpio@0 {
> +            compatible = "microchip,mcp23s17";
> +            reg = <0>;
> +            gpio-controller;
> +            #gpio-cells = <2>;
> +            spi-max-frequency = <10000000>;
> +            /* Two chips at hardware addresses 0 and 1 */
> +            microchip,spi-present-mask = /bits/ 8 <0x03>;
> +            /*
> +             * Names assigned sequentially in address order.
> +             * First 16 names for chip at address 0 (GPA0-7, GPB0-7).
> +             * Next 16 names for chip at address 1 (GPA0-7, GPB0-7).
> +             */
> +            gpio-line-names =

Just extend existing example. There is little point in adding one new
example per one new different property.

Best regards,
Krzysztof


  reply	other threads:[~2026-01-14  9:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13 14:29 [PATCH 0/2] pinctrl: mcp23s08: Enable gpio-line-names for multi-chip configurations Jean-Michel Hautbois via B4 Relay
2026-01-13 14:29 ` [PATCH 1/2] pinctrl: mcp23s08: support gpio-line-names Jean-Michel Hautbois via B4 Relay
2026-01-13 14:29 ` [PATCH 2/2] dt-bindings: pinctrl: mcp23s08: Add multi-chip example Jean-Michel Hautbois via B4 Relay
2026-01-14  9:21   ` Krzysztof Kozlowski [this message]
2026-01-14 13:52   ` Linus Walleij
2026-01-14 17:29     ` Jean-Michel Hautbois
2026-01-18 23:12       ` Linus Walleij
2026-01-19  6:15         ` Jean-Michel Hautbois
2026-01-19  8:46           ` Linus Walleij

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=20260114-woodoo-ubiquitous-turtle-bddbee@quoll \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=himanshu.bhavani@siliconsignals.io \
    --cc=jeanmichel.hautbois@yoseli.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®