提交 c57c0a2a 编写于 作者: M Michael Roth 提交者: Dmitry Torokhov

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: NMichael Roth <mroth@nessie.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 7e3f7375
...@@ -1150,9 +1150,15 @@ static int __devinit ads7846_probe(struct spi_device *spi) ...@@ -1150,9 +1150,15 @@ static int __devinit ads7846_probe(struct spi_device *spi)
if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING, if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING,
spi->dev.driver->name, ts)) { spi->dev.driver->name, ts)) {
dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); dev_info(&spi->dev,
err = -EBUSY; "trying pin change workaround on irq %d\n", spi->irq);
goto err_free_gpio; err = request_irq(spi->irq, ads7846_irq,
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
spi->dev.driver->name, ts);
if (err) {
dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
goto err_free_gpio;
}
} }
err = ads784x_hwmon_register(spi, ts); err = ads784x_hwmon_register(spi, ts);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册