[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqJ+4+Uq=GWwU-naqTs82hp=Kuw6QLRN-ZrhMDBGa_LGww@mail.gmail.com>
Date: Wed, 14 Jan 2026 11:47:06 -0600
From: Rob Herring <robh@...nel.org>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Richard Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Brian Norris <computersforpeace@...il.com>, Kamal Dasu <kdasu.kdev@...il.com>,
William Zhang <william.zhang@...adcom.com>, Nick Terrell <terrelln@...com>,
David Sterba <dsterba@...e.com>, Rafał Miłecki <rafal@...ecki.pl>,
Simon Glass <sjg@...omium.org>, Linus Walleij <linusw@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>, Marcus Folkesson <marcus.folkesson@...il.com>,
Tony Lindgren <tony@...mide.com>, Roger Quadros <rogerq@...nel.org>, Hauke Mehrtens <hauke@...ke-m.de>,
linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org
Subject: Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties
are documented
On Wed, Jan 14, 2026 at 7:58 AM Miquel Raynal <miquel.raynal@...tlin.com> wrote:
>
> Hi Rob,
>
> >> > +$defs:
> >> > + partition-node:
> >> > + type: object
> >> > + if:
> >> > + not:
> >> > + required: [ compatible ]
> >> > + then:
> >> > + $ref: '#'
> >> > + unevaluatedProperties: false
> >> > + else:
> >> > + $ref: '#'
> >>
> >> This, however, is total blackmagic to me. Would you mind explaining what
> >>
> >> $ref: '#'
> >>
> >> indicates? Is this a placeholder indicating "a reference must be given?
> >
> > It's what's known as JSON pointers. The '#' is a reference to the top
> > level of this schema.
> >
> >> Also I do not understand the final else case, what is it covering?
> >
> > It's really just there so a $ref to
> > partition.yaml#/$defs/partition-node applies the schema (all of
> > partition.yaml) whether there's a compatible property or not.
> >
> > This all just works around that a schema like this doesn't work:
> >
> > $ref: foo.yaml
> > if:
> > ...
> > then:
> > unevaluatedProperties: false
> >
> > The evaluation of unevaluatedProperties doesn't "see" the $ref being
> > in the parent. So we can't factor out the $ref.
>
> Oooh, ok, fully understood. I think I already faced that problem
> before. First time I hear about JSON pointers, thanks a lot for the
> heads up.
>
> Regarding this series, it feels like in the end, if I understood the
> discussion with Krzysztof correctly, there is no modification to bring?
> Let me know if you plan on sending a v2 of if I shall take v1 otherwise.
Right, I think v1 is good to go.
Rob
Powered by blists - more mailing lists