[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231219174526.2235150-6-sunilvl@ventanamicro.com>
Date: Tue, 19 Dec 2023 23:15:14 +0530
From: Sunil V L <sunilvl@...tanamicro.com>
To: linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org,
linux-acpi@...r.kernel.org,
linux-pci@...r.kernel.org
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>,
Anup Patel <anup@...infault.org>,
Thomas Gleixner <tglx@...utronix.de>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Haibo Xu <haibo1.xu@...el.com>,
Conor Dooley <conor.dooley@...rochip.com>,
Andrew Jones <ajones@...tanamicro.com>,
Björn Töpel <bjorn@...nel.org>,
Marc Zyngier <maz@...nel.org>,
Sunil V L <sunilvl@...tanamicro.com>
Subject: [RFC PATCH v3 05/17] ACPI: irq: Add support for deferred probe in acpi_register_gsi()
The chip which provides the GSI support may not be initialized at the
time of acpi_register_gsi(). Return -EPROBE_DEFER to support deferred
probing similar to acpi_irq_get().
This is required to support ResourceSource as supported by ACPI spec for
Interrupt resource.
Signed-off-by: Sunil V L <sunilvl@...tanamicro.com>
---
drivers/acpi/irq.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c
index b3409e2e2041..c4605fdcda77 100644
--- a/drivers/acpi/irq.c
+++ b/drivers/acpi/irq.c
@@ -52,6 +52,7 @@ EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
*
* Returns: a valid linux IRQ number on success
* -EINVAL on failure
+ * -EPROBE_DEFER if irqdomain not created yet
*/
int acpi_register_gsi(struct device *dev, u32 gsi, int trigger,
int polarity)
@@ -65,6 +66,9 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger,
return -EINVAL;
}
+ if (!irq_find_matching_fwnode(fwspec.fwnode, DOMAIN_BUS_ANY))
+ return -EPROBE_DEFER;
+
fwspec.param[0] = gsi;
fwspec.param[1] = acpi_dev_get_irq_type(trigger, polarity);
fwspec.param_count = 2;
--
2.39.2
Powered by blists - more mailing lists