diff mbox

Input: ar1021 - do not force raising edge IRQ trigger

Message ID 20170413234923.GA38321@dtor-ws (mailing list archive)
State New, archived
Headers show

Commit Message

Dmitry Torokhov April 13, 2017, 11:49 p.m. UTC
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.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/touchscreen/ar1021_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Kepplinger April 14, 2017, 5:50 a.m. UTC | #1
On 2017-04-14 01:49, Dmitry Torokhov wrote:
> 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.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/input/touchscreen/ar1021_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c
> index 6797e123925a..6c3c79b7ff51 100644
> --- a/drivers/input/touchscreen/ar1021_i2c.c
> +++ b/drivers/input/touchscreen/ar1021_i2c.c
> @@ -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.

Tested-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>

                     martin
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christian Gmeiner April 14, 2017, 7:33 a.m. UTC | #2
2017-04-14 1:49 GMT+02:00 Dmitry Torokhov <dmitry.torokhov@gmail.com>:
> 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.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Reviewed-By: Christian Gmeiner <christian.gmeiner@gmail.com>

greets
--
Christian Gmeiner, MSc

https://www.youtube.com/user/AloryOFFICIAL
https://soundcloud.com/christian-gmeiner
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jean Delvare April 15, 2017, 6:44 a.m. UTC | #3
On Thu, 13 Apr 2017 16:49:23 -0700, Dmitry Torokhov wrote:
> 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.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/input/touchscreen/ar1021_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c
> index 6797e123925a..6c3c79b7ff51 100644
> --- a/drivers/input/touchscreen/ar1021_i2c.c
> +++ b/drivers/input/touchscreen/ar1021_i2c.c
> @@ -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,

Acked-by: Jean Delvare <jdelvare@suse.de>
diff mbox

Patch

diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c
index 6797e123925a..6c3c79b7ff51 100644
--- a/drivers/input/touchscreen/ar1021_i2c.c
+++ b/drivers/input/touchscreen/ar1021_i2c.c
@@ -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,