Merge branch 'common/fbdev' of master.kernel.org:/pub/scm/linux/kernel/git/lethal...
[sfrench/cifs-2.6.git] / arch / arm / plat-mxc / include / mach / gpio.h
index 0044e2f1bea8211daa84d10090d5a41aacb80f09..a2747f12813eb5fe6e9e9b743bad5f7522406315 100644 (file)
@@ -46,6 +46,21 @@ struct mxc_gpio_port {
        spinlock_t lock;
 };
 
+#define DEFINE_IMX_GPIO_PORT_IRQ_HIGH(soc, _id, _hwid, _irq, _irq_high)        \
+       {                                                               \
+               .chip.label = "gpio-" #_id,                             \
+               .irq = _irq,                                            \
+               .irq_high = _irq_high,                                  \
+               .base = soc ## _IO_ADDRESS(                             \
+                               soc ## _GPIO ## _hwid ## _BASE_ADDR),   \
+               .virtual_irq_start = MXC_GPIO_IRQ_START + (_id) * 32,   \
+       }
+
+#define DEFINE_IMX_GPIO_PORT_IRQ(soc, _id, _hwid, _irq)                        \
+       DEFINE_IMX_GPIO_PORT_IRQ_HIGH(soc, _id, _hwid, _irq, 0)
+#define DEFINE_IMX_GPIO_PORT(soc, _id, _hwid)                          \
+       DEFINE_IMX_GPIO_PORT_IRQ(soc, _id, _hwid, 0)
+
 int mxc_gpio_init(struct mxc_gpio_port*, int);
 
 #endif