From: Bo Shen <voice.shen@atmel.com>
To: dmitry.torokhov@gmail.com, javier.martin@vista-silicon.com
Cc: khali@linux-fr.org, w.sang@pengutronix.de, josh.wu@atmel.com,
jm.lin@atmel.com, linux-input@vger.kernel.org,
Bo Shen <voice.shen@atmel.com>
Subject: [RFC] QT1070: change the trigger mode of QT1070
Date: Mon, 7 May 2012 10:27:33 +0800 [thread overview]
Message-ID: <1336357653-18663-1-git-send-email-voice.shen@atmel.com> (raw)
The default trigger mode of QT1070 is IRQF_TRIGGER_LOW,
Using TRQF_TRIGGER_FALLING to replace IRQF_TRIGGER_LOW | IRQF_ONESHOT.
Add a workaround for some SOC which can not distinguish the falling
and rising change on I/O lines.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
drivers/input/keyboard/qt1070.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/qt1070.c b/drivers/input/keyboard/qt1070.c
index 0b7b2f8..1855e3d 100644
--- a/drivers/input/keyboard/qt1070.c
+++ b/drivers/input/keyboard/qt1070.c
@@ -201,10 +201,17 @@ static int __devinit qt1070_probe(struct i2c_client *client,
msleep(QT1070_RESET_TIME);
err = request_threaded_irq(client->irq, NULL, qt1070_interrupt,
- IRQF_TRIGGER_NONE, client->dev.driver->name, data);
+ IRQF_TRIGGER_FALLING, client->dev.driver->name, data);
if (err) {
- dev_err(&client->dev, "fail to request irq\n");
- goto err_free_mem;
+ /* This is a workaround for some SOC which can not distinguish
+ * falling and rising change on I/O lines.
+ */
+ err = request_threaded_irq(client->irq, NULL, qt1070_interrupt,
+ IRQF_TRIGGER_NONE, client->dev.driver->name, data);
+ if (err) {
+ dev_err(&client->dev, "fail to request irq\n");
+ goto err_free_mem;
+ }
}
/* Register the input device */
--
1.7.10
next reply other threads:[~2012-05-07 2:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 2:27 Bo Shen [this message]
2012-05-07 7:04 ` [RFC] QT1070: change the trigger mode of QT1070 Dmitry Torokhov
2012-05-07 7:09 ` javier Martin
2012-05-08 7:45 ` Shen, Voice
2012-05-11 8:28 ` Josh Wu
2012-05-11 9:13 ` javier Martin
2012-05-11 11:33 ` Josh Wu
2012-05-11 12:47 ` javier Martin
2012-05-14 2:57 ` Bo Shen
2012-05-14 6:59 ` javier Martin
2012-05-14 7:21 ` javier Martin
2012-05-11 16:06 ` Dmitry Torokhov
2012-05-11 16:08 ` Dmitry Torokhov
2012-05-14 2:54 ` Bo Shen
2012-05-11 8:07 ` Josh Wu
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=1336357653-18663-1-git-send-email-voice.shen@atmel.com \
--to=voice.shen@atmel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=javier.martin@vista-silicon.com \
--cc=jm.lin@atmel.com \
--cc=josh.wu@atmel.com \
--cc=khali@linux-fr.org \
--cc=linux-input@vger.kernel.org \
--cc=w.sang@pengutronix.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).