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>
This commit is contained in:
Tsz Shan Chan 2026-08-05 15:55:15 +10:00 committed by Linus Walleij
parent cda114315f
commit c04957d2fc

View File

@ -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;