Linux-ACPI Archive on
 help / color / Atom feed
* [PATCH] ACPI: PM: Print debug messages on device power state changes
@ 2019-08-02 10:26 Rafael J. Wysocki
  0 siblings, 0 replies; only message in thread
From: Rafael J. Wysocki @ 2019-08-02 10:26 UTC (permalink / raw)
  To: Linux ACPI; +Cc: Linux PM, LKML, Mika Westerberg

From: Rafael J. Wysocki <>

Add an acpi_handle_debug() statement to acpi_device_set_power() to
allow ACPI device power state changes to be tracked.

Signed-off-by: Rafael J. Wysocki <>
 drivers/acpi/device_pm.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux-pm/drivers/acpi/device_pm.c
--- linux-pm.orig/drivers/acpi/device_pm.c
+++ linux-pm/drivers/acpi/device_pm.c
@@ -166,6 +166,10 @@ int acpi_device_set_power(struct acpi_de
 	    || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3_COLD))
 		return -EINVAL;
+	acpi_handle_debug(device->handle, "Power state change: %s -> %s\n",
+			  acpi_power_state_string(device->power.state),
+			  acpi_power_state_string(state));
 	/* Make sure this is a valid target state */
 	/* There is a special case for D0 addressed below. */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 10:26 [PATCH] ACPI: PM: Print debug messages on device power state changes Rafael J. Wysocki

Linux-ACPI Archive on

Archives are clonable:
	git clone --mirror linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ \
	public-inbox-index linux-acpi

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox