Patch "gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpiolib-acpi-don-t-set-gpios-for-wakeup-in-s3-mode.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b063e295dfc6464dc2567c6911eece9f21d1afb7
Author: Mario Limonciello <mario.limonciello@xxxxxxx>
Date:   Sat Jan 21 07:48:11 2023 -0600

    gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode
    
    [ Upstream commit d63f11c02b8d3e54bdb65d8c309f73b7f474aec4 ]
    
    commit 1796f808e4bb ("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: 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable")
    Fixes: b38f2d5d9615c ("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@xxxxxxxxxxxx>
    Tested-by: Nathan Smythe <ncsmythe@xxxxxxxxxxxx>
    Suggested-by: Raul Rangel <rrangel@xxxxxxxxxxxx>
    Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
    Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index e2ab4d5253be..fa3de3c3010c 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -1080,7 +1080,8 @@ int acpi_dev_gpio_irq_wake_get_by(struct acpi_device *adev, const char *name, in
 				dev_dbg(&adev->dev, "IRQ %d already in use\n", irq);
 			}
 
-			if (wake_capable)
+			/* avoid suspend issues with GPIOs when systems are using S3 */
+			if (wake_capable && acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)
 				*wake_capable = info.wake_capable;
 
 			return irq;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux