diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2021-10-18 15:17:24 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-11-03 19:03:55 +0100 |
commit | b340c7d6f619ad63d1896a6debceea1de3a78f29 (patch) | |
tree | 46d3bc3da58a46e1d5638f49fc08414a06ff6deb /drivers/acpi | |
parent | c0d6586afa3546a3d148cf4b9d9a407b4f79d0bb (diff) |
ACPI: scan: Obtain device's desired enumeration power state
Store a device's desired enumeration power state in struct
acpi_device_power during acpi_device object's initialisation.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index dce2c291b982..a50f1967c73d 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1017,6 +1017,7 @@ static void acpi_bus_init_power_state(struct acpi_device *device, int state) static void acpi_bus_get_power_flags(struct acpi_device *device) { + unsigned long long dsc = ACPI_STATE_D0; u32 i; /* Presence of _PS0|_PR0 indicates 'power manageable' */ @@ -1038,6 +1039,9 @@ static void acpi_bus_get_power_flags(struct acpi_device *device) if (acpi_has_method(device->handle, "_DSW")) device->power.flags.dsw_present = 1; + acpi_evaluate_integer(device->handle, "_DSC", NULL, &dsc); + device->power.state_for_enumeration = dsc; + /* * Enumerate supported power management states */ |