aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/irqdomain.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 51ef84a3c990..fd4b26f8f44c 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -110,6 +110,10 @@ struct irq_domain {
110}; 110};
111 111
112#ifdef CONFIG_IRQ_DOMAIN 112#ifdef CONFIG_IRQ_DOMAIN
113struct irq_domain *__irq_domain_add(struct device_node *of_node,
114 int size, int direct_max,
115 const struct irq_domain_ops *ops,
116 void *host_data);
113struct irq_domain *irq_domain_add_simple(struct device_node *of_node, 117struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
114 unsigned int size, 118 unsigned int size,
115 unsigned int first_irq, 119 unsigned int first_irq,
@@ -121,17 +125,30 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
121 irq_hw_number_t first_hwirq, 125 irq_hw_number_t first_hwirq,
122 const struct irq_domain_ops *ops, 126 const struct irq_domain_ops *ops,
123 void *host_data); 127 void *host_data);
124struct irq_domain *irq_domain_add_linear(struct device_node *of_node, 128extern struct irq_domain *irq_find_host(struct device_node *node);
129extern void irq_set_default_host(struct irq_domain *host);
130
131/**
132 * irq_domain_add_linear() - Allocate and register a linear revmap irq_domain.
133 * @of_node: pointer to interrupt controller's device tree node.
134 * @size: Number of interrupts in the domain.
135 * @ops: map/unmap domain callbacks
136 * @host_data: Controller private data pointer
137 */
138static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
125 unsigned int size, 139 unsigned int size,
126 const struct irq_domain_ops *ops, 140 const struct irq_domain_ops *ops,
127 void *host_data); 141 void *host_data)
128struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, 142{
143 return __irq_domain_add(of_node, size, 0, ops, host_data);
144}
145static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
129 unsigned int max_irq, 146 unsigned int max_irq,
130 const struct irq_domain_ops *ops, 147 const struct irq_domain_ops *ops,
131 void *host_data); 148 void *host_data)
132extern struct irq_domain *irq_find_host(struct device_node *node); 149{
133extern void irq_set_default_host(struct irq_domain *host); 150 return __irq_domain_add(of_node, 0, max_irq, ops, host_data);
134 151}
135static inline struct irq_domain *irq_domain_add_legacy_isa( 152static inline struct irq_domain *irq_domain_add_legacy_isa(
136 struct device_node *of_node, 153 struct device_node *of_node,
137 const struct irq_domain_ops *ops, 154 const struct irq_domain_ops *ops,