aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-11-22 10:06:11 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-12-12 19:05:01 -0500
commitae35d656d796fa203787455ce59874c6682dc0cf (patch)
tree3258a13f5d91169daac43203e9f51fc191efe40c
parent50c4c4e268a2d7a3e58ebb698ac74da0de40ae36 (diff)
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 <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/button.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index bf8e4d371fa7..aac81f40e28e 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -210,6 +210,8 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
210 } 210 }
211 /* Send the platform triggered reliable event */ 211 /* Send the platform triggered reliable event */
212 if (do_update) { 212 if (do_update) {
213 acpi_handle_debug(device->handle, "ACPI LID %s\n",
214 state ? "open" : "closed");
213 input_report_switch(button->input, SW_LID, !state); 215 input_report_switch(button->input, SW_LID, !state);
214 input_sync(button->input); 216 input_sync(button->input);
215 button->last_state = !!state; 217 button->last_state = !!state;