Commit d50986e0 authored by Kornel Dulęba's avatar Kornel Dulęba Committed by sanglipeng
Browse files

pinctrl: amd: Disable and mask interrupts on resume

stable inclusion
from stable-v5.10.177
commit 25065ed83b5ffaada1768e0416c6e96fdb8da032
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=25065ed83b5ffaada1768e0416c6e96fdb8da032



--------------------------------

commit b26cd932 upstream.

This fixes a similar problem to the one observed in:
commit 4e5a04be ("pinctrl: amd: disable and mask interrupts on probe").

On some systems, during suspend/resume cycle firmware leaves
an interrupt enabled on a pin that is not used by the kernel.
This confuses the AMD pinctrl driver and causes spurious interrupts.

The driver already has logic to detect if a pin is used by the kernel.
Leverage it to re-initialize interrupt fields of a pin only if it's not
used by us.

Cc: stable@vger.kernel.org
Fixes: dbad75dd ("pinctrl: add AMD GPIO driver support.")
Signed-off-by: default avatarKornel Dulęba <korneld@chromium.org>
Link: https://lore.kernel.org/r/20230320093259.845178-1-korneld@chromium.org


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent af591e2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment