pinctrl: qcom: Acknowledge IRQs for PDC interrupt controller

PDC needs to acknowledge incoming GPIO interrupts to clear the latched
interrupt status in secondary mode of PDC. For level-triggered IRQs this
happens automatically in irq_eoi() but for edge-triggered IRQs this needs
to happen as early as possible in the IRQ handler.

Implement this by using handle_fasteoi_ack_irq() as IRQ handler in this
situation and forward the irq_ack() callback to the parent IRQ chip.

Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Signed-off-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
Link: https://patch.msgid.link/20260707-hamoa_pdc_v3-v4-5-dfd1f4a3ae89@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
Stephan Gerhold
2026-07-08 13:47:36 +02:00
committed by Bartosz Golaszewski
parent ea067e0926
commit f790ea0b69
+14 -1
View File
@@ -994,6 +994,16 @@ static void msm_gpio_irq_ack(struct irq_data *d)
if (test_bit(d->hwirq, pctrl->skip_wake_irqs)) {
if (test_bit(d->hwirq, pctrl->dual_edge_irqs))
msm_gpio_update_dual_edge_parent(d);
/*
* During early initialization of the IRQ hierarchy,
* irq_ack() is called by __irq_set_handler() before
* the parent IRQ chip has been set up. This is why
* we additionally need to check for d->parent_data->chip.
*/
if (d->parent_data->chip && d->parent_data->chip->irq_ack)
irq_chip_ack_parent(d);
return;
}
@@ -1064,7 +1074,10 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
if (test_bit(d->hwirq, pctrl->skip_wake_irqs)) {
clear_bit(d->hwirq, pctrl->dual_edge_irqs);
irq_set_handler_locked(d, handle_fasteoi_irq);
if (type & IRQ_TYPE_LEVEL_MASK)
irq_set_handler_locked(d, handle_fasteoi_irq);
else
irq_set_handler_locked(d, handle_fasteoi_ack_irq);
return 0;
}