Skip to content

Commit

Permalink
Input: ads7846 - do not attempt IRQ workaround when deferring probe
Browse files Browse the repository at this point in the history
When request_irq() returns -EPORBE_DEFER we should abort probe and try
again later instead of trying to engage IRQ trigger workaround.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
dtor committed Oct 16, 2021
1 parent ccd6613 commit 36fc543
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ static int ads7846_probe(struct spi_device *spi)
err = devm_request_threaded_irq(dev, spi->irq,
ads7846_hard_irq, ads7846_irq,
irq_flags, dev->driver->name, ts);
if (err && !pdata->irq_flags) {
if (err && err != -EPROBE_DEFER && !pdata->irq_flags) {
dev_info(dev,
"trying pin change workaround on irq %d\n", spi->irq);
irq_flags |= IRQF_TRIGGER_RISING;
Expand Down

0 comments on commit 36fc543

Please sign in to comment.