linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* qt1070: Why IRQF_TRIGGER_NONE?
@ 2012-05-02  8:35 javier Martin
  2012-05-03  1:41 ` Josh Wu
  0 siblings, 1 reply; 7+ messages in thread
From: javier Martin @ 2012-05-02  8:35 UTC (permalink / raw)
  To: linux-input; +Cc: Wolfram Sang, Jean Delvare, Axel Lin, Dmitry Torokhov

Hi,
I was testing qt1070 driver with my Visstrim SM10 board when I found
out IRQs where not triggered properly.

I had to come up with the following patch in order to solve it:

diff --git a/drivers/input/keyboard/qt1070.c b/drivers/input/keyboard/qt1070.c
index 0b7b2f8..e8b6ae3 100644
--- a/drivers/input/keyboard/qt1070.c
+++ b/drivers/input/keyboard/qt1070.c
@@ -201,7 +201,7 @@ 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;


According to the datasheet (p10)  "The CHANGE line is active low and
signals when there is a change in state in the Detection or
Input status bytes. It is cleared (allowed to float high) when the
host reads the status bytes." As I understand, this means that we have
to monitor falling edges here.

Is there any reason to register the IRQ as IRQF_TRIGGER_NONE? Would
you accept the above patch instead, provided I send it in the required
format?

Regards.
-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-02  8:35 qt1070: Why IRQF_TRIGGER_NONE? javier Martin
2012-05-03  1:41 ` Josh Wu
2012-05-03  5:15   ` Shen, Voice
2012-05-03  6:14     ` Jean Delvare
2012-05-04  2:07       ` Shen, Voice
2012-05-04  7:06         ` javier Martin
2012-05-04  7:56           ` Dmitry Torokhov

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).