Thread (1 message) 1 message, 1 author, 2012-09-25

Re: [RFC PATCH 0/3] ARM: use C pre-processor with dtc

From: Tony Lindgren <hidden>
Date: 2012-09-25 23:46:16
Also in: linux-arm-kernel

Possibly related (same subject, not in this thread)

* Stephen Warren [off-list ref] [120925 12:53]:
On 09/25/2012 01:35 PM, Scott Wood wrote:
quoted
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?).
Yes, support for basic integer math in cell values has indeed been
recently added to upstream dtc. I don't believe this has been ported
into the in-kernel dtc yet though.

The primary motivation here is probably naming constants and associated
readability. For example, instead of:

nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */

You could write:

nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO_PV1 0>;

No more opaque numbers!
This would be nice indeed.

Regards,

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