From: "jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Schemas for device trees
Date: Wed, 28 Mar 2012 10:55:15 -0400 [thread overview]
Message-ID: <CAKON4OyW00PUX3-50GrMSa0RhXLHZX3abjQmVHHiYPY2DCN=mw@mail.gmail.com> (raw)
I'm putting together a device tree for a new platform and when looking
at the other trees everything is kind of chaotic in regards to the
various subsystems.
Is the existing DT include mechanism powerful enough to describe
generic fragments? And we're just missing the core fragments for
generic SPI, MMC, audio, etc.
In the XML world you can make schemas that describe what is legally
allowed in an XML document. Device trees don't seem to any any kind of
schema mechanism describing what is and isn't legal to put in a tree.
Instead of recreating the entire world of schemas, has anyone looked
at using XML schemas to define what is a valid device tree and then
write a tool to validate the existing device trees?
A neat feature of XML schemas is the ability to include fragment
schemas. For example you'd have a base schema and then depending on
the core processor bring in schema fragments for mmc, audio, spi, etc.
I still can't figure out the right way to put audio into a device
tree.
Another example, the voltage-ranges attribute for a spi mmc slot.
voltage-ranges = <3200 3400>; I had to go look at the source code for
this attribute to determine what the legal ranges were. A validating
schema would contain the legal ranges.
Aren't the files in Documentation/devicetree/bindings really just
schemas written in English with no automated way of checking the DTS
files against them?
--
Jon Smirl
jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
next reply other threads:[~2012-03-28 14:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 14:55 jonsmirl-Re5JQEeQqe8AvxtiuMwx3w [this message]
[not found] ` <CAKON4OyW00PUX3-50GrMSa0RhXLHZX3abjQmVHHiYPY2DCN=mw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-28 23:02 ` Schemas for device trees Grant Likely
2012-03-29 2:17 ` jonsmirl-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <CAKON4OyuU_M_DEAoqs9tRrHZEDu6GfSt+Sm7-qY8na_VSB4iUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-30 1:59 ` jonsmirl-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <CAKON4OwTiH9gKY-_m8mz3M0Fn31LLOvG4Y7UNWO0HgJhRk5xrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-02 13:38 ` jonsmirl-Re5JQEeQqe8AvxtiuMwx3w
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='CAKON4OyW00PUX3-50GrMSa0RhXLHZX3abjQmVHHiYPY2DCN=mw@mail.gmail.com' \
--to=jonsmirl-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.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).