Skip to content

Commit ae35d65

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: button: Add a debug message when we're sending a LID event
I've been debugging some spurious suspend issues on various devices, at least on some devices these spurious suspends are caused by surious LID closed events being send to userspace. Running e.g. evemu-record after noticing a spurious suspend is too late to detect that a LID closed event it the (probable) cause of this. This commit adds an acpi_handle_debug call to help debugging this. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 50c4c4e commit ae35d65

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/acpi/button.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
210210
}
211211
/* Send the platform triggered reliable event */
212212
if (do_update) {
213+
acpi_handle_debug(device->handle, "ACPI LID %s\n",
214+
state ? "open" : "closed");
213215
input_report_switch(button->input, SW_LID, !state);
214216
input_sync(button->input);
215217
button->last_state = !!state;

0 commit comments

Comments
 (0)