linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Mack <daniel@zonque.org>, Marco Felsch <m.felsch@pengutronix.de>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] Input: ads7846 - do not attempt IRQ workaround when deferring probe
Date: Thu,  9 Sep 2021 21:50:39 -0700	[thread overview]
Message-ID: <20210910045039.4020199-3-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20210910045039.4020199-1-dmitry.torokhov@gmail.com>

When request_irq() returns -EPORBE_DEFER we should abort probe and try
again later instead of trying to engage IRQ trigger workaround.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/touchscreen/ads7846.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 0f973351bc67..a25a77dd9a32 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -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;
-- 
2.33.0.309.g3052b89438-goog


      parent reply	other threads:[~2021-09-10  4:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10  4:50 [PATCH 1/3] Input: ads7846 - set input device bus type and product ID Dmitry Torokhov
2021-09-10  4:50 ` [PATCH 2/3] Input: ads7846 - use input_set_capability() Dmitry Torokhov
2021-09-10  4:50 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210910045039.4020199-3-dmitry.torokhov@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=daniel@zonque.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).