Skip to content

Commit d63f11c

Browse files
superm1Bartosz Golaszewski
authored andcommitted
gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode
commit 1796f80 ("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: 1796f80 ("HID: i2c-hid: acpi: Stop setting wakeup_capable") Fixes: b38f2d5 ("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 <[email protected]> Tested-by: Nathan Smythe <[email protected]> Suggested-by: Raul Rangel <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 2241ab5 commit d63f11c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpio/gpiolib-acpi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,8 @@ int acpi_dev_gpio_irq_wake_get_by(struct acpi_device *adev, const char *name, in
11041104
dev_dbg(&adev->dev, "IRQ %d already in use\n", irq);
11051105
}
11061106

1107-
if (wake_capable)
1107+
/* avoid suspend issues with GPIOs when systems are using S3 */
1108+
if (wake_capable && acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)
11081109
*wake_capable = info.wake_capable;
11091110

11101111
return irq;

0 commit comments

Comments
 (0)