[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210128223538.20272-5-song.bao.hua@hisilicon.com>
Date: Fri, 29 Jan 2021 11:35:30 +1300
From: Barry Song <song.bao.hua@...ilicon.com>
To: <tglx@...utronix.de>, <dmitry.torokhov@...il.com>,
<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 v4 04/12] Input: melfas_mip4 - 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/melfas_mip4.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c
index c0050044a5a9..dd6d4cc5f8c2 100644
--- a/drivers/input/touchscreen/melfas_mip4.c
+++ b/drivers/input/touchscreen/melfas_mip4.c
@@ -1502,7 +1502,8 @@ static int mip4_probe(struct i2c_client *client, const struct i2c_device_id *id)
error = devm_request_threaded_irq(&client->dev, client->irq,
NULL, mip4_interrupt,
- IRQF_ONESHOT, MIP4_DEVICE_NAME, ts);
+ IRQF_ONESHOT | IRQF_NO_AUTOEN,
+ MIP4_DEVICE_NAME, ts);
if (error) {
dev_err(&client->dev,
"Failed to request interrupt %d: %d\n",
@@ -1510,8 +1511,6 @@ static int mip4_probe(struct i2c_client *client, const struct i2c_device_id *id)
return error;
}
- disable_irq(client->irq);
-
error = input_register_device(input);
if (error) {
dev_err(&client->dev,
--
2.25.1
Powered by blists - more mailing lists