public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: hs@denx.de, linux-kernel@vger.kernel.org
Cc: Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Rob Herring <robh@kernel.org>,
	devicetree@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming
Date: Sat, 2 Nov 2024 08:56:00 +0100	[thread overview]
Message-ID: <559908e3-ca6b-4bbd-846d-940cf338e2b7@kernel.org> (raw)
In-Reply-To: <644ae184-1fef-fa42-06de-e1086b7b14bb@denx.de>

On 02/11/2024 06:24, Heiko Schocher wrote:
>>>     reg:
>>>       maxItems: 1
>>>   
>>> +  gpio-line-names:
>>> +    minItems: 1
>>
>> I think gpio-line-names should always match the actual number of GPIOs
>> for given device. Do you have here devices with 1 gpio? This could be
>> further constrained in if:then sections.
> 
> I have the device with "sx150x_16_pins", see drivers/pinctrl/pinctrl-sx150x.c
> 
> I started with minItems, because I thought it is okay to allow
> less names... (as I did in patch 3/3) but see now, that other drivers have
> minItems = maxItems.
> 
> So I think I should add to my patch the following part:

Yes, but in top-level you keep widest constraints, so min 5 max 17.

> 
> hs@threadripper:linux  [aristainetos3-dts-v3] $ git diff
> diff --git a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml 
> b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> index fd0936545bb8..0872ee1c6fa6 100644
> --- a/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/semtech,sx1501q.yaml
> @@ -91,6 +91,45 @@ required:
> 
>   allOf:
>     - $ref: pinctrl.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1501q
> +              - semtech,sx1504q
> +              - semtech,sx1507q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 5
> +              maxItems: 5
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1502q
> +              - semtech,sx1505q
> +              - semtech,sx1508q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 9
> +              maxItems: 9
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - semtech,sx1503q
> +              - semtech,sx1506q
> +              - semtech,sx1509q
> +    then:
> +       properties:
> +          gpio-line-names:
> +              minItems: 17
> +              maxItems: 17
>     - if:
>         not:
>           properties:


Best regards,
Krzysztof


  reply	other threads:[~2024-11-02  7:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31 15:12 [PATCH v2 0/3] arm64: dts: imx8mp: add support for the ABB SoM and carrier Heiko Schocher
2024-10-31 15:12 ` [PATCH v2 1/3] dt-bindings: arm: fsl: Add " Heiko Schocher
2024-10-31 18:11   ` Krzysztof Kozlowski
2024-10-31 15:12 ` [PATCH v2 2/3] dt-bindings: pinctrl: sx150xq: allow gpio line naming Heiko Schocher
2024-10-31 18:14   ` Krzysztof Kozlowski
2024-11-02  5:24     ` Heiko Schocher
2024-11-02  7:56       ` Krzysztof Kozlowski [this message]
2024-10-31 15:12 ` [PATCH v2 3/3] arm64: dts: imx8mp: add aristainetos3 board support Heiko Schocher
2024-11-03  9:41   ` Shawn Guo
2024-11-04  5:33     ` Heiko Schocher
2024-11-04  7:13       ` Shawn Guo
2024-11-04  7:54         ` Heiko Schocher
2024-11-04 11:15   ` Fabio Estevam
2024-11-04 12:01     ` Heiko Schocher

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=559908e3-ca6b-4bbd-846d-940cf338e2b7@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hs@denx.de \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.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