From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Kyle Evans <kevans-h+KGxgPPiopAfugRpC6u6w@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Overlay syntactic sugar clarification
Date: Wed, 10 Jan 2018 19:43:49 +1100 [thread overview]
Message-ID: <20180110084349.GH19773@umbus.fritz.box> (raw)
In-Reply-To: <CACNAnaFASS-1dC4Vp7JbwEjtF0vbAxOP248AtPabPLhZ_MHVoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]
On Mon, Jan 08, 2018 at 11:36:57PM -0600, Kyle Evans wrote:
> Hello!
>
> I see the syntactic sugar patch was merged in late September this
> year. I have some resulting questions:
>
> 1.) Are there plans to deprecate the handcrafted fragment syntax? I
> find it somewhat useful for hacking things into /soc (via target-path)
> for development since this node is often not labelled, so it's
> probably a good idea to ask this up front. =)
Hrm, I'd say we plan to "deprecate" in the sense of it not being the
encouraged method. It's not really possible to actually remove
support, since the overlay format is just a special form of a dtb.
> 2.) Is it expected and/or OK that the output/behavior of this dtc(1)
> gets kind of funky when combining handcrafted fragments with these
> generated fragments?
>
> "funky" ranges from outright errors to silently merging a handcrafted
> fragment into a generated fragment in a way that yields an overlay
> that you're definitely not expecting. If this isn't a supported
> use-case, then I suppose this is OK.
Hm. So, I don't think we need to particularly accomodate mixed forms.
But then, making it possible for the user to reason about what's going
to happen even it odd circumstances is always better as much as
possible.
> I ask because I recently implemented this syntax into our BSDL dtc,
> and naturally in my work I had it generate fragments for these nodes,
> merge them all into one /, and renumber any handcrafted fragments
> based on their position and the "fragment delta" (highest generated
> auto-fragment at that point).
The only reason I can see to use handcrafted fragments is to have
great control over what's there. Renumbering hand written fragments
seems to go against that.
Allocating generated fragments to avoid handcrafted ones, or simply
erroring sounds like a better idea.
> The reasoning being that there's likely no good way to merge a manual
> fragment with one of these auto-fragments, and with our implementation
> is was almost easier to do this than it is to just discard the
> handcrafted if we start out with the sugary versions.
>
> Thanks,
>
> Kyle Evans
--
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: 833 bytes --]
prev parent reply other threads:[~2018-01-10 8:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 5:36 Overlay syntactic sugar clarification Kyle Evans
[not found] ` <CACNAnaFASS-1dC4Vp7JbwEjtF0vbAxOP248AtPabPLhZ_MHVoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-09 16:50 ` Kyle Evans
2018-01-10 8:43 ` David Gibson [this message]
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=20180110084349.GH19773@umbus.fritz.box \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kevans-h+KGxgPPiopAfugRpC6u6w@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).