summaryrefslogtreecommitdiff
path: root/include/linux/input
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-04-30 20:21:37 +0400
committerArnd Bergmann <arnd@arndb.de>2012-08-09 17:16:41 +0400
commit4eef6cbfcc03b294d9d334368a851b35b496ce53 (patch)
tree65168d2471521362a2d562ee651e2283eb71c820 /include/linux/input
parent59ee93a528b94ef4e81a08db252b0326feff171f (diff)
downloadlinux-4eef6cbfcc03b294d9d334368a851b35b496ce53.tar.xz
Input: eeti_ts: pass gpio value instead of IRQ
The EETI touchscreen asserts its IRQ line as soon as it has data in its internal buffers. The line is automatically deasserted once all data has been read via I2C. Hence, the driver has to monitor the GPIO line and cannot simply rely on the interrupt handler reception. In the current implementation of the driver, irq_to_gpio() is used to determine the GPIO number from the i2c_client's IRQ value. As irq_to_gpio() is not available on all platforms, this patch changes this and makes the driver ignore the passed in IRQ. Instead, a GPIO is added to the platform_data struct and gpio_to_irq is used to derive the IRQ from that GPIO. If this fails, bail out. The driver is only able to work in environments where the touchscreen GPIO can be mapped to an IRQ. Without this patch, building raumfeld_defconfig results in: drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active': drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration] Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: stable@vger.kernel.org (v3.2+) Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Sven Neumann <s.neumann@raumfeld.com> Cc: linux-input@vger.kernel.org Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Diffstat (limited to 'include/linux/input')
-rw-r--r--include/linux/input/eeti_ts.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
index f875b316249d..16625d799b6f 100644
--- a/include/linux/input/eeti_ts.h
+++ b/include/linux/input/eeti_ts.h
@@ -2,6 +2,7 @@
#define LINUX_INPUT_EETI_TS_H
struct eeti_ts_platform_data {
+ int irq_gpio;
unsigned int irq_active_high;
};