dtc symbolic constants - not in the preprocessor?

David Gibson david at gibson.dropbear.id.au
Thu Apr 19 22:15:43 EST 2012


On Tue, Apr 17, 2012 at 09:39:55PM -0700, Simon Glass wrote:
[snip]
> Perhaps, although maybe using /define/ for both is a bad idea.
> 
> Actually I was just thinking of dumping the data in. I like your
> suggestion in that thread about /defprop/ or /defdata/ instead
> actually - so these would just be blobs of data with no value and not
> suitable to use in expressions. In other words this feature would be
> separate from first class variables / symbols mentioned above which
> can be operated on. Perhaps a bit like strings in other languages -
> just a sequence of cells / bytes.

Blech.  Different kinds of define with not just different data types,
but different capabilities?  I hate it.  If we have language level
defines, they should just be an expression with any of the types that
an expression can have.  That should include at least integers,
strings and bytestrings, and might include node bodies as well (the
later types would need suitable operators and builtin functions to be
useful).

> The patch is available here, although the title is a misnomer now. It
> is just a modification of Stephen's patch mentioned above:
> 
> https://gerrit.chromium.org/gerrit/#change,19855
> 
> In any case I strongly support efforts to define support for symbolic
> constants, one way or another. Looking forward to the outcome!
> 
> Regards,
> Simon
> 

-- 
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


More information about the devicetree-discuss mailing list