* [PATCH v5] nfc: nxp-nci: i2c: use rising-edge IRQ on ACPI systems
@ 2026-05-19 9:32 Carl Lee via B4 Relay
2026-05-26 8:58 ` Bartosz Golaszewski
0 siblings, 1 reply; 3+ messages in thread
From: Carl Lee via B4 Relay @ 2026-05-19 9:32 UTC (permalink / raw)
To: netdev, linux-kernel, stable, krzk, carl.lee, peter.shen,
colin.huang2, kuba, david, luca.stefani.ge1, brgl, mpearson
Cc: Mark Pearson, Bartosz Golaszewski
From: Carl Lee <carl.lee@amd.com>
Some ACPI-based platforms report incorrect IRQ trigger types (e.g.
IRQF_TRIGGER_HIGH), which can lead to interrupt storms.
Use the historically working rising-edge trigger on ACPI systems to
avoid this regression.
Device Tree-based systems continue to use the firmware-provided
trigger type.
Fixes: 57be33f85e36 ("nfc: nxp-nci: remove interrupt trigger type")
Cc: stable@vger.kernel.org
Tested-by: Luca Stefani <luca.stefani.ge1@gmail.com>
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Carl Lee <carl.lee@amd.com>
---
Some ACPI-based platforms report incorrect IRQ trigger types,
which can lead to interrupt storms.
Use rising-edge IRQ on ACPI systems to avoid this regression,
while keeping firmware-provided trigger types on non-ACPI systems.
---
Changes in v5:
- Add missing Reviewed-by and Tested-by tags
- No functional changes
- Link to v4: https://lore.kernel.org/r/20260519-nfc-nxp-nci-i2c-restore-irq-trigger-fallback-v4-1-8580d8e18016@amd.com
Changes in v4:
- Add Fixes tag
- Add Cc: stable@vger.kernel.org
- Link to v3: https://lore.kernel.org/r/20260516-nfc-nxp-nci-i2c-restore-irq-trigger-fallback-v3-1-37ba4b6e9086@amd.com
Changes in v3:
- Use rising-edge IRQ on ACPI systems to avoid interrupt storms
- Keep using firmware-provided trigger type on non-ACPI systems
- Refine commit message to focus on regression on ACPI platforms
- Link to v2: https://lore.kernel.org/r/20260312-nfc-nxp-nci-i2c-restore-irq-trigger-fallback-v2-1-362348f7fa30@amd.com
Changes in v2:
- Add missing <linux/irq.h> include for irq_get_trigger_type().
- Link to v1: https://lore.kernel.org/r/20260311-nfc-nxp-nci-i2c-restore-irq-trigger-fallback-v1-1-9e20714411d7@amd.com
---
drivers/nfc/nxp-nci/i2c.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index 6a5ce8ff91f0..266dc231c47d 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -16,6 +16,7 @@
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
+#include <linux/irq.h>
#include <linux/module.h>
#include <linux/nfc.h>
#include <linux/gpio/consumer.h>
@@ -267,6 +268,7 @@ static int nxp_nci_i2c_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct nxp_nci_i2c_phy *phy;
+ unsigned long irqflags;
int r;
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
@@ -303,9 +305,26 @@ static int nxp_nci_i2c_probe(struct i2c_client *client)
if (r < 0)
return r;
+ /*
+ * ACPI platforms may report incorrect IRQ trigger types
+ * (e.g. level-high), which can lead to interrupt storms.
+ *
+ * Use the historically stable rising-edge trigger for ACPI devices.
+ *
+ * On non-ACPI systems (e.g. Device Tree), prefer the firmware-
+ * provided trigger type, falling back to rising-edge if not set.
+ */
+ if (ACPI_COMPANION(dev)) {
+ irqflags = IRQF_TRIGGER_RISING;
+ } else {
+ irqflags = irq_get_trigger_type(client->irq);
+ if (!irqflags)
+ irqflags = IRQF_TRIGGER_RISING;
+ }
+
r = request_threaded_irq(client->irq, NULL,
nxp_nci_i2c_irq_thread_fn,
- IRQF_ONESHOT,
+ irqflags | IRQF_ONESHOT,
NXP_NCI_I2C_DRIVER_NAME, phy);
if (r < 0)
nfc_err(&client->dev, "Unable to register IRQ handler\n");
---
base-commit: 7109a2155340cc7b21f27e832ece6df03592f2e8
change-id: 20260311-nfc-nxp-nci-i2c-restore-irq-trigger-fallback-cda942530c60
Best regards,
--
Carl Lee <carl.lee@amd.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v5] nfc: nxp-nci: i2c: use rising-edge IRQ on ACPI systems
2026-05-19 9:32 [PATCH v5] nfc: nxp-nci: i2c: use rising-edge IRQ on ACPI systems Carl Lee via B4 Relay
@ 2026-05-26 8:58 ` Bartosz Golaszewski
2026-05-27 1:38 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-05-26 8:58 UTC (permalink / raw)
To: carl.lee
Cc: netdev, linux-kernel, stable, krzk, peter.shen, colin.huang2,
kuba, david, luca.stefani.ge1, mpearson, Mark Pearson,
Bartosz Golaszewski
On Tue, May 19, 2026 at 11:47 AM Carl Lee via B4 Relay
<devnull+carl.lee.amd.com@kernel.org> wrote:
>
> From: Carl Lee <carl.lee@amd.com>
>
> Some ACPI-based platforms report incorrect IRQ trigger types (e.g.
> IRQF_TRIGGER_HIGH), which can lead to interrupt storms.
>
> Use the historically working rising-edge trigger on ACPI systems to
> avoid this regression.
>
> Device Tree-based systems continue to use the firmware-provided
> trigger type.
>
> Fixes: 57be33f85e36 ("nfc: nxp-nci: remove interrupt trigger type")
> Cc: stable@vger.kernel.org
>
> Tested-by: Luca Stefani <luca.stefani.ge1@gmail.com>
> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
> Tested-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> Signed-off-by: Carl Lee <carl.lee@amd.com>
> ---
> Some ACPI-based platforms report incorrect IRQ trigger types,
> which can lead to interrupt storms.
>
> Use rising-edge IRQ on ACPI systems to avoid this regression,
> while keeping firmware-provided trigger types on non-ACPI systems.
> ---
Hi!
Can this be queued yet? The problem is still present in stable branches.
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v5] nfc: nxp-nci: i2c: use rising-edge IRQ on ACPI systems
2026-05-26 8:58 ` Bartosz Golaszewski
@ 2026-05-27 1:38 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2026-05-27 1:38 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: carl.lee, netdev, linux-kernel, stable, krzk, peter.shen,
colin.huang2, david, luca.stefani.ge1, mpearson, Mark Pearson,
Bartosz Golaszewski
On Tue, 26 May 2026 10:58:39 +0200 Bartosz Golaszewski wrote:
> Can this be queued yet? The problem is still present in stable branches.
Sorry about the delays, teething issues.
It's in net now and will be in Linus's tree on Thu.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-27 1:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 9:32 [PATCH v5] nfc: nxp-nci: i2c: use rising-edge IRQ on ACPI systems Carl Lee via B4 Relay
2026-05-26 8:58 ` Bartosz Golaszewski
2026-05-27 1:38 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox