Skip to content

Commit 600a2db

Browse files
committed
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>
1 parent a8f5693 commit 600a2db

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

drivers/input/touchscreen/sx8654.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,13 @@ static int sx8654_probe(struct i2c_client *client)
391391
return error;
392392
}
393393

394+
/*
395+
* Start with the interrupt disabled, it will be enabled in
396+
* sx8654_open().
397+
*/
394398
error = devm_request_threaded_irq(&client->dev, client->irq,
395399
NULL, sx8654->data->irqh,
396-
IRQF_ONESHOT,
400+
IRQF_ONESHOT | IRQF_NO_AUTOEN,
397401
client->name, sx8654);
398402
if (error) {
399403
dev_err(&client->dev,
@@ -402,9 +406,6 @@ static int sx8654_probe(struct i2c_client *client)
402406
return error;
403407
}
404408

405-
/* Disable the IRQ, we'll enable it in sx8654_open() */
406-
disable_irq(client->irq);
407-
408409
error = input_register_device(sx8654->input);
409410
if (error)
410411
return error;

0 commit comments

Comments
 (0)