devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Schemas for device trees
@ 2012-03-28 14:55 jonsmirl-Re5JQEeQqe8AvxtiuMwx3w
       [not found] ` <CAKON4OyW00PUX3-50GrMSa0RhXLHZX3abjQmVHHiYPY2DCN=mw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: jonsmirl-Re5JQEeQqe8AvxtiuMwx3w @ 2012-03-28 14:55 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-02 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-28 14:55 Schemas for device trees jonsmirl-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <CAKON4OyW00PUX3-50GrMSa0RhXLHZX3abjQmVHHiYPY2DCN=mw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-28 23:02   ` 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

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).