OSDN Git Service

pinctrl: amd: Fix wakeups when IRQ is shared with SCI
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 1 Nov 2021 01:48:53 +0000 (20:48 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 16 Nov 2021 01:19:14 +0000 (02:19 +0100)
commit2d54067fcd23aae61e23508425ae5b29e973573d
treef0f64fde59bf3b92eb7f318b2e2e4508d7a2c9ae
parente9380df851878cee71df5a1c7611584421527f7e
pinctrl: amd: Fix wakeups when IRQ is shared with SCI

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>
drivers/pinctrl/pinctrl-amd.c