From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Nikhil Devshatwar <nikhil.nd-l0cyMroinI0@public.gmane.org>
Cc: jdl-CYoMK+44s/E@public.gmane.org,
devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] dtc: parser: Add label while overriding nodes
Date: Thu, 29 Jan 2015 21:13:43 +1100 [thread overview]
Message-ID: <20150129101343.GD10150@voom.fritz.box> (raw)
In-Reply-To: <20150129100731.GC10150-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2193 bytes --]
On Thu, Jan 29, 2015 at 09:07:31PM +1100, David Gibson wrote:
> On Wed, Jan 28, 2015 at 08:20:11PM +0530, Nikhil Devshatwar wrote:
> > This patch changes the dtc grammar to allow following syntax
> >
> > i2cexp: &i2c2 {
> > ...
> > };
> >
> > Current device tree compiler allows to define multiple labels when defining
> > the device node the first time. Typically device nodes are defined in
> > DTSI files. Now these nodes can be overwritten for updating some of the
> > properties. Typically, device nodes are overridden in DTS files.
> >
> > When working with adapter boards, most of the time adapter board can fit to
> > multiple base boards. But depending on which base board it is connected to,
> > the devices on the adapter board would be children of different devices.
> >
> > e.g. On dra7-evm.dts, i2c2 is exported for expansion connector whereas
> > on dra72-evm.dts, i2c5 is exported for expansion connector.
> > This causes a problem when writing a generic device tree file for
> > the adapter board. Because, you cannot know whether all the devices on
> > adapter board are present on i2c or i2c5.
> >
> > The problem can be solved by adding a common label (e.g. i2cexp) in both
> > of the DTS files when overriding the device nodes for i2c2 or i2c5.
> > This way, generic adapter board file would override the i2cexp. And
> > depending on which base board you use the adapter board, all the devices
> > are automatically added for correct device nodes.
> >
> > Signed-off-by: Nikhil Devshatwar <nikhil.nd-l0cyMroinI0@public.gmane.org>
>
> Hi, sorry I didn't get around to responding to your earlier posting of
> this.
>
> The concept is good, and the implementation looks fine.
>
> Only 2 things before I'm ready to merge:
> 1) It wants a testcase
> 2) I need to stare at the syntax for a while and convince myself
> it's as good as we can reasonably do.
..and.. #2 is now done. Give me a testcase, and I'll merge.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-01-29 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 14:50 [PATCH] dtc: parser: Add label while overriding nodes Nikhil Devshatwar
2015-01-29 10:07 ` David Gibson
[not found] ` <20150129100731.GC10150-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2015-01-29 10:13 ` David Gibson [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-01-08 14:12 Nikhil Devshatwar
2015-01-27 15:11 ` Devshatwar, Nikhil
[not found] ` <1420726362-22555-1-git-send-email-nikhil.nd-l0cyMroinI0@public.gmane.org>
2015-01-27 23:34 ` Rob Herring
[not found] ` <CAL_Jsq+w7R=99qPc+YG_Bh1L-nMs1Gptjwo=KYTK5OX2HVVNpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-28 6:38 ` Devshatwar, Nikhil
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=20150129101343.GD10150@voom.fritz.box \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jdl-CYoMK+44s/E@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nikhil.nd-l0cyMroinI0@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).