summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2011-09-28 09:50:58 +0200
committerPaul Mundt <lethal@linux-sh.org>2011-10-28 08:03:52 +0200
commitad2a8e7ea4128af984a98537b1b9484722b6b4bb (patch)
treecf5030dda233a9182e78574356d1853652753aad /include
parentsh: modify the asm/sh_eth.h to linux/sh_eth.h in some boards (diff)
downloadlinux-ad2a8e7ea4128af984a98537b1b9484722b6b4bb.tar.xz
linux-ad2a8e7ea4128af984a98537b1b9484722b6b4bb.zip
sh: pfc: Add GPIO IRQ support
Add GPIO IRQ support to the shared PFC code in drivers/sh/pfc.c The enums pointed out by a certain GPIO will be matched against a table for IRQ to enum mappings. Only the shared PFC code is updated by this patch. SoC specific changes are also needed to allow platforms to make use of this feature. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sh_pfc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h
index 12f351991701..bc8c9208f7e2 100644
--- a/include/linux/sh_pfc.h
+++ b/include/linux/sh_pfc.h
@@ -61,6 +61,14 @@ struct pinmux_data_reg {
.reg = r, .reg_width = r_width, \
.enum_ids = (pinmux_enum_t [r_width]) \
+struct pinmux_irq {
+ int irq;
+ pinmux_enum_t *enum_ids;
+};
+
+#define PINMUX_IRQ(irq_nr, ids...) \
+ { .irq = irq_nr, .enum_ids = (pinmux_enum_t []) { ids, 0 } } \
+
struct pinmux_range {
pinmux_enum_t begin;
pinmux_enum_t end;
@@ -87,6 +95,9 @@ struct pinmux_info {
pinmux_enum_t *gpio_data;
unsigned int gpio_data_size;
+ struct pinmux_irq *gpio_irq;
+ unsigned int gpio_irq_size;
+
struct gpio_chip chip;
};