History

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]

Arnd Bergmann committed 14 years ago

Commit 4eef6cb1 parent 59ee93a3 files · +15 −9Browse files

Showing the changes to include/linux/input (1 of 3 files). Show all

Unified · Split

include/linux/input/eeti_ts.h+1−0
@@ -2,6 +2,7 @@ · 1 unmodified line
2#define LINUX_INPUT_EETI_TS_H2#define LINUX_INPUT_EETI_TS_H
3 3
4struct eeti_ts_platform_data {4struct eeti_ts_platform_data {
5 int irq_gpio;
5 unsigned int irq_active_high;6 unsigned int irq_active_high;
6};7};
7 8