devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>,
	Grant Likely <glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Jan Luebbe <jlu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Phil Elwell <phil-FnsA7b+Nu9XbIbC87yuRow@public.gmane.org>,
	Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Thomas Petazzoni
	<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Boris Brezillon
	<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Antoine Tenart
	<antoine.tenart-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Stephen Boyd
	<stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Devicetree Compiler
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v11 5/7] overlay: Documentation for the overlay sugar syntax
Date: Wed, 30 Nov 2016 11:39:00 +1100	[thread overview]
Message-ID: <20161130003900.GC19891@umbus> (raw)
In-Reply-To: <583DB09C.7060105-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2815 bytes --]

On Tue, Nov 29, 2016 at 08:45:16AM -0800, Frank Rowand wrote:
> On 11/28/16 21:10, David Gibson wrote:
> > On Mon, Nov 28, 2016 at 08:36:07PM -0800, Frank Rowand wrote:
> >> On 11/28/16 19:10, David Gibson wrote:
> >>> On Mon, Nov 28, 2016 at 06:05:39PM +0200, Pantelis Antoniou wrote:
> >>>> There exists a syntactic sugar version of overlays which
> >>>> make them simpler to write for the trivial case of a single target.
> >>
> >> It also works for multiple targets.  (See the example I provided in
> >> my comment to v10.)
> >>
> >>
> >>>>
> >>>> Document it in the device tree object internals.
> >>>>
> >>>> Signed-off-by: Pantelis Antoniou <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
> >>>
> >>> I'm with Frank that I think this, rather than being regarded mere
> >>> syntactic sugar, should be considered the primary way of describing
> >>> overlays.
> >>>
> >>> Obviously we need to support the fully written out version as well.
> >>
> >> If we need to support the fully written out version, can we make that
> >> a discouraged, non-preferred method?  Maybe require an option to
> >> enable compiling this style of dts?
> > 
> > Yeah.  To avoid further proliferation of options, I'm thinking a
> > single "backwards compat" option which would:
> > 	- Use the dtb magic instead of dtb magic
> > 	- Disable checks which would reject explicit creation of
> > 	  __overlay__ / __symbols__ / __fixups__ nodes
> > 	- Anything other special behaviour we need
> > 	
> >> I can imagine some reasons to support the fully written out version,
> >> but can we document what those reasons are?
> > 
> > I believe the main one is the dts files in this format out in the
> > field.  Mind you, I guess we're already requiring them to tweak how
> > they declare the /plugin/ option.
> 
> It might be easy to write a program that transforms the expanded
> format to the simple format.  I'll try to make some time to see
> how difficult it is.  The transformation is relatively easy to
> do manually, but I don't know how many dts files would need to
> be converted.

It's not totally trivial, because such a program would basically need
a full dts parser.  But.. if we change the dtc internals to work with
a list of overlays rather than a single tree, there's a relatively
obvious path to it: we can implement parsing a dtbo input into a set
of fragments rather than an assembled overlay and dts output in
fragment form.  Then converting from old-dts to dtb and back to dts
would pretty much do what's needed.  At the cost of losing comments,
though :/.

-- 
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: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-11-30  0:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 16:05 [PATCH v11 0/4] dtc: Dynamic DT support Pantelis Antoniou
     [not found] ` <1480349141-14145-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-11-28 16:05   ` [PATCH v11 1/7] dtc: Document the dynamic plugin internals Pantelis Antoniou
2016-11-28 16:05   ` [PATCH v11 2/7] dtc: Plugin and fixup support Pantelis Antoniou
     [not found]     ` <1480349141-14145-3-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-11-29  2:38       ` David Gibson
2016-11-28 16:05   ` [PATCH v11 3/7] tests: Add check_path test Pantelis Antoniou
     [not found]     ` <1480349141-14145-4-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-11-29  2:40       ` David Gibson
2016-11-28 16:05   ` [PATCH v11 4/7] tests: Add overlay tests Pantelis Antoniou
     [not found]     ` <1480349141-14145-5-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-11-29  3:08       ` David Gibson
     [not found]         ` <20161129030807.GH13307-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2016-11-29 11:11           ` Pantelis Antoniou
     [not found]             ` <17F182F7-CDF7-4052-86C2-B40505706ED4-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-11-30  0:35               ` David Gibson
2016-11-30  9:04                 ` Pantelis Antoniou
2016-11-28 16:05   ` [PATCH v11 5/7] overlay: Documentation for the overlay sugar syntax Pantelis Antoniou
     [not found]     ` <1480349141-14145-6-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-11-29  3:10       ` David Gibson
     [not found]         ` <20161129031054.GI13307-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2016-11-29  4:36           ` Frank Rowand
     [not found]             ` <583D05B7.4040109-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-29  5:10               ` David Gibson
     [not found]                 ` <20161129051042.GO13307-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2016-11-29 16:45                   ` Frank Rowand
     [not found]                     ` <583DB09C.7060105-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-30  0:39                       ` David Gibson [this message]
2016-11-30  9:07                         ` Pantelis Antoniou
2016-11-28 16:05   ` [PATCH v11 6/7] overlay: Add syntactic sugar version of overlays Pantelis Antoniou
2016-11-28 16:05   ` [PATCH v11 7/7] tests: Add a test for overlays syntactic sugar Pantelis Antoniou

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=20161130003900.GC19891@umbus \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=antoine.tenart-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=jdl-CYoMK+44s/E@public.gmane.org \
    --cc=jlu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=phil-FnsA7b+Nu9XbIbC87yuRow@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@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).