aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/irqdomain.h
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2016-06-07 16:12:28 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2016-06-13 11:53:51 +0100
commit1e2a7d78499ec8859d2b469051b7b80bad3b08aa (patch)
treeb2b3b3b0c3e45173838c83d1b3181097a4c7bc23 /include/linux/irqdomain.h
parentgenirq: Look-up percpu trigger type if not specified by caller (diff)
downloadwireguard-linux-1e2a7d78499ec8859d2b469051b7b80bad3b08aa.tar.xz
wireguard-linux-1e2a7d78499ec8859d2b469051b7b80bad3b08aa.zip
irqdomain: Don't set type when mapping an IRQ
Some IRQ chips, such as GPIO controllers or secondary level interrupt controllers, may require require additional runtime power management control to ensure they are accessible. For such IRQ chips, it makes sense to enable the IRQ chip when interrupts are requested and disabled them again once all interrupts have been freed. When mapping an IRQ, the IRQ type settings are read and then programmed. The mapping of the IRQ happens before the IRQ is requested and so the programming of the type settings occurs before the IRQ is requested. This is a problem for IRQ chips that require additional power management control because they may not be accessible yet. Therefore, when mapping the IRQ, don't program the type settings, just save them and then program these saved settings when the IRQ is requested (so long as if they are not overridden via the call to request the IRQ). Add a stub function for irq_domain_free_irqs() to avoid any compilation errors when CONFIG_IRQ_DOMAIN_HIERARCHY is not selected. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/linux/irqdomain.h')
-rw-r--r--include/linux/irqdomain.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index f1f36e04d885..317503763314 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -452,6 +452,9 @@ static inline int irq_domain_alloc_irqs(struct irq_domain *domain,
return -1;
}
+static inline void irq_domain_free_irqs(unsigned int virq,
+ unsigned int nr_irqs) { }
+
static inline bool irq_domain_is_hierarchy(struct irq_domain *domain)
{
return false;