]> git.baikalelectronics.ru Git - kernel.git/commit
genirq: Introduce irq_chip_get/set_parent_state calls
authorMaulik Shah <mkshah@codeaurora.org>
Fri, 15 Nov 2019 22:11:49 +0000 (15:11 -0700)
committerMarc Zyngier <maz@kernel.org>
Sat, 16 Nov 2019 10:20:02 +0000 (10:20 +0000)
commit9c677e9794413751e29cf07fbad6dc47ce6105b3
tree3acd2ceca07894c2ed21618a73a46a9a5c7c55f1
parent527e9de3f0fd3c02f1f95e096aed29b62ae4559b
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]
include/linux/irq.h
kernel/irq/chip.c