Re: [PATCH v2 1/2] ACPI: button: Add a debug message when we're sending a LID event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, November 22, 2017 4:06:11 PM CET Hans de Goede wrote:
> 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@xxxxxxxxxx>
> ---
> Changes in v2:
> -Use acpi_handle_debug instead of pr_info
> ---
>  drivers/acpi/button.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> 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)
>  	}
>  	/* 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;
> 

Both this and the [2/2] applied, thanks!


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux