[PATCH 4/4] ARM: dts: AM33XX: Use pinctrl constants

Joel A Fernandes agnel.joel at gmail.com
Mon Jun 3 03:43:23 EST 2013


Hi Florian,

This is very cool.. :-)

On Fri, May 31, 2013 at 7:42 AM, Florian Vaussard
<florian.vaussard at epfl.ch>wrote:

> Using constants for pinctrl allows a better readability, and removes
> redundancy with comments.
>
> Signed-off-by: Florian Vaussard <florian.vaussard at epfl.ch>
> ---
>  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20130602/2247666c/attachment.html>


More information about the devicetree-discuss mailing list