summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2024-08-15 00:22:13 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-03-25 17:53:59 +0300
commit600a2db76bf28ab791774ed378d74c50f16e24d5 (patch)
treed3fc2a9163485b92b514c6cd018c64e20e5974dd
parenta8f56931c432c8c9a5198887bdd0f5d181b75495 (diff)
downloadlinux-600a2db76bf28ab791774ed378d74c50f16e24d5.tar.xz
Input: sx8654 - use IRQF_NOAUTOEN when requesting interrupt
Instead of requesting interrupt normally and immediately disabling it with call to disable_irq() use IRQF_NOAUTOEN to keep it disabled until it is needed. This avoids a tiny window when interrupt is enabled but not needed. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/touchscreen/sx8654.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/sx8654.c b/drivers/input/touchscreen/sx8654.c
index b5fe750e42ad..0d92aaeea3e0 100644
--- a/drivers/input/touchscreen/sx8654.c
+++ b/drivers/input/touchscreen/sx8654.c
@@ -391,9 +391,13 @@ static int sx8654_probe(struct i2c_client *client)
return error;
}
+ /*
+ * Start with the interrupt disabled, it will be enabled in
+ * sx8654_open().
+ */
error = devm_request_threaded_irq(&client->dev, client->irq,
NULL, sx8654->data->irqh,
- IRQF_ONESHOT,
+ IRQF_ONESHOT | IRQF_NO_AUTOEN,
client->name, sx8654);
if (error) {
dev_err(&client->dev,
@@ -402,9 +406,6 @@ static int sx8654_probe(struct i2c_client *client)
return error;
}
- /* Disable the IRQ, we'll enable it in sx8654_open() */
- disable_irq(client->irq);
-
error = input_register_device(sx8654->input);
if (error)
return error;