ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS`
PATCH v2 1/1 ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS`
From: Mario Limonciello <[email protected]>
commit a7e23ec17feec ("ACPI: button: Install notifier for system events as well") modified the ACPI button behavior to send ACPI_BUTTON_NOTIFY_WAKE events. This caused a regression on a "Dell Optiplex 3040" sending KEY_POWER randomly at runtime.
Adjust logic so that the event ACPI_BUTTON_NOTIFY_WAKE will never send KEY_POWER.
---
Cc: Yijun Shen <[email protected]>
Cc: Richard Gong <[email protected]>
v2:
* Handle logic change for avoiding KEY_POWER all the time
--- drivers/acpi/button.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/button.c +1 -1
@@ -458,7 +458,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)acpi_pm_wakeup_event (&device->dev); button =acpi_driver_data (device); -if (button->suspended) +if (button->suspended || event ==ACPI_BUTTON_NOTIFY_WAKE )return ; input = button->input;
Signature · 1 line
2.43.0
Downloaded the build Justin did on Koji, looks good after 24 hours, no bugus events.
--
Ian Laurie
FAS: nixuser | IRC: nixuser
TZ: Australia/Sydney
Quoted 5 lines · Ian Laurie
Downloaded the build Justin did on Koji, looks good after 24 hours, no bugus events.
Tested-by Ian Laurie <[email protected]>
Applied as 6.15-rc material, thanks!