Thread (21 messages) 21 messages, 2 authors, 2d ago
WARM2d

[PATCH RFC 03/11] driver core: platform: Add static ACPI nodes IRQ retrieval/mapping code

From: Lorenzo Pieralisi <lpieralisi@kernel.org>
Date: 2026-09-25 07:48:31
Also in: driver-core, linux-acpi, linux-watchdog, lkml
Subsystem: driver core, kobjects, debugfs and sysfs, the rest · Maintainers: Greg Kroah-Hartman, "Rafael J. Wysocki", Danilo Krummrich, Linus Torvalds

ACPI static fwnodes types are not contemplated in the current

platform_get_irq_affinity()

implementation that is there to retrieve and map IRQs for a device.

Add fwnode_irq_get() to platform_get_irq_affinity() for static ACPI fwnodes
to overcome this shortcoming, enabling IRQ retrieval and mapping for the
ACPI static fwnode type.

Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Danilo Krummrich <dakr@kernel.org>
---
 drivers/base/platform.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 66f9ec73d47e..413c73332308 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -228,6 +228,12 @@ int platform_get_irq_affinity(struct platform_device *dev, unsigned int num,
 		goto out;
 	}
 
+	if (is_acpi_static_node(fwnode)) {
+		ret = fwnode_irq_get(fwnode, num);
+		if (ret > 0 || ret == -EPROBE_DEFER)
+			goto out;
+	}
+
 	/*
 	 * For the index 0 interrupt, allow falling back to GpioInt
 	 * resources. While a device could have both Interrupt and GpioInt
-- 
2.54.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help