All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] QT1070: change the trigger mode of QT1070
@ 2012-05-07  2:27 Bo Shen
  2012-05-07  7:04 ` Dmitry Torokhov
  2012-05-11  8:07 ` Josh Wu
  0 siblings, 2 replies; 15+ messages in thread
From: Bo Shen @ 2012-05-07  2:27 UTC (permalink / raw)
  To: dmitry.torokhov, javier.martin
  Cc: khali, w.sang, josh.wu, jm.lin, linux-input, Bo Shen

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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-05-14  7:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07  2:27 [RFC] QT1070: change the trigger mode of QT1070 Bo Shen
2012-05-07  7:04 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.