aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mxs/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-mxs/include/mach/mxs.h2
-rw-r--r--drivers/gpio/gpio-mxs.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-mxs/include/mach/gpio.h b/arch/arm/mach-mxs/include/mach/gpio.h
index 828ccccb6aad..0a95d58b13f6 100644
--- a/arch/arm/mach-mxs/include/mach/gpio.h
+++ b/arch/arm/mach-mxs/include/mach/gpio.h
@@ -30,6 +30,4 @@
30#define gpio_cansleep __gpio_cansleep 30#define gpio_cansleep __gpio_cansleep
31#define gpio_to_irq __gpio_to_irq 31#define gpio_to_irq __gpio_to_irq
32 32
33#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
34
35#endif /* __MACH_MXS_GPIO_H__ */ 33#endif /* __MACH_MXS_GPIO_H__ */
diff --git a/arch/arm/mach-mxs/include/mach/mxs.h b/arch/arm/mach-mxs/include/mach/mxs.h
index 35a89dd27242..5aa5f754c846 100644
--- a/arch/arm/mach-mxs/include/mach/mxs.h
+++ b/arch/arm/mach-mxs/include/mach/mxs.h
@@ -86,6 +86,8 @@
86 .type = _type, \ 86 .type = _type, \
87} 87}
88 88
89#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
90
89#define MXS_SET_ADDR 0x4 91#define MXS_SET_ADDR 0x4
90#define MXS_CLR_ADDR 0x8 92#define MXS_CLR_ADDR 0x8
91#define MXS_TOG_ADDR 0xc 93#define MXS_TOG_ADDR 0xc
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index af55a8577c2e..292b50481db9 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -49,6 +49,8 @@
49#define GPIO_INT_LEV_MASK (1 << 0) 49#define GPIO_INT_LEV_MASK (1 << 0)
50#define GPIO_INT_POL_MASK (1 << 1) 50#define GPIO_INT_POL_MASK (1 << 1)
51 51
52#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
53
52struct mxs_gpio_port { 54struct mxs_gpio_port {
53 void __iomem *base; 55 void __iomem *base;
54 int id; 56 int id;