]> git.ipfire.org Git - thirdparty/linux.git/commit
ACPI: scan: Use acpi_setup_gpe_for_wake() for buttons
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 10 Jan 2026 11:58:38 +0000 (12:58 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 15 Jan 2026 13:27:38 +0000 (14:27 +0100)
commit57c31e6d620f132dcf610b2c52b4cdbd203c6f4a
treec8a97bc0dcdde43b01b4fbe2e9dec105c42add35
parent88fad6ce090b395af4c654594a54589a386bf24b
ACPI: scan: Use acpi_setup_gpe_for_wake() for buttons

After starting to use platform devices for representing buttons
enumerated via ACPI, acpi_mark_gpe_for_wake() is insufficient for
preparing their GPEs to wake up the system from sleep because it
does not change the "dispatch type" of the given GPE to
ACPI_GPE_DISPATCH_NOTIFY.  Subsequently, this causes acpi_enable_gpe()
in __acpi_device_wakeup_enable() to fail and system suspend transitions
to be aborted.

Address this by updating acpi_wakeup_gpe_init() to use
acpi_setup_gpe_for_wake() for buttons like for any other devices.

This allows acpi_setup_gpe_for_wake() to be simplified further because
buttons are not a special case in it any more, so do that as well.

Fixes: 52d864019636 ("ACPI: button: Convert the driver to a platform one")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Xi Pardee <xi.pardee@linux.intel.com>
Link: https://patch.msgid.link/2259694.irdbgypaU6@rafael.j.wysocki
drivers/acpi/scan.c