[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ms2gwb1w.fsf@bootlin.com>
Date: Wed, 14 Jan 2026 14:58:35 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Rob Herring <robh@...nel.org>
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
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.
Thanks,
Miquèl
Powered by blists - more mailing lists