mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Samuel Tirwa <samuel.tirwa@web.de>
To: Lee Jones <lee@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Samuel Tirwa <samuel.tirwa@web.de>
Subject: [PATCH 2/2] i2c: designware: use polling when IRQ resource is 0
Date: Tue,  3 Nov 2026 09:59:54 +0100	[thread overview]
Message-ID: <20261103085954.1497-2-samuel.tirwa@web.de> (raw)
In-Reply-To: <20261103085954.1497-1-samuel.tirwa@web.de>

When an Intel LPSS I2C controller has no usable interrupt (firmware
reports PCI INTx as not connected), intel-lpss passes 0 as the IRQ base,
which leaves the child device with an IRQ resource whose start is 0.
platform_get_irq_optional() then returns 0 instead of -ENXIO, so the
DesignWare driver never enabled ACCESS_POLLING and request_irq(0, ...)
failed.

Treat an IRQ number of 0 the same as 'no IRQ resource' and enable
polling mode.

Signed-off-by: Samuel Tirwa <samuel.tirwa@web.de>
---
 drivers/i2c/busses/i2c-designware-platdrv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index ca63b74..035ec92 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -4,7 +4,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
 	int irq, ret;
 
 	irq = platform_get_irq_optional(pdev, 0);
-	if (irq == -ENXIO)
+	if (irq == -ENXIO || irq == 0)
 		flags |= ACCESS_POLLING;
 	else if (irq < 0)
 		return irq;
-- 
2.56.0.windows.4


  reply	other threads:[~2026-11-03  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  8:59 [PATCH 1/2] mfd: intel-lpss: fall back to polling when no usable IRQ Samuel Tirwa
2026-11-03  8:59 ` Samuel Tirwa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-03  8:57 Samuel Tirwa
2026-11-03  8:57 ` [PATCH 2/2] i2c: designware: use polling when IRQ resource is 0 Samuel Tirwa

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=20261103085954.1497-2-samuel.tirwa@web.de \
    --to=samuel.tirwa@web.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=lee@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®