Re: Overlay syntactic sugar clarification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux