pinctrl: amd: disable and mask interrupts on probe
authorSachi King <nakato@nakato.io>
Sat, 9 Oct 2021 03:32:40 +0000 (14:32 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 18:48:19 +0000 (19:48 +0100)
commit9a52798dce738020cef7e89ab3bbe5dee5f69a43
treef0248cd8ca5e84acd9dffa3ab76959295dafee3a
parent01c2881bb0e0a71b87ca425e1b763ac13855aa7e
pinctrl: amd: disable and mask interrupts on probe

commit 4e5a04be88fe335ad5331f4f8c17f4ebd357e065 upstream.

Some systems such as the Microsoft Surface Laptop 4 leave interrupts
enabled and configured for use in sleep states on boot, which cause
unexpected behaviour such as spurious wakes and failed resumes in
s2idle states.

As interrupts should not be enabled until they are claimed and
explicitly enabled, disabling any interrupts mistakenly left enabled by
firmware should be safe.

Signed-off-by: Sachi King <nakato@nakato.io>
Link: https://lore.kernel.org/r/20211009033240.21543-1-nakato@nakato.io
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/pinctrl-amd.c