Skip to contentSkip to conversation

Input: ar1021 - do not force raising edge IRQ trigger

PATCH In review Dmitry Torokhov 4 participants 4 messages Apr 13, 2017 – Apr 15, 2017

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: ar1021 - do not force raising edge IRQ trigger

We should not be forcing edge triggered interrupt, but rather let platform decide the kind of trigger it needs to use. Also, the driver is not quite safe with regard to edge-triggered interrupts as it does not try to kick the controller after requesting/enabling IRQ.

---
 drivers/input/touchscreen/ar1021_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/ar1021_i2c.c +1 -1
index 6797e123925a..6c3c79b7ff51 100644
@@ -109,7 +109,7 @@ static int ar1021_i2c_probe(struct i2c_client *client,
 
 	error = devm_request_threaded_irq(&client->dev, client->irq,
 					  NULL, ar1021_i2c_irq,
-					  IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+					  IRQF_ONESHOT,
 					  "ar1021_i2c", ar1021);
 	if (error) {
 		dev_err(&client->dev,
Signature · 5 lines
2.12.2.762.g0e3151a226-goog


-- 
Dmitry
Tested-by on v1 1/1
#1 lore raw
Quoted 16 lines · Dmitry Torokhov

We should not be forcing edge triggered interrupt, but rather let platform decide the kind of trigger it needs to use. Also, the driver is not quite safe with regard to edge-triggered interrupts as it does not try to kick the controller after requesting/enabling IRQ.

---
 drivers/input/touchscreen/ar1021_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/ar1021_i2c.c +0 -0
index 6797e123925a..6c3c79b7ff51 100644

drivers/input/touchscreen/ar1021_i2c.c static int ar1021_i2c_probe(struct i2c_client *client, · line 115

Quoted 8 lines
drivers/input/touchscreen/ar1021_i2c.c +1 -1
@@ -109,7 +109,7 @@ static int ar1021_i2c_probe(struct i2c_client *client,
 
 	error = devm_request_threaded_irq(&client->dev, client->irq,
 					  NULL, ar1021_i2c_irq,
-					  IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+					  IRQF_ONESHOT,
 					  "ar1021_i2c", ar1021);
 	if (error) {
 		dev_err(&client->dev,

makes sense, if users have to expect that this default can change. it works.

martin

Reviewed-by on v1 1/1
#2 lore raw
In reply to Dmitry Torokhov

2017-04-14 1:49 GMT+02:00 Dmitry Torokhov <[email protected]>:

Quoted 6 lines

We should not be forcing edge triggered interrupt, but rather let platform decide the kind of trigger it needs to use. Also, the driver is not quite safe with regard to edge-triggered interrupts as it does not try to kick the controller after requesting/enabling IRQ.

greets
--
Christian Gmeiner, MSc

https://www.youtube.com/user/AloryOFFICIAL
https://soundcloud.com/christian-gmeiner

Acked-by on v1 1/1
#3 lore raw
In reply to Dmitry Torokhov
Quoted 15 lines · Dmitry Torokhov

We should not be forcing edge triggered interrupt, but rather let platform decide the kind of trigger it needs to use. Also, the driver is not quite safe with regard to edge-triggered interrupts as it does not try to kick the controller after requesting/enabling IRQ.

---
 drivers/input/touchscreen/ar1021_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/ar1021_i2c.c +0 -0
index 6797e123925a..6c3c79b7ff51 100644

drivers/input/touchscreen/ar1021_i2c.c static int ar1021_i2c_probe(struct i2c_client *client, · line 115

Quoted 8 lines
drivers/input/touchscreen/ar1021_i2c.c +1 -1
@@ -109,7 +109,7 @@ static int ar1021_i2c_probe(struct i2c_client *client,
 
 	error = devm_request_threaded_irq(&client->dev, client->irq,
 					  NULL, ar1021_i2c_irq,
-					  IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+					  IRQF_ONESHOT,
 					  "ar1021_i2c", ar1021);
 	if (error) {
 		dev_err(&client->dev,
Signature · 2 lines
Jean Delvare
SUSE L3 Support