Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7b02ccea authored by Chen Yu's avatar Chen Yu Committed by Rafael J. Wysocki
Browse files

ACPI / PM: Enable all wakeup GPEs in suspend-to-idle

Currently, in suspend-to-idle, wakeup GPE for PCI devices are
handled properly because acpi_pci_sleep_wake() invokes acpi_enable_gpe()
to enable the wakeup GPE directly. But for the other wakeup-capable
devices in ACPI bus, acpi_enable_wakeup_devices() should be invoked
to update enable_for_wake mask in gpe_register_info structure, thus
acpi_enable_all_wakeup_gpes() can enable the wakeup GPE referred in
_PRW methods. And acpi_disable_wakeup_devices() will be called
before disable_irq_wake() in acpi_freeze_restore() to restore the mask.

This patch fixes a power button wakeup problem on Surface Pro 3,
on which platform power button uses EC to deliver event
(EC GPE is referred in _PRW).

Note: enabling EC GPE during freeze state may bring some risks
because EC events are expected to fire more frequently than others.
Thus it may bring the system out of freeze state unnecessarily.
(We already have comments about this in bugzilla)

Link: https://bugzilla.kernel.org/show_bug.cgi?id=84651


Reported-and-tested-by: default avatarEthan Schoonover <es@ethanschoonover.com>
Tested-by: default avatarPeter Amidon <psa.pub.0@picnicpark.org>
Tested-by: default avatarYani Ioadnnou <yani.ioannou@gmail.com>
Tested-by: default avatarMister Wardrop <mister.wardrop@gmail.com>
Tested-by: default avatarAnton Anikin <anton@anikin.name>
Tested-by: default avatarKeith McClelland <zismylaptop@gmail.com>
Reviewed-by: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarChen Yu <yu.c.chen@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b8ee2978
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment