Skip to content

RFC ARM: use C pre-processor with dtc

Scott Wood linux-arm-kernel linux-devicetree 1 version New

Get series with b4
b4 am 1348601746.5565.18@snotra

Versions newest first

  1. v1 RFC Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] ARM: use C pre-processor with dtc
Quoted 8 lines · Mark Brown
Quoted 5 lines · Scott Wood

Do you have an example of where you'd actually benefit from this? I'd think most things could either be done reasonably well with what's built into DTC (see what we've done in arch/powerpc/boot/dts/fsl), or would need math expression support in DTC (or has that been added?).

Quoted 5 lines

The constant example is the magic numbers we need to embed into DTs for
things like interrupt modes, making them human readable would be a real
win.

Wasn't there a patch for named constant support in dtc a while back? Hmm:
https://lists.ozlabs.org/pipermail/devicetree-discuss/2012-January/011184.html

I'm not sure that going down the CPP path is better than the possibility of named constants having a different syntax from macros/functions. It would be one thing if someone were actively working on the latter, but this paralysis seems to be a case of the perfect being the enemy of the good.

-Scott