[PATCH 05/14] ARM: at91: add pinctrl support

Richard Genoud richard.genoud at gmail.com
Tue Aug 28 02:51:44 EDT 2012


2012/8/28 Linus Walleij <linus.walleij at linaro.org>:
> I'm following it now I think, after some discussion here at the kernel summit
> I have come to the conclusion that the real problem with readability comes
> from a shortcoming in the device tree compiler, that it cannot handle
> macros and defines (no preprocessor) so it's currently hard to make
> it more readable.
Definitively, I've seen quite some hex (or dec) voodoo with comment
next to them like that:
fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */
linux,code = <102>; /* KEY_HOME */
linux,code = <158>; /* KEY_BACK */
fsl,pinmux-ids = <
		0x0180 /* MX28_PAD_GPMI_RDN__GPMI_RDN */
		0x0190 /* MX28_PAD_GPMI_WRN__GPMI_WRN */
		0x01c0 /* MX28_PAD_GPMI_RESETN__GPMI_RESETN */
		>;
Those bits of code are crying out "We want defines !"
(And even bitwise OR would be usefull, instead of having to choose
between hex voodoo and one bool for each bit in a register)

> But that's not the implementers fault so I'm OK with this looking like
> this for the moment.
>
> Yours,
> Linus Walleij

Best regards,
Richard.



More information about the linux-arm-kernel mailing list