aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorMaulik Shah <mkshah@codeaurora.org>2019-11-15 15:11:49 -0700
committerMarc Zyngier <maz@kernel.org>2019-11-16 10:20:02 +0000
commit4a169a95d885fe5c050bac1a21d43c86ba955bcf (patch)
tree3acd2ceca07894c2ed21618a73a46a9a5c7c55f1 /include/linux/irq.h
parentirqdomain: Add bus token DOMAIN_BUS_WAKEUP (diff)
downloadwireguard-linux-4a169a95d885fe5c050bac1a21d43c86ba955bcf.tar.xz
wireguard-linux-4a169a95d885fe5c050bac1a21d43c86ba955bcf.zip
genirq: Introduce irq_chip_get/set_parent_state calls
On certain QTI chipsets some GPIOs are direct-connect interrupts to the GIC to be used as regular interrupt lines. When the GPIOs are not used for interrupt generation the interrupt line is disabled. But disabling the interrupt at GIC does not prevent the interrupt to be reported as pending at GIC_ISPEND. Later, when drivers call enable_irq() on the interrupt, an unwanted interrupt occurs. Introduce get and set methods for irqchip's parent to clear it's pending irq state. This then can be invoked by the GPIO interrupt controller on the parents in it hierarchy to clear the interrupt before enabling the interrupt. Signed-off-by: Maulik Shah <mkshah@codeaurora.org> Signed-off-by: Lina Iyer <ilina@codeaurora.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/1573855915-9841-7-git-send-email-ilina@codeaurora.org [updated commit text and minor code fixes]
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index fb301cf29148..7853eb9301f2 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -610,6 +610,12 @@ extern int irq_chip_pm_put(struct irq_data *data);
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
extern void handle_fasteoi_ack_irq(struct irq_desc *desc);
extern void handle_fasteoi_mask_irq(struct irq_desc *desc);
+extern int irq_chip_set_parent_state(struct irq_data *data,
+ enum irqchip_irq_state which,
+ bool val);
+extern int irq_chip_get_parent_state(struct irq_data *data,
+ enum irqchip_irq_state which,
+ bool *state);
extern void irq_chip_enable_parent(struct irq_data *data);
extern void irq_chip_disable_parent(struct irq_data *data);
extern void irq_chip_ack_parent(struct irq_data *data);