summaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-10-30 19:59:18 +0300
committerThomas Gleixner <tglx@linutronix.de>2020-11-07 13:33:46 +0300
commitb6e95788fde8c9bc9da729102085dd36a5a0cda6 (patch)
tree2b61e1df7e5e67e8da079c9842f1c0ebe689a9c5 /kernel/irq
parentc3a877fea962d9d0fb1e3747334699978f566930 (diff)
downloadlinux-b6e95788fde8c9bc9da729102085dd36a5a0cda6.tar.xz
irqdomain: Introduce irq_domain_create_legacy() API
Introduce irq_domain_create_legacy() API which is functional equivalent to the existing irq_domain_add_legacy(), but takes a pointer to the struct fwnode_handle as a parameter. This is useful for non OF systems. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/20201030165919.86234-5-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/irqdomain.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 831526f2e728..9c9cb8829f7a 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -351,16 +351,27 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
const struct irq_domain_ops *ops,
void *host_data)
{
+ return irq_domain_create_legacy(of_node_to_fwnode(of_node), size,
+ first_irq, first_hwirq, ops, host_data);
+}
+EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
+
+struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode,
+ unsigned int size,
+ unsigned int first_irq,
+ irq_hw_number_t first_hwirq,
+ const struct irq_domain_ops *ops,
+ void *host_data)
+{
struct irq_domain *domain;
- domain = __irq_domain_add(of_node_to_fwnode(of_node), first_hwirq + size,
- first_hwirq + size, 0, ops, host_data);
+ domain = __irq_domain_add(fwnode, first_hwirq + size, first_hwirq + size, 0, ops, host_data);
if (domain)
irq_domain_associate_many(domain, first_irq, first_hwirq, size);
return domain;
}
-EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
+EXPORT_SYMBOL_GPL(irq_domain_create_legacy);
/**
* irq_find_matching_fwspec() - Locates a domain for a given fwspec