Re: [PATCH] gpio: pca953x: Preserve wakeup accounting on parent IRQ failure

From: Geert Uytterhoeven

Date: Mon Oct 19 2026 - 02:59:40 EST


On Sun, 18 Oct 2026 at 18:10, Sahaj Chaudhari <sahaj123.sc@xxxxxxxxx> wrote:
> pca953x_irq_set_wake() updates wakeup_path before asking the parent
> IRQ controller to change its wake state. If irq_set_irq_wake() fails,
> the IRQ core rolls back its wake state but the driver's counter remains
> changed.
>
> A failed enable can therefore leave the expander marked as part of the
> wakeup path when no child IRQ has successfully enabled wakeup. A failed
> disable can make the driver stop retaining power even though wakeup is
> still enabled. The suspend and resume paths use this counter to decide
> whether to disable or enable the regulator.
>
> Update wakeup_path only after the parent operation succeeds, leaving it
> unchanged on error.
>
> Fixes: f70fbc15bae2 ("gpio: pca953x: Configure wake-up path when wake-up is enabled")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Sahaj Chaudhari <sahaj123.sc@xxxxxxxxx>

My bad...
Fixes: f70fbc15bae2c89f ("gpio: pca953x: Configure wake-up path when
wake-up is enabled")
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds