LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Rob Herring <robh@kernel.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	linux-clk <linux-clk@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: clock: Convert fixed-clock binding to json-schema
Date: Fri, 11 Jan 2019 17:09:58 -0600
Message-ID: <CABGGiswYYpm-7T9e6F_Mp6FdU-JFDC8xV_JR1E6cgiz32A0u_Q@mail.gmail.com> (raw)
In-Reply-To: <154724656826.169631.7419387360923471292@swboyd.mtv.corp.google.com>

On Fri, Jan 11, 2019 at 4:42 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Rob Herring (2019-01-11 12:49:04)
> > On Fri, Jan 11, 2019 at 12:54 PM Stephen Boyd <sboyd@kernel.org> wrote:
> > >
> > > Quoting Rob Herring (2019-01-11 10:27:48)
> > > > On Fri, Jan 11, 2019 at 11:44 AM Stephen Boyd <sboyd@kernel.org> wrote:
> > > > >
> > > > > Any pointer to the full schema?
> > > >
> > > > https://github.com/robherring/yaml-bindings/blob/master/schemas/
> > > >
> > > > And the clock schema in particular:
> > > > https://github.com/robherring/yaml-bindings/blob/master/schemas/clock.yaml
> > >
> > > Awesome. Thanks for the pointers! Is the clock schema posted to the list
> > > somewhere?
> >
> > No. Happy to post things, but I'm struggling to find anyone that cares.
>
> Ok. I can review that document too if you post it to the list.
>
> >
> > > > > Why does title have a full stop?
> > > >
> > > > Because it was there in the original. My script to extract just takes
> > > > the first line of alphanumeric text.
> > >
> > > Ok. I think it would be good to treat them like commit subjects that
> > > don't have the full stop either, so if the script is able to drop the
> > > full stop it would be great.
> >
> > I can just write a meta-schema to enforce that. :)
>
> Sounds good.
>
> >
> > Yes, the meta-schema enforces this at least to the extent there is a
> > meta-schema defined for a standard property. Even if not something for
> > a specific property, we limit things to a subset of json-schema
> > keywords. Also, you also can't define something contradicting a core
> > schema (e.g. { reg: { type: string } }), but that wouldn't be found
> > until you check actual DTs.
> >
> > The meta-schema check is run with:
> > make dt_binding_check
> >
> > This is all documented in Documentation/devicetree/writing-schema.md.
> >
>
> Ok I'll read that document now. Would be cool if the build robots (and
> myself) can somehow run the dt_binding_check on a single YAML file so we
> can quickly validate the binding. Maybe even make C=2 or C=1 do that?
>
> If the robots can then complain if the single file fails to build it
> will save us tons of time. I just tried to run it but it seems to only
> care about running on all the YAML files.

make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/file/to/test

It will check only the schema specified and check all the DT files
against only that schema (plus any referenced schema if you use a
top-level 'allOf'. See the GIC schema patch[2] for an example of
that).

I'm running the schema check for patches in the DT patchwork instance.
For example, here's this patch[1]. So as long as it has my R-by, then
it should be good. I'm not yet running the schema check on DT files
because generally there are warnings and I don't intend to fix them
for everyone. But maybe I should anyways so we at least have the data.

Rob

[1] https://patchwork.ozlabs.org/patch/1023240/
[2] https://patchwork.ozlabs.org/patch/1023243/

  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 22:19 Rob Herring
2019-01-11 17:44 ` Stephen Boyd
2019-01-11 18:27   ` Rob Herring
2019-01-11 18:54     ` Stephen Boyd
2019-01-11 20:49       ` Rob Herring
2019-01-11 22:42         ` Stephen Boyd
2019-01-11 23:09           ` Rob Herring [this message]
2019-01-24 22:50             ` Stephen Boyd

Reply instructions:

You may reply publically 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=CABGGiswYYpm-7T9e6F_Mp6FdU-JFDC8xV_JR1E6cgiz32A0u_Q@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox