[patch 1/1] iMX51: introduce MX51_GPIO_NR

Fabio Estevam festevam at gmail.com
Wed Nov 24 11:49:21 EST 2010


Hi Arnaud,

2010/11/22 Arnaud Patard <arnaud.patard at rtp-net.org>:
> Currently, to define a GPIO number, we're using something like :
>
> #define EFIKAMX_PCBID0         (2*32 + 16)
>
> to define GPIO 3 16.
>
> This is not really readable and it's error prone imho (note the 3 vs 2).
> So, I'm introducing a new macro to define this in a better way. Now, the
> code sample become :
>
> #define EFIKAMX_PCBID0         MX51_GPIO_NR(3, 16)

Can you rename the macro to MX5x_GPIO_NR instead of MX51_GPIO_NR?

This way we can also use this macro for MX53 and MX508 when they show
up in mainline.

Regards,

Fabio Estevam



More information about the linux-arm-kernel mailing list