]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode
authorMario Limonciello <mario.limonciello@amd.com>
Sat, 21 Jan 2023 13:48:11 +0000 (07:48 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 07:06:34 +0000 (08:06 +0100)
commite639091fedb9464fdc4b2a149c79844ef0e66c0a
tree8a550be9d020bb2a67906160185749fbeba6efb2
parent6bfc3cb45ebf7137e417d26d81b55344658b3eed
gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode

[ Upstream commit 7ee15bde00c2e7cda4e5fed825fe5def57f11a62 ]

commit 7c174a16fac4 ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
adjusted the policy to enable wakeup by default if the ACPI tables
indicated that a device was wake capable.

It was reported however that this broke suspend on at least two System76
systems in S3 mode and two Lenovo Gen2a systems, but only with S3.
When the machines are set to s2idle, wakeup behaves properly.

Configuring the GPIOs for wakeup with S3 doesn't work properly, so only
set it when the system supports low power idle.

Fixes: 7c174a16fac4 ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
Fixes: 86e28f24938ab ("i2c: acpi: Use ACPI wake capability bit to set wake_irq")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2357
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2162013
Reported-by: Nathan Smythe <ncsmythe@scruboak.org>
Tested-by: Nathan Smythe <ncsmythe@scruboak.org>
Suggested-by: Raul Rangel <rrangel@chromium.org>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpiolib-acpi.c