From: "jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: Schemas for device trees
Date: Thu, 29 Mar 2012 21:59:22 -0400 [thread overview]
Message-ID: <CAKON4OwTiH9gKY-_m8mz3M0Fn31LLOvG4Y7UNWO0HgJhRk5xrA@mail.gmail.com> (raw)
In-Reply-To: <CAKON4OyuU_M_DEAoqs9tRrHZEDu6GfSt+Sm7-qY8na_VSB4iUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
i2c provides an example of where a schema would be useful.
>From the binding text files, I removed the common items
fsl-i2c
i2c@1740 {
clock-frequency = <100000>;
fsl,timeout = <10000>;
};
samsung-i2c
i2c@13870000 {
samsung,i2c-sda-delay = <100>;
samsung,i2c-max-bus-freq = <100000>;
samsung,i2c-slave-addr = <0>;
};
ce4100-i2c.txt
i2c@0 {
missing clock-frequency
};
omap-i2c.txt
i2c1: i2c@0 {
ti,hwmods = "i2c1"; -- I think this is because they are missing reg = <>
clock-frequency = <400000>;
};
arm-versatile.txt
missing clock frequency
i2c-designware.txt
looks ok
fsl-imx-i2c.txt
looks ok
cpm_qe/cpm/i2c.txt
file is in wrong place
The schema probably should be:
i2c@address {
compatible = "xxxx"; - required
reg = <xxxx>; - required
interrupts = <xxx>; - required?
interrupt-parent = <xxxx>; - if need
clock-frequency = <xxxx>; - optional, schema says default is 100Khz
slave-addr = <xxxx>; - optional, all of the controllers support slave mode
timeout = <xxxxx>; - optional
#address-cells = <1>;
#size-cells = <0>;
aaaa,bbbb = <xxxx> - private, must have a comma in the name
}
Once schemas are in place and everything is validating, another pass
can be made to implement a common parser. The common parser would get
all of these attributes and parse them into a struct. Then we can
work on making sure each driver actually implements these core
attributes consistently.
--
Jon Smirl
jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
next prev parent reply other threads:[~2012-03-30 1:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
[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=CAKON4OwTiH9gKY-_m8mz3M0Fn31LLOvG4Y7UNWO0HgJhRk5xrA@mail.gmail.com \
--to=jonsmirl-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@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).