[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210107223926.35284-3-song.bao.hua@hisilicon.com>
Date: Fri, 8 Jan 2021 11:39:16 +1300
From: Barry Song <song.bao.hua@...ilicon.com>
To: <dmitry.torokhov@...il.com>, <tglx@...utronix.de>,
<maz@...nel.org>, <gregkh@...uxfoundation.org>,
<linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <linuxarm@...neuler.org>, Barry Song <song.bao.hua@...ilicon.com>
Subject: [PATCH v3 02/12] Input: ar1021 - request_irq by IRQF_NO_AUTOEN and remove disable_irq
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable because of requesting.
Signed-off-by: Barry Song <song.bao.hua@...ilicon.com>
---
drivers/input/touchscreen/ar1021_i2c.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c
index c0d5c2413356..dc6a85362a40 100644
--- a/drivers/input/touchscreen/ar1021_i2c.c
+++ b/drivers/input/touchscreen/ar1021_i2c.c
@@ -125,7 +125,7 @@ static int ar1021_i2c_probe(struct i2c_client *client,
error = devm_request_threaded_irq(&client->dev, client->irq,
NULL, ar1021_i2c_irq,
- IRQF_ONESHOT,
+ IRQF_ONESHOT | IRQF_NO_AUTOEN,
"ar1021_i2c", ar1021);
if (error) {
dev_err(&client->dev,
@@ -133,9 +133,6 @@ static int ar1021_i2c_probe(struct i2c_client *client,
return error;
}
- /* Disable the IRQ, we'll enable it in ar1021_i2c_open() */
- disable_irq(client->irq);
-
error = input_register_device(ar1021->input);
if (error) {
dev_err(&client->dev,
--
2.25.1
Powered by blists - more mailing lists