This is a note to let you know that I've just added the patch titled pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume() to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pinctrl-stm32-use-valid-pin-identifier-in-stm32_pinctrl_resume.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From c370bb474016ab9edfdabd7c08a88dd13a71ddbd Mon Sep 17 00:00:00 2001 From: Fabien Dessenne <fabien.dessenne@xxxxxxxxxxx> Date: Fri, 8 Oct 2021 14:25:17 +0200 Subject: pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume() From: Fabien Dessenne <fabien.dessenne@xxxxxxxxxxx> commit c370bb474016ab9edfdabd7c08a88dd13a71ddbd upstream. When resuming from low power, the driver attempts to restore the configuration of some pins. This is done by a call to: stm32_pinctrl_restore_gpio_regs(struct stm32_pinctrl *pctl, u32 pin) where 'pin' must be a valid pin value (i.e. matching some 'groups->pin'). Fix the current implementation which uses some wrong 'pin' value. Fixes: e2f3cf18c3e2 ("pinctrl: stm32: add suspend/resume management") Signed-off-by: Fabien Dessenne <fabien.dessenne@xxxxxxxxxxx> Link: https://lore.kernel.org/r/20211008122517.617633-1-fabien.dessenne@xxxxxxxxxxx Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/pinctrl/stm32/pinctrl-stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -1645,8 +1645,8 @@ int __maybe_unused stm32_pinctrl_resume( struct stm32_pinctrl_group *g = pctl->groups; int i; - for (i = g->pin; i < g->pin + pctl->ngroups; i++) - stm32_pinctrl_restore_gpio_regs(pctl, i); + for (i = 0; i < pctl->ngroups; i++, g++) + stm32_pinctrl_restore_gpio_regs(pctl, g->pin); return 0; } Patches currently in stable-queue which might be from fabien.dessenne@xxxxxxxxxxx are queue-5.10/pinctrl-stm32-use-valid-pin-identifier-in-stm32_pinctrl_resume.patch