linux-imx/include/linux/input
Arnd Bergmann 85f303b44b Input: eeti_ts: pass gpio value instead of IRQ
commit 4eef6cbfcc upstream.

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: 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>
[bwh: Backported to 3.2: raumfeld_controller_i2c_board_info.irq was
 initialised using gpio_to_irq(), but this doesn't seem to matter]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2012-08-19 18:15:34 +01:00
..
ad714x.h Input: ad714x - allow platform code to specify irqflags 2011-05-16 23:20:13 -07:00
adp5589.h Input: adp5589-keys - add support for the ADP5585 derivatives 2011-10-18 21:26:55 -07:00
adxl34x.h Input: adxl34x - documentation cleanup 2011-09-20 22:46:32 -07:00
as5011.h Input: add Austria Microsystem AS5011 joystick driver 2011-01-10 11:01:43 -08:00
bu21013.h Input: bu21013_ts - remove duplicate resolution parameters 2011-01-17 20:49:12 -08:00
cma3000.h Input: add CMA3000 accelerometer driver 2010-11-30 23:05:21 -08:00
cy8ctmg110_pdata.h Input: cy8ctmg110 - capacitive touchscreen support 2010-07-31 02:37:17 -07:00
eeti_ts.h Input: eeti_ts: pass gpio value instead of IRQ 2012-08-19 18:15:34 +01:00
kxtj9.h Input: add support for Kionix KXTJ9 accelerometer 2011-07-06 21:23:54 -07:00
matrix_keypad.h Merge branch 'next' into for-linus 2011-03-18 23:38:50 -07:00
mt.h Input: estimate number of events per packet 2011-04-18 10:15:43 -07:00
pmic8xxx-keypad.h input: Add Qualcomm pm8xxx keypad controller driver 2011-05-26 19:45:53 +02:00
pmic8xxx-pwrkey.h input: Add support for Qualcomm PMIC8XXX power key 2011-05-26 19:45:54 +02:00
sh_keysc.h Input: sh_keysc - 8x8 MODE_6 fix 2011-06-18 02:55:01 -07:00
sparse-keymap.h Input: add generic support for sparse keymaps 2009-12-07 09:26:35 -08:00
tps6507x-ts.h input: Touchscreen driver for TPS6507x 2010-05-28 01:37:38 +02:00