Skip to contentSkip to conversation

tsc2007 : set irq edge

PATCH In review Matthieu CASTET 1 participant 2 messages Feb 24, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tsc2007 : set irq edge

Hi,

We need to pass a trigger flag for the interruption to work with some gpio controller.

This patch make it work on a arm omap chip.

drivers/input/touchscreen/tsc2007.c +1 -1
index 7ef0d14..a16b9e5 100644
@@ -312,7 +312,7 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
 	if (pdata->init_platform_hw)
 		pdata->init_platform_hw();
 
-	err = request_irq(ts->irq, tsc2007_irq, 0,
+	err = request_irq(ts->irq, tsc2007_irq, IRQF_TRIGGER_FALLING,
 			client->dev.driver->name, ts);
 	if (err < 0) {
 		dev_err(&client->dev, "irq %d busy?\n", ts->irq);
#2 lore raw
In reply to a message not in the archive
Quoted 9 lines · Matthieu CASTET

Hi,

We need to pass a trigger flag for the interruption to work with some gpio controller.

This patch make it work on a arm omap chip.

in fact we should trigger on low level.
The problem with falling edge is that we trigger irq when sending command to chip even if there are disable : there are resend on irq_enable!

drivers/input/touchscreen/tsc2007.c +1 -1
index 7ef0d14..a16b9e5 100644
@@ -312,7 +312,7 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
 	if (pdata->init_platform_hw)
 		pdata->init_platform_hw();
 
-	err = request_irq(ts->irq, tsc2007_irq, 0,
+	err = request_irq(ts->irq, tsc2007_irq, IRQF_TRIGGER_LOW,
 			client->dev.driver->name, ts);
 	if (err < 0) {
 		dev_err(&client->dev, "irq %d busy?\n", ts->irq);