devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	MTD Maling List <linux-mtd@lists.infradead.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Frank Rowand <frowand.list@gmail.com>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: Add YAML schemas for the generic NAND options
Date: Thu, 11 Apr 2019 08:19:32 -0500	[thread overview]
Message-ID: <CAL_JsqKCky41zrGKNdwrj8i-fburCXx_D+NkZwESUasqNkbMeA@mail.gmail.com> (raw)
In-Reply-To: <20190403073551.ym7nbqwcdpicwo6e@flea>

On Wed, Apr 3, 2019 at 2:35 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> Hi Rob,
>
> On Tue, Apr 02, 2019 at 08:20:58PM -0500, Rob Herring wrote:
> > > +      nand-ecc-strength:
> > > +        $ref: /schemas/types.yaml#/definitions/uint32
> > > +        minimum: 1
> >
> > While I wished this worked, these 2 have to be under 'allOf'.
> > Unfortunately, this will also silently pass validation in json-schema.
>
> Unfortunately, I'm not sure I fully get how the ref system is supposed
> to work yet. Can you elaborate a bit on why we should put the ref and
> whatever constraint we have in an allOf?

TL;DR is that is how sub-classing or extending schemas works.

I think I read something at one point which explained why it doesn't
work without allOf, but couldn't find it. Certainly, it seems like it
should at first.

> Should we do the same in a separate schema that would reference
> another entire schema (like the second patch does with the first
> one)?

That would just split defining the type from the additional
constraints. I prefer to keep the top-level 'allOf' including classes
of devices.

Rob

      reply	other threads:[~2019-04-11 13:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 14:54 [PATCH v2 1/2] dt-bindings: mtd: Add YAML schemas for the generic NAND options Maxime Ripard
2019-04-02 14:54 ` [PATCH v2 2/2] dt-bindings: mtd: sunxi-nand: Add YAML schemas Maxime Ripard
2019-04-03  1:25   ` Rob Herring
2019-04-03  7:44     ` Maxime Ripard
2019-04-03  8:33       ` Rob Herring
2019-04-03  8:49         ` Maxime Ripard
2019-04-03  1:20 ` [PATCH v2 1/2] dt-bindings: mtd: Add YAML schemas for the generic NAND options Rob Herring
2019-04-03  7:35   ` Maxime Ripard
2019-04-11 13:19     ` Rob Herring [this message]

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=CAL_JsqKCky41zrGKNdwrj8i-fburCXx_D+NkZwESUasqNkbMeA@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=wens@csie.org \
    /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;
as well as URLs for NNTP newsgroup(s).