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

Hi Rob The Robot ;-)

On Thu, Feb 1, 2024 at 6:31 PM Rob Herring <robh@kernel.org> wrote:
> On Thu, 01 Feb 2024 16:58:41 +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#
> >
> > 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?
> > ---
> >  .../devicetree/bindings/regulator/gpio-regulator.yaml         | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml: properties:states:minItems: 0 is less than the minimum of 1
>         hint: An array property has at least 1 item or is not present
>         from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#

Oops, I changed this from 1 to 0 _after_ running dt_binding_check, so
I'm totally to blame for this.

The description says:

    If there are no states in the "states" array, use a fixed regulator instead.

which I misinterpreted as "states can be empty", especially as the
driver does seem to support that?

I guess 1 is the proper minimum?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2024-02-01 20:06 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 [this message]
2024-02-01 20:27       ` Rob Herring
2024-02-01 22:11   ` Rob Herring
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=CAMuHMdWfovGkvrk4coitFgDTuHS_fQcvFb8kJj-1AWtUgkAYgg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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 \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).