aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
diff options
context:
space:
mode:
authorArnaud Patard (Rtp) <arnaud.patard@rtp-net.org>2010-11-26 09:20:52 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2010-12-03 05:05:16 -0500
commit96886c4361f1ae3f6c775d7c9295e2d557101d0f (patch)
treef3101c9303ed759ab5660985291366619a8e8fd9 /arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
parentb99545cb59dc0a55507100a1335f4fd0ed521032 (diff)
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>
Diffstat (limited to 'arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c')
-rw-r--r--arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
index b830967f4bec..94c293f217f7 100644
--- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
+++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
@@ -33,12 +33,12 @@
33#include "devices-imx51.h" 33#include "devices-imx51.h"
34#include "devices.h" 34#include "devices.h"
35 35
36#define MBIMX51_TSC2007_GPIO (2*32 + 30) 36#define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30)
37#define MBIMX51_TSC2007_IRQ (MXC_INTERNAL_IRQS + MBIMX51_TSC2007_GPIO) 37#define MBIMX51_TSC2007_IRQ (MXC_INTERNAL_IRQS + MBIMX51_TSC2007_GPIO)
38#define MBIMX51_LED0 (2*32 + 5) 38#define MBIMX51_LED0 IMX_GPIO_NR(3, 5)
39#define MBIMX51_LED1 (2*32 + 6) 39#define MBIMX51_LED1 IMX_GPIO_NR(3, 6)
40#define MBIMX51_LED2 (2*32 + 7) 40#define MBIMX51_LED2 IMX_GPIO_NR(3, 7)
41#define MBIMX51_LED3 (2*32 + 8) 41#define MBIMX51_LED3 IMX_GPIO_NR(3, 8)
42 42
43static struct gpio_led mbimx51_leds[] = { 43static struct gpio_led mbimx51_leds[] = {
44 { 44 {