diff options
author | Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> | 2010-11-26 17:20:52 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-12-03 13:05:16 +0300 |
commit | 96886c4361f1ae3f6c775d7c9295e2d557101d0f (patch) | |
tree | f3101c9303ed759ab5660985291366619a8e8fd9 /arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | |
parent | b99545cb59dc0a55507100a1335f4fd0ed521032 (diff) | |
download | linux-96886c4361f1ae3f6c775d7c9295e2d557101d0f.tar.xz |
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_mbimxsd-baseboard.c')
-rw-r--r-- | arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c index 2751b11ead89..c6c232019bb7 100644 --- a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c @@ -70,8 +70,8 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { MX51_PAD_SD1_DATA3__SD1_DATA3, }; -#define GPIO_LED1 (2 * 32 + 30) -#define GPIO_SWITCH1 (2 * 32 + 31) +#define GPIO_LED1 IMX_GPIO_NR(3, 30) +#define GPIO_SWITCH1 IMX_GPIO_NR(3, 31) static struct gpio_led eukrea_mbimxsd_leds[] = { { |