From: akpm@linux-foundation.org
To: dtor@mail.ru
Cc: linux-input@vger.kernel.org, akpm@linux-foundation.org,
mroth@nessie.de, imre.deak@nokia.com
Subject: [patch 4/9] ads7846: pin change interrupt support
Date: Tue, 12 May 2009 13:43:06 -0700 [thread overview]
Message-ID: <200905122102.n4CL2MxJ006890@imap1.linux-foundation.org> (raw)
From: Michael Roth <mroth@nessie.de>
Some SoC supports 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>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/input/touchscreen/ads7846.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff -puN drivers/input/touchscreen/ads7846.c~ads7846-pin-change-interrupt-support drivers/input/touchscreen/ads7846.c
--- a/drivers/input/touchscreen/ads7846.c~ads7846-pin-change-interrupt-support
+++ a/drivers/input/touchscreen/ads7846.c
@@ -1143,9 +1143,15 @@ static int __devinit ads7846_probe(struc
if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING,
spi->dev.driver->name, ts)) {
- dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
- err = -EBUSY;
- goto err_free_gpio;
+ dev_info(&spi->dev,
+ "trying pin change workaround on irq %d\n", spi->irq);
+ if (request_irq(spi->irq, ads7846_irq,
+ IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+ spi->dev.driver->name, ts)) {
+ dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
+ err = -EBUSY;
+ goto err_free_gpio;
+ }
}
err = ads784x_hwmon_register(spi, ts);
_
reply other threads:[~2009-05-12 21:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200905122102.n4CL2MxJ006890@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dtor@mail.ru \
--cc=imre.deak@nokia.com \
--cc=linux-input@vger.kernel.org \
--cc=mroth@nessie.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).