1
0
Fork 0

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>
alistair/sunxi64-5.4-dsi
Rafael J. Wysocki 2019-08-02 12:26:02 +02:00
parent e21a712a96
commit ee8193ee96
1 changed files with 4 additions and 0 deletions

View File

@ -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. */