]> git.karo-electronics.de Git - mv-sheeva.git/commit - arch/arm/mach-mx5/board-cpuimx51.c
iMX51: introduce IMX_GPIO_NR
authorArnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Fri, 26 Nov 2010 14:20:52 +0000 (15:20 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Fri, 3 Dec 2010 10:05:16 +0000 (11:05 +0100)
commit96886c4361f1ae3f6c775d7c9295e2d557101d0f
treef3101c9303ed759ab5660985291366619a8e8fd9
parentb99545cb59dc0a55507100a1335f4fd0ed521032
iMX51: introduce IMX_GPIO_NR

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         IMX_GPIO_NR(3, 16)

v2:
- move to gpio.h
- add parens & spaces
- switch to IMX_GPIO_NR instead of MX51_GPIO_NR

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Amit Kucheria <amit.kucheria@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Eric BĂ©nard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx5/board-cpuimx51.c
arch/arm/mach-mx5/board-cpuimx51sd.c
arch/arm/mach-mx5/board-mx51_babbage.c
arch/arm/mach-mx5/board-mx51_efikamx.c
arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
arch/arm/plat-mxc/include/mach/gpio.h