[PATCH v2 6/9] lpc2k: multifunction pin configuration

Ithamar R. Adema ithamar.adema at team-embedded.nl
Fri Mar 18 15:55:29 EDT 2011


Hi Kevin,

On Fri, 2011-03-18 at 18:42 +0100, Kevin Wells wrote:
[...]
> would be something like:
> #define PGPIO(x, y)	(((x) * 32) + (y))
> #define GPIO0_RD1		MFP_CFG(PGPIO(0, 0), AF1)
> #define GPIO33_ENET_TXD1	MFP_CFG(PGPIO(1, 1), AF1)

I've introduced an LPC2K_GPIO(port,pin) macro for that, and already use
it for the IRQs too. I like your suggestion!

However, since now we're not using explicit GPIO numbers anymore,
wouldn't you agree it would be better to make the above:

#define P0_0_RD1		MFP_CFG(LPC2K_GPIO(0, 0), AF1)

instead of still using the GPIOx prefix?

Regards,

Ithamar.





More information about the linux-arm-kernel mailing list