diff options
author | Michael Roth <mroth@nessie.de> | 2009-06-11 02:30:55 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-06-11 05:07:25 -0400 |
commit | c57c0a2a0d019aa8108f1155f99098ea7e7e1ab3 (patch) | |
tree | 8d0eba178a8f79616908af014124f6dc6447535d /drivers | |
parent | 7e3f73754e489e8c7742eaba15b608757b5bbb28 (diff) |
Input: ads7846 - pin change interrupt support
Some SoCs support only pin change interrupts on GPIO pins used as irq
lines.
The ads7846 core is not affected from the additional irqs on the rising
edge because the code accounts touch bounce anyway by kicking in a timer
and disabling the irq after the first request and reenabling the irq after
a timeout when there is no longer pen down detected.
Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 90f792c17ab3..ba9d38c3f412 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -1150,9 +1150,15 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
1150 | 1150 | ||
1151 | if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING, | 1151 | if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING, |
1152 | spi->dev.driver->name, ts)) { | 1152 | spi->dev.driver->name, ts)) { |
1153 | dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); | 1153 | dev_info(&spi->dev, |
1154 | err = -EBUSY; | 1154 | "trying pin change workaround on irq %d\n", spi->irq); |
1155 | goto err_free_gpio; | 1155 | err = request_irq(spi->irq, ads7846_irq, |
1156 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | ||
1157 | spi->dev.driver->name, ts); | ||
1158 | if (err) { | ||
1159 | dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); | ||
1160 | goto err_free_gpio; | ||
1161 | } | ||
1156 | } | 1162 | } |
1157 | 1163 | ||
1158 | err = ads784x_hwmon_register(spi, ts); | 1164 | err = ads784x_hwmon_register(spi, ts); |