Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / drivers / acpi / irq.c
index 89690a4713601b1c7410fcf0ca80222f3a96650f..e209081d644b5785e104ea6beda95c6a0eab735e 100644 (file)
@@ -292,3 +292,29 @@ void __init acpi_set_irq_model(enum acpi_irq_model_id model,
        acpi_irq_model = model;
        acpi_gsi_domain_id = fwnode;
 }
+
+/**
+ * acpi_irq_create_hierarchy - Create a hierarchical IRQ domain with the default
+ *                             GSI domain as its parent.
+ * @flags:      Irq domain flags associated with the domain
+ * @size:       Size of the domain.
+ * @fwnode:     Optional fwnode of the interrupt controller
+ * @ops:        Pointer to the interrupt domain callbacks
+ * @host_data:  Controller private data pointer
+ */
+struct irq_domain *acpi_irq_create_hierarchy(unsigned int flags,
+                                            unsigned int size,
+                                            struct fwnode_handle *fwnode,
+                                            const struct irq_domain_ops *ops,
+                                            void *host_data)
+{
+       struct irq_domain *d = irq_find_matching_fwnode(acpi_gsi_domain_id,
+                                                       DOMAIN_BUS_ANY);
+
+       if (!d)
+               return NULL;
+
+       return irq_domain_create_hierarchy(d, flags, size, fwnode, ops,
+                                          host_data);
+}
+EXPORT_SYMBOL_GPL(acpi_irq_create_hierarchy);