aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/stmpe.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-11-08 09:44:06 +0530
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-09 00:37:29 +0100
commit73de16db43f8dcb833ab032ed274b60b23676680 (patch)
tree235da8693adb626d93c59634c3543742d5c63907 /include/linux/mfd/stmpe.h
parent42ab84fb0a3db786567158bf0006a35131714eb5 (diff)
downloadkernel_goldelico_gta04-73de16db43f8dcb833ab032ed274b60b23676680.zip
kernel_goldelico_gta04-73de16db43f8dcb833ab032ed274b60b23676680.tar.gz
kernel_goldelico_gta04-73de16db43f8dcb833ab032ed274b60b23676680.tar.bz2
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 be1af7c..270d661 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -61,6 +61,7 @@ struct stmpe_variant_info;
* @variant: the detected STMPE model number
* @regs: list of addresses of registers which are at different addresses on
* different variants. Indexed by one of STMPE_IDX_*.
+ * @irq: irq number for stmpe
* @irq_base: starting IRQ number for internal IRQs
* @num_gpios: number of gpios, differs for variants
* @ier: cache of IER registers for bus_lock
@@ -76,6 +77,7 @@ struct stmpe {
struct stmpe_variant_info *variant;
const u8 *regs;
+ int irq;
int irq_base;
int num_gpios;
u8 ier[2];
@@ -183,6 +185,9 @@ struct stmpe_ts_platform_data {
* @autosleep_timeout: inactivity timeout in milliseconds for autosleep
* @irq_base: base IRQ number. %STMPE_NR_IRQS irqs will be used, or
* %STMPE_NR_INTERNAL_IRQS if the GPIO driver is not used.
+ * @irq_over_gpio: true if gpio is used to get irq
+ * @irq_gpio: gpio number over which irq will be requested (significant only if
+ * irq_over_gpio is true)
* @gpio: GPIO-specific platform data
* @keypad: keypad-specific platform data
* @ts: touchscreen-specific platform data
@@ -194,6 +199,8 @@ struct stmpe_platform_data {
unsigned int irq_trigger;
bool irq_invert_polarity;
bool autosleep;
+ bool irq_over_gpio;
+ int irq_gpio;
int autosleep_timeout;
struct stmpe_gpio_platform_data *gpio;