diff options
| author | Tsz Shan Chan <tsz.chan.dev@gmail.com> | 2026-08-05 15:55:15 +1000 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-08-06 23:37:39 +0200 |
| commit | c04957d2fc45af6f637cb21b21a15e05aa8bddfc (patch) | |
| tree | 9f026d14ebf9c3461c6a3a38ad61ddc5a5f7019f | |
| parent | cda114315f88cb5ff4899648986d7adb181aebbf (diff) | |
| download | linux-c04957d2fc45af6f637cb21b21a15e05aa8bddfc.tar.gz linux-c04957d2fc45af6f637cb21b21a15e05aa8bddfc.zip | |
pinctrl: sx150x: Return IRQ_NONE if no pending irq
The driver currently reads the interrupt source register, writes the
value back to clear it, and always returns IRQ_HANDLED.
When the IRQ is shared, the handler should not claim interrupts that are
not from this device.
Check for zero interrupt source first. It no interrupt is pending,
return IRQ_NONE and skip the register write.
Signed-off-by: Tsz Shan Chan <tchan@jacques.com.au>
Signed-off-by: Linus Walleij <linusw@kernel.org>
| -rw-r--r-- | drivers/pinctrl/pinctrl-sx150x.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c index 89fdfa96843f..3c1309e8a844 100644 --- a/drivers/pinctrl/pinctrl-sx150x.c +++ b/drivers/pinctrl/pinctrl-sx150x.c @@ -550,6 +550,9 @@ static irqreturn_t sx150x_irq_thread_fn(int irq, void *dev_id) if (err < 0) return IRQ_NONE; + if (!val) + return IRQ_NONE; + err = regmap_write(pctl->regmap, pctl->data->reg_irq_src, val); if (err < 0) return IRQ_NONE; |
