aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/stmpe.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-11-07 23:14:06 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-08 18:37:29 -0500
commit73de16db43f8dcb833ab032ed274b60b23676680 (patch)
tree235da8693adb626d93c59634c3543742d5c63907 /include/linux/mfd/stmpe.h
parent42ab84fb0a3db786567158bf0006a35131714eb5 (diff)
mfd: Add support for irq over gpio pin to stmpe
On many boards, stmpe is present as an separate device (not as part of SoC). Here gpio lines are mostly used for getting interrupts. This patch adds in support to handle irq over gpio pin. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/stmpe.h')
-rw-r--r--include/linux/mfd/stmpe.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
index be1af7c42e57..270d6613aadf 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -61,6 +61,7 @@ struct stmpe_variant_info;
61 * @variant: the detected STMPE model number 61 * @variant: the detected STMPE model number
62 * @regs: list of addresses of registers which are at different addresses on 62 * @regs: list of addresses of registers which are at different addresses on
63 * different variants. Indexed by one of STMPE_IDX_*. 63 * different variants. Indexed by one of STMPE_IDX_*.
64 * @irq: irq number for stmpe
64 * @irq_base: starting IRQ number for internal IRQs 65 * @irq_base: starting IRQ number for internal IRQs
65 * @num_gpios: number of gpios, differs for variants 66 * @num_gpios: number of gpios, differs for variants
66 * @ier: cache of IER registers for bus_lock 67 * @ier: cache of IER registers for bus_lock
@@ -76,6 +77,7 @@ struct stmpe {
76 struct stmpe_variant_info *variant; 77 struct stmpe_variant_info *variant;
77 const u8 *regs; 78 const u8 *regs;
78 79
80 int irq;
79 int irq_base; 81 int irq_base;
80 int num_gpios; 82 int num_gpios;
81 u8 ier[2]; 83 u8 ier[2];
@@ -183,6 +185,9 @@ struct stmpe_ts_platform_data {
183 * @autosleep_timeout: inactivity timeout in milliseconds for autosleep 185 * @autosleep_timeout: inactivity timeout in milliseconds for autosleep
184 * @irq_base: base IRQ number. %STMPE_NR_IRQS irqs will be used, or 186 * @irq_base: base IRQ number. %STMPE_NR_IRQS irqs will be used, or
185 * %STMPE_NR_INTERNAL_IRQS if the GPIO driver is not used. 187 * %STMPE_NR_INTERNAL_IRQS if the GPIO driver is not used.
188 * @irq_over_gpio: true if gpio is used to get irq
189 * @irq_gpio: gpio number over which irq will be requested (significant only if
190 * irq_over_gpio is true)
186 * @gpio: GPIO-specific platform data 191 * @gpio: GPIO-specific platform data
187 * @keypad: keypad-specific platform data 192 * @keypad: keypad-specific platform data
188 * @ts: touchscreen-specific platform data 193 * @ts: touchscreen-specific platform data
@@ -194,6 +199,8 @@ struct stmpe_platform_data {
194 unsigned int irq_trigger; 199 unsigned int irq_trigger;
195 bool irq_invert_polarity; 200 bool irq_invert_polarity;
196 bool autosleep; 201 bool autosleep;
202 bool irq_over_gpio;
203 int irq_gpio;
197 int autosleep_timeout; 204 int autosleep_timeout;
198 205
199 struct stmpe_gpio_platform_data *gpio; 206 struct stmpe_gpio_platform_data *gpio;