]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
pinctrl: amd: Fix wakeups when IRQ is shared with SCI
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 8 Dec 2021 21:14:59 +0000 (14:14 -0700)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:20 +0000 (09:49 +0100)
commit670f3b164ed350a1f7296ce996c169d367a0dbb9
tree8e5977564f0ae20f2c82edfac50ff6b7233b71a0
parentc5aec66e9ae2a228502771b7f314183d83b1f1f7
pinctrl: amd: Fix wakeups when IRQ is shared with SCI

BugLink: https://bugs.launchpad.net/bugs/1953540
On some Lenovo AMD Gen2 platforms the IRQ for the SCI and pinctrl drivers
are shared.  Due to how the s2idle loop handling works, this case needs
an extra explicit check whether the interrupt was caused by SCI or by
the GPIO controller.

To fix this rework the existing IRQ handler function to function as a
checker and an IRQ handler depending on the calling arguments.

BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1738
Reported-by: Joerie de Gram <j.de.gram@gmail.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Link: https://lore.kernel.org/r/20211101014853.6177-2-mario.limonciello@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 2d54067fcd23aae61e23508425ae5b29e973573d)
Signed-off-by: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/pinctrl/pinctrl-amd.c