diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-05-20 19:49:27 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-05-21 10:53:17 +0100 |
commit | 9ed78b05f998050784ae863bd5ba4aea2e2141ed (patch) | |
tree | f387004781495db2bd1ca6cbd2eba2aec6aee75a /kernel/irq | |
parent | 87526603c89256e18ad2c23821fdaf376b072fc8 (diff) | |
download | linux-9ed78b05f998050784ae863bd5ba4aea2e2141ed.tar.gz linux-9ed78b05f998050784ae863bd5ba4aea2e2141ed.tar.bz2 linux-9ed78b05f998050784ae863bd5ba4aea2e2141ed.zip |
irqdomain: Allow software nodes for IRQ domain creation
In some cases we need to have an IRQ domain created out of software node.
One of such cases is DesignWare GPIO driver when it's instantiated from
half-baked ACPI table (alas, we can't fix it for devices which are few years
on market) and thus using software nodes to quirk this. But the driver
is using IRQ domains based on per GPIO port firmware nodes, which are in
the above case software ones. This brings a warning message to be printed
[ 73.957183] irq: Invalid fwnode type for irqdomain
and creates an anonymous IRQ domain without a debugfs entry.
Allowing software nodes to be valid for IRQ domains rids us of the warning
and debugs gets correctly populated.
% ls -1 /sys/kernel/debug/irq/domains/
...
intel-quark-dw-apb-gpio:portA
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[maz: refactored commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200520164927.39090-3-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/irqdomain.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 5d14d910ab64..a4c2c915511d 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -161,7 +161,8 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, domain->name = fwid->name; break; } - } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode)) { + } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode) || + is_software_node(fwnode)) { char *name; /* |