From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh@kernel.org>
Cc: "Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Brian Norris" <computersforpeace@gmail.com>,
"Kamal Dasu" <kdasu.kdev@gmail.com>,
"William Zhang" <william.zhang@broadcom.com>,
"Nick Terrell" <terrelln@fb.com>,
"David Sterba" <dsterba@suse.com>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Simon Glass" <sjg@chromium.org>,
"Linus Walleij" <linusw@kernel.org>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Marcus Folkesson" <marcus.folkesson@gmail.com>,
"Tony Lindgren" <tony@atomide.com>,
"Roger Quadros" <rogerq@kernel.org>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented
Date: Wed, 14 Jan 2026 14:58:35 +0100 [thread overview]
Message-ID: <87ms2gwb1w.fsf@bootlin.com> (raw)
In-Reply-To: <CAL_JsqKV+3ZnqpbQ4USmJh-dngik_jZdnpOw0bGcxD0RSSzfxA@mail.gmail.com> (Rob Herring's message of "Fri, 9 Jan 2026 18:34:17 -0600")
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
next prev parent reply other threads:[~2026-01-14 13:58 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 17:53 [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Rob Herring (Arm)
2026-01-08 17:53 ` [PATCH 01/10] dt-bindings: mtd: brcm,brcmnand: Drop "brcm,brcmnand" compatible for iProc Rob Herring (Arm)
2026-01-09 8:56 ` Krzysztof Kozlowski
2026-01-09 18:05 ` William Zhang
2026-01-12 15:48 ` Rob Herring
2026-01-14 19:31 ` William Zhang
2026-01-08 17:53 ` [PATCH 02/10] dt-bindings: mtd: fixed-partitions: Move "compression" to partition node Rob Herring (Arm)
2026-01-09 8:58 ` Krzysztof Kozlowski
2026-01-09 11:31 ` Simon Glass
2026-01-08 17:53 ` [PATCH 03/10] dt-bindings: mtd: partitions: Move "sercomm,scpart-id" to partition.yaml Rob Herring (Arm)
2026-01-09 9:22 ` Krzysztof Kozlowski
2026-01-08 17:53 ` [PATCH 04/10] dt-bindings: mtd: partitions: Allow "nvmem-layout" in generic partition nodes Rob Herring (Arm)
2026-01-09 9:26 ` Krzysztof Kozlowski
2026-01-08 17:53 ` [PATCH 05/10] dt-bindings: mtd: partitions: Define "#{address,size}-cells" in specific schemas Rob Herring (Arm)
2026-01-09 9:31 ` Krzysztof Kozlowski
2026-01-12 15:50 ` Rob Herring
2026-01-08 17:53 ` [PATCH 06/10] dt-bindings: mtd: partitions: Drop partitions.yaml Rob Herring (Arm)
2026-01-09 9:34 ` Krzysztof Kozlowski
2026-01-12 22:57 ` Rob Herring
2026-01-08 17:53 ` [PATCH 07/10] dt-bindings: mtd: Ensure partition node properties are documented Rob Herring (Arm)
2026-01-09 9:02 ` Miquel Raynal
2026-01-10 0:34 ` Rob Herring
2026-01-14 13:58 ` Miquel Raynal [this message]
2026-01-14 17:47 ` Rob Herring
2026-01-09 9:36 ` Krzysztof Kozlowski
2026-01-10 0:25 ` Rob Herring
2026-01-11 9:45 ` Krzysztof Kozlowski
2026-01-08 17:53 ` [PATCH 08/10] dt-bindings: mtd: fixed-partitions: Restrict undefined properties Rob Herring (Arm)
2026-01-08 17:53 ` [PATCH 09/10] dt-bindings: mtd: partitions: Convert brcm,trx to DT schema Rob Herring (Arm)
2026-01-08 17:53 ` [PATCH 10/10] dt-bindings: mtd: partitions: Combine simple partition bindings Rob Herring (Arm)
2026-01-19 10:48 ` [PATCH 00/10] dt-bindings: mtd: Partition binding fixes and restructuring Miquel Raynal
2026-01-20 1:54 ` Rob Herring
2026-01-20 14:56 ` Miquel Raynal
2026-01-20 15:13 ` Krzysztof Kozlowski
2026-01-20 16:12 ` Rob Herring
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=87ms2gwb1w.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dsterba@suse.com \
--cc=hauke@hauke-m.de \
--cc=kdasu.kdev@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marcus.folkesson@gmail.com \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=sjg@chromium.org \
--cc=terrelln@fb.com \
--cc=tony@atomide.com \
--cc=ulf.hansson@linaro.org \
--cc=vigneshr@ti.com \
--cc=william.zhang@broadcom.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