From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh@kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
Pratyush Yadav <p.yadav@ti.com>, Michael Walle <michael@walle.cc>,
linux-mtd@lists.infradead.org, Mark Brown <broonie@kernel.org>,
linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Michal Simek <monstr@monstr.eu>
Subject: Re: [PATCH v2 2/5] dt-bindings: mtd: spi-nor: Allow external properties
Date: Thu, 2 Dec 2021 08:25:21 +0100 [thread overview]
Message-ID: <20211202082521.77c2837f@xps13> (raw)
In-Reply-To: <YagN1c7/Ltt/mhNp@robh.at.kernel.org>
Hi Rob,
robh@kernel.org wrote on Wed, 1 Dec 2021 18:05:41 -0600:
> On Fri, Nov 26, 2021 at 05:34:47PM +0100, Miquel Raynal wrote:
> > Setting "additionalProperties: false" will refuse any generic SPI
> > property while they should be of course authorized. In practice it looks
> > like many people used compatibles different than "jedec,spi-nor" in
> > order to workaround this limitation because otherwise no SPI property
> > could be used in the examples. Use "unevaluatedProperties: false"
> > instead to allow defined properties to be used. It is likely that at the
> > time of the conversion to yaml of the jedec file, the unevaluated
> > keyword was not yet introduced.
> >
> > Fixes: 3ff9ee2a8890 ("dt-bindings: mtd: spi-nor: Convert to DT schema format")
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
> > index ed590d7c6e37..81be0620b264 100644
> > --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
> > @@ -88,7 +88,7 @@ patternProperties:
> > "^otp(-[0-9]+)?$":
> > type: object
> >
> > -additionalProperties: false
> > +unevaluatedProperties: false
>
> This has no effect unless you have referenced some other schema here.
> The series I referenced will solve what your trying to solve I think.
Maybe this is not the right fix indeed, but my understanding of json
reaches its bounds here.
Without this change, any example in this file that references a
spi-controller.yaml property (which is correctly defined) will throw an
error. The fact is, all the examples out there with a spi-nor flash
using the jedec,spi-nor compatible *cannot* contain any
spi-controller.yaml property, otherwise the tooling errors out. This is
a real issue.
I will give Pratyush's series a try.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh@kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
Pratyush Yadav <p.yadav@ti.com>, Michael Walle <michael@walle.cc>,
linux-mtd@lists.infradead.org, Mark Brown <broonie@kernel.org>,
linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Michal Simek <monstr@monstr.eu>
Subject: Re: [PATCH v2 2/5] dt-bindings: mtd: spi-nor: Allow external properties
Date: Thu, 2 Dec 2021 08:25:21 +0100 [thread overview]
Message-ID: <20211202082521.77c2837f@xps13> (raw)
In-Reply-To: <YagN1c7/Ltt/mhNp@robh.at.kernel.org>
Hi Rob,
robh@kernel.org wrote on Wed, 1 Dec 2021 18:05:41 -0600:
> On Fri, Nov 26, 2021 at 05:34:47PM +0100, Miquel Raynal wrote:
> > Setting "additionalProperties: false" will refuse any generic SPI
> > property while they should be of course authorized. In practice it looks
> > like many people used compatibles different than "jedec,spi-nor" in
> > order to workaround this limitation because otherwise no SPI property
> > could be used in the examples. Use "unevaluatedProperties: false"
> > instead to allow defined properties to be used. It is likely that at the
> > time of the conversion to yaml of the jedec file, the unevaluated
> > keyword was not yet introduced.
> >
> > Fixes: 3ff9ee2a8890 ("dt-bindings: mtd: spi-nor: Convert to DT schema format")
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
> > index ed590d7c6e37..81be0620b264 100644
> > --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
> > @@ -88,7 +88,7 @@ patternProperties:
> > "^otp(-[0-9]+)?$":
> > type: object
> >
> > -additionalProperties: false
> > +unevaluatedProperties: false
>
> This has no effect unless you have referenced some other schema here.
> The series I referenced will solve what your trying to solve I think.
Maybe this is not the right fix indeed, but my understanding of json
reaches its bounds here.
Without this change, any example in this file that references a
spi-controller.yaml property (which is correctly defined) will throw an
error. The fact is, all the examples out there with a spi-nor flash
using the jedec,spi-nor compatible *cannot* contain any
spi-controller.yaml property, otherwise the tooling errors out. This is
a real issue.
I will give Pratyush's series a try.
Thanks,
Miquèl
next prev parent reply other threads:[~2021-12-02 7:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 16:34 [PATCH v2 0/5] Stacked/parallel memories bindings Miquel Raynal
2021-11-26 16:34 ` Miquel Raynal
2021-11-26 16:34 ` [PATCH v2 1/5] spi: dt-bindings: Allow describing flashes with two CS Miquel Raynal
2021-11-26 16:34 ` Miquel Raynal
2021-11-26 16:34 ` [PATCH v2 2/5] dt-bindings: mtd: spi-nor: Allow external properties Miquel Raynal
2021-11-26 16:34 ` Miquel Raynal
2021-12-02 0:05 ` Rob Herring
2021-12-02 0:05 ` Rob Herring
2021-12-02 7:25 ` Miquel Raynal [this message]
2021-12-02 7:25 ` Miquel Raynal
2021-12-02 15:51 ` Rob Herring
2021-12-02 15:51 ` Rob Herring
2021-11-26 16:34 ` [PATCH v2 3/5] dt-bindings: mtd: spi-nor: Allow two CS per device Miquel Raynal
2021-11-26 16:34 ` Miquel Raynal
2021-12-02 0:06 ` Rob Herring
2021-12-02 0:06 ` Rob Herring
2021-11-26 16:34 ` [PATCH v2 4/5] spi: dt-bindings: Describe stacked/parallel memories modes Miquel Raynal
2021-11-26 16:34 ` Miquel Raynal
2021-12-02 0:04 ` Rob Herring
2021-12-02 0:04 ` Rob Herring
2021-11-26 16:34 ` [PATCH v2 5/5] spi: dt-bindings: Add an example with two stacked flashes Miquel Raynal
2021-11-26 16:34 ` Miquel Raynal
2021-11-27 23:13 ` Rob Herring
2021-11-27 23:13 ` Rob Herring
2021-11-28 16:55 ` Rob Herring
2021-11-28 16:55 ` Rob Herring
2021-11-29 9:23 ` Miquel Raynal
2021-11-29 9:23 ` Miquel Raynal
2021-12-01 23:57 ` Rob Herring
2021-12-01 23:57 ` Rob Herring
2021-12-02 7:26 ` Miquel Raynal
2021-12-02 7:26 ` Miquel Raynal
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=20211202082521.77c2837f@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=michael@walle.cc \
--cc=monstr@monstr.eu \
--cc=p.yadav@ti.com \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.