[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqKhoBE2fMcB37wsxtXa+BdbeTRDfD=jpRTgAJ8nBR1foQ@mail.gmail.com>
Date: Thu, 1 Feb 2024 14:27:51 -0600
From: Rob Herring <robh@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Marek Szyprowski <m.szyprowski@...sung.com>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, devicetree@...r.kernel.org,
Conor Dooley <conor+dt@...nel.org>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Subject: Re: [PATCH 1/2] regulator: dt-bindings: gpio-regulator: Fix
{gpios-,}states limits
On Thu, Feb 1, 2024 at 2:06 PM Geert Uytterhoeven <geert@...ux-m68korg> wrote:
>
> Hi Rob The Robot ;-)
:)
> On Thu, Feb 1, 2024 at 6:31 PM Rob Herring <robh@...nel.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@...der.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?
Yes. While JSON can for example have "foo: []", that's not really
defined for DT given we store no type info. An empty property is a
boolean.
Rob
Powered by blists - more mailing lists