Commit 1dfa86bb authored by Shawn Guo's avatar Shawn Guo Committed by Sascha Hauer

arm/mxc: move IMX_GPIO_NR into mach/hardware.h

The patch moves IMX_GPIO_NR into mach/hardware.h, so that we only
use standard gpiolib helpers in mach/gpio.h.
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent a4395612
......@@ -23,11 +23,6 @@
#include <mach/hardware.h>
#include <asm-generic/gpio.h>
/* There's a off-by-one betweem the gpio bank number and the gpiochip */
/* range e.g. GPIO_1_5 is gpio 5 under linux */
#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))
/* use gpiolib dispatchers */
#define gpio_get_value __gpio_get_value
#define gpio_set_value __gpio_set_value
......
......@@ -116,6 +116,10 @@
.type = _type, \
}
/* There's a off-by-one betweem the gpio bank number and the gpiochip */
/* range e.g. GPIO_1_5 is gpio 5 under linux */
#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))
#define IMX_GPIO_TO_IRQ(gpio) (MXC_GPIO_IRQ_START + (gpio))
#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment