]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ACPI: button: Add a debug message when we're sending a LID event
authorHans de Goede <hdegoede@redhat.com>
Wed, 22 Nov 2017 15:06:11 +0000 (16:06 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 13 Dec 2017 00:05:01 +0000 (01:05 +0100)
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 <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/button.c

index bf8e4d371fa70bb3962687319771cf0978b2808e..aac81f40e28e05817692b293986373d36cacf56b 100644 (file)
@@ -210,6 +210,8 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
        }
        /* Send the platform triggered reliable event */
        if (do_update) {
+               acpi_handle_debug(device->handle, "ACPI LID %s\n",
+                                 state ? "open" : "closed");
                input_report_switch(button->input, SW_LID, !state);
                input_sync(button->input);
                button->last_state = !!state;