[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210128223538.20272-13-song.bao.hua@hisilicon.com>
Date: Fri, 29 Jan 2021 11:35:38 +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 12/12] Input: tca6416-keypad - 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/keyboard/tca6416-keypad.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/tca6416-keypad.c b/drivers/input/keyboard/tca6416-keypad.c
index 9b0f9665dcb0..2a9755910065 100644
--- a/drivers/input/keyboard/tca6416-keypad.c
+++ b/drivers/input/keyboard/tca6416-keypad.c
@@ -274,7 +274,7 @@ static int tca6416_keypad_probe(struct i2c_client *client,
error = request_threaded_irq(chip->irqnum, NULL,
tca6416_keys_isr,
IRQF_TRIGGER_FALLING |
- IRQF_ONESHOT,
+ IRQF_ONESHOT | IRQF_NO_AUTOEN,
"tca6416-keypad", chip);
if (error) {
dev_dbg(&client->dev,
@@ -282,7 +282,6 @@ static int tca6416_keypad_probe(struct i2c_client *client,
chip->irqnum, error);
goto fail1;
}
- disable_irq(chip->irqnum);
}
error = input_register_device(input);
--
2.25.1
Powered by blists - more mailing lists