linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] regulator: dt-bindings: gpio-regulator: Fix {gpios-,}states limits
Date: Thu, 1 Feb 2024 16:11:51 -0600	[thread overview]
Message-ID: <20240201221151.GA1562458-robh@kernel.org> (raw)
In-Reply-To: <b20aab137058c02ab5af9aaa1280729a02c6ea49.1706802756.git.geert+renesas@glider.be>

On Thu, Feb 01, 2024 at 04:58:41PM +0100, Geert Uytterhoeven wrote:
> make dtbs_check:
> 
>     arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dtb: regulator-vccq-sdhi0: Unevaluated properties are not allowed ('gpios-states', 'states' were unexpected)
> 	    from schema $id: http://devicetree.org/schemas/regulator/gpio-regulator.yaml#

Unevaluated properties warning here is not interesting. If a property 
fails validation, then it is considered unevaluated. It's that warning 
which is interesting:

arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dtb: regulator-vccq-sdhi0: gpios-states:0: [1] is too short
        from schema $id: http://devicetree.org/schemas/regulator/gpio-regulator.yaml#

> 
> The number of items in "gpios-states" must match the number of items in
> "gpios", so their limits should be identical.
> 
> The number of items in "states" must lie within the range from zero up
> to 2^{number of gpios}.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> The second issue did not cause any dtbs_check errors?

I'm not seeing 'states' fail, but it looks like you did? Is that the 
issue you mean? Looks like in the matrix case, we're now setting 
minItems if unspecified.

> ---
>  .../devicetree/bindings/regulator/gpio-regulator.yaml         | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml b/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
> index f4c1f36e52e9c3d8..1cecf8faee5dc374 100644
> --- a/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
> @@ -47,6 +47,7 @@ properties:
>          1: HIGH
>        Default is LOW if nothing else is specified.
>      $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 1
>      maxItems: 8
>      items:
>        enum: [0, 1]
> @@ -57,7 +58,8 @@ properties:
>        regulator and matching GPIO configurations to achieve them. If there are
>        no states in the "states" array, use a fixed regulator instead.
>      $ref: /schemas/types.yaml#/definitions/uint32-matrix
> -    maxItems: 8
> +    minItems: 0
> +    maxItems: 256
>      items:
>        items:
>          - description: Voltage in microvolts
> -- 
> 2.34.1
> 

  parent reply	other threads:[~2024-02-01 22:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 15:58 [PATCH 0/2] regulator: gpio: Miscellaneous state fixes Geert Uytterhoeven
2024-02-01 15:58 ` [PATCH 1/2] regulator: dt-bindings: gpio-regulator: Fix {gpios-,}states limits Geert Uytterhoeven
2024-02-01 17:31   ` Rob Herring
2024-02-01 20:05     ` Geert Uytterhoeven
2024-02-01 20:27       ` Rob Herring
2024-02-01 22:11   ` Rob Herring [this message]
2024-02-02  8:11     ` Geert Uytterhoeven
2024-02-01 15:58 ` [PATCH 2/2] regulator: gpio: Correct default GPIO state to LOW Geert Uytterhoeven
2024-02-02 17:41   ` Linus Walleij
2024-02-03  0:23     ` Mark Brown
2024-02-04 18:18       ` 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=20240201221151.GA1562458-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.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).