]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: amd: Disable and mask interrupts on resume
authorKornel Dulęba <korneld@chromium.org>
Mon, 20 Mar 2023 09:32:59 +0000 (09:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:53 +0000 (12:10 +0200)
commit38957aa01d330673b547d7434e94f21286cd89e2
tree0dee48e8fc808a08d486f08682bffeabc3ac1966
parentc611462b6c47a5f13581153a1797a43143798cde
pinctrl: amd: Disable and mask interrupts on resume

commit b26cd9325be4c1fcd331b77f10acb627c560d4d7 upstream.

This fixes a similar problem to the one observed in:
commit 816953918453 ("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: 0157ab7c3d6d ("pinctrl: add AMD GPIO driver support.")
Signed-off-by: Kornel Dulęba <korneld@chromium.org>
Link: https://lore.kernel.org/r/20230320093259.845178-1-korneld@chromium.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/pinctrl-amd.c