summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-08-02 13:26:02 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-08-08 12:32:51 +0300
commitee8193ee96c7802b5ba766243c4c950059a43323 (patch)
treec33254352b737c909f0229dc3ad3fe95dedc7499 /drivers/acpi
parente21a712a9685488f5ce80495b37b9fdbe96c230d (diff)
downloadlinux-ee8193ee96c7802b5ba766243c4c950059a43323.tar.xz
ACPI: PM: Print debug messages on device power state changes
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 <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/device_pm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index f616b16c1f0b..4cb93d4f2ab6 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -166,6 +166,10 @@ int acpi_device_set_power(struct acpi_device *device, int state)
|| (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. */