Thread (1 message) 1 message, 1 author, 2011-09-20

RE: [PATCH v2] dtc: Add support for named integer constants

From: Stephen Warren <hidden>
Date: 2011-09-20 17:02:18

Possibly related (same subject, not in this thread)

Jon Loeliger wrote at Tuesday, September 20, 2011 7:48 AM:
David Gibson wrote:
quoted
Things get trickier when we want to extend this to macros or
functions.  The only problem I have with your patch at present is that
I'd prefer not to implement a constant defining syntax, only to have
it obsoleted by whatever we do for macros or functions.
Exactly.
quoted
So, there are basically two approaches to macro or function support.

A) Functions
B) Macros
  B1) Use cpp itself
  B2) Make our own preprocessor, isomorphic to cpp
To be thorough, there has been one other macro proposal: Use m4.
Suggesting that, however, has had the entertaining side effect
of causing internet-wide vomiting.
quoted
Our current impasse is roughly that Jon prefers approach (A), whereas
I prefer (B1) on balance.  (B1) would obsolete your suggested define
syntax.  (A) and (B2) could both potentially subsume it, instead.
Right.
OK, that all makes sense.

However, it leaves me wondering what the next steps are; I was hoping to
get a quick and simple constant syntax into dtc that I could use for the
pinmux initialization patches I was working on, so the data tables there
would be integer-based for efficiency, yet named using constant names
instead of seemingly random numbers. It sounds like the dtc issue isn't
going to be resolved particularly quickly; should I just go back to using
strings in my pinmux patches? But that'd tie us to using strings forever
in order for the bindings to remain compatible...

-- 
nvpublic
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help