Hi Florian,

This is very cool.. :-)

On Fri, May 31, 2013 at 7:42 AM, Florian Vaussard
<[email protected]>wrote:

> Using constants for pinctrl allows a better readability, and removes
> redundancy with comments.
>
> Signed-off-by: Florian Vaussard <[email protected]>
> ---
>  arch/arm/boot/dts/am335x-bone.dts  |   18 +++++++++---------
>  arch/arm/boot/dts/am335x-evm.dts   |   28 ++++++++++++++--------------
>  arch/arm/boot/dts/am335x-evmsk.dts |   26 +++++++++++++-------------
>  arch/arm/boot/dts/am33xx.dtsi      |    1 +
>  4 files changed, 37 insertions(+), 36 deletions(-)
>
> diff --git a/arch/arm/boot/dts/am335x-bone.dts
> b/arch/arm/boot/dts/am335x-bone.dts
> index 5bfb7dd..61d0793 100644
> --- a/arch/arm/boot/dts/am335x-bone.dts
> +++ b/arch/arm/boot/dts/am335x-bone.dts
> @@ -30,30 +30,30 @@
>
>                 user_leds_s0: user_leds_s0 {
>                         pinctrl-single,pins = <
> -                               0x54 0x7        /* gpmc_a5.gpio1_21,
> OUTPUT | MODE7 */
> -                               0x58 0x17       /* gpmc_a6.gpio1_22,
> OUTPUT_PULLUP | MODE7 */
> -                               0x5c 0x7        /* gpmc_a7.gpio1_23,
> OUTPUT | MODE7 */
> -                               0x60 0x17       /* gpmc_a8.gpio1_24,
> OUTPUT_PULLUP | MODE7 */
> +                               0x54 (PIN_OUTPUT | MUX_MODE7)           /*
> gpmc_a5.gpio1_21 */
> +                               0x58 (PIN_OUTPUT | PULL_UP | MUX_MODE7) /*
> gpmc_a6.gpio1_22 */
> +                               0x5c (PIN_OUTPUT | MUX_MODE7)           /*
> gpmc_a7.gpio1_23 */
> +                               0x60 (PIN_OUTPUT | PULL_UP | MUX_MODE7) /*
> gpmc_a8.gpio1_24 */
>
>
Does it make sense to also replace the pinmux offets with constants?
Removal of the comment would mean looking at the DTS one still has to go
back to the TRM to figure out what is the name for a particular offset.

Thanks,
Joel
_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to