diff options
| author | Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> | 2026-08-07 01:05:58 +0300 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-08-07 20:39:48 +0200 |
| commit | 20b996280640f492ebdd41c2d2c991801df75e61 (patch) | |
| tree | b096824c5b9cfb15a2e52e6e5bc27c11d4cba202 | |
| parent | a02fa031b9520e46e98bff17e12b472eba770670 (diff) | |
pinctrl: airoha: fix IRQ mask/unmask code
When using IRQCHIP_IMMUTABLE, airoha_irq_unmask() must manually call
gpiochip_enable_irq() and airoha_irq_mask() must call
gpiochip_disable_irq(). Without these calls, gpiolib never sets the
GPIOD_FLAG_IRQ_IS_ENABLED bit. Because this bit is missing,
gpiod_direction_output() will not realize the pin is actively used
as an interrupt.
Fixes: 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Linus Walleij <linusw@kernel.org>
| -rw-r--r-- | drivers/pinctrl/airoha/pinctrl-airoha.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/airoha/pinctrl-airoha.c b/drivers/pinctrl/airoha/pinctrl-airoha.c index 899299adfd57..2e2870005bad 100644 --- a/drivers/pinctrl/airoha/pinctrl-airoha.c +++ b/drivers/pinctrl/airoha/pinctrl-airoha.c @@ -2595,6 +2595,7 @@ static void airoha_irq_unmask(struct irq_data *data) if (WARN_ON_ONCE(data->hwirq >= ARRAY_SIZE(gpiochip->irq_type))) return; + gpiochip_enable_irq(gc, irqd_to_hwirq(data)); switch (gpiochip->irq_type[data->hwirq]) { case IRQ_TYPE_LEVEL_LOW: val = val << 1; @@ -2629,6 +2630,7 @@ static void airoha_irq_mask(struct irq_data *data) regmap_clear_bits(pinctrl->regmap, gpiochip->level[index], mask); regmap_clear_bits(pinctrl->regmap, gpiochip->edge[index], mask); + gpiochip_disable_irq(gc, irqd_to_hwirq(data)); } static int airoha_irq_type(struct irq_data *data, unsigned int type) |
