-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ACPI / PM: Expose power states of ACPI devices to user space
Make it possible to retrieve the current power state of a device with ACPI power management from user space via sysfs by adding two new attributes, power_state and real_power_state, to the sysfs directory associated with the struct acpi_device object representing the device's ACPI node. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Rafael J. Wysocki
committed
Jan 24, 2013
1 parent
cf860be
commit 836aedb
Showing
3 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
What: /sys/devices/.../power_state | ||
Date: January 2013 | ||
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
Description: | ||
The /sys/devices/.../power_state attribute is only present for | ||
device objects representing ACPI device nodes that provide power | ||
management methods. | ||
|
||
If present, it contains a string representing the current ACPI | ||
power state of the given device node. Its possible values, | ||
"D0", "D1", "D2", "D3hot", and "D3cold", reflect the power state | ||
names defined by the ACPI specification (ACPI 4 and above). | ||
|
||
If the device node uses shared ACPI power resources, this state | ||
determines a list of power resources required not to be turned | ||
off. However, some power resources needed by the device node in | ||
higher-power (lower-number) states may also be ON because of | ||
some other devices using them at the moment. | ||
|
||
This attribute is read-only. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
What: /sys/devices/.../real_power_state | ||
Date: January 2013 | ||
Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
Description: | ||
The /sys/devices/.../real_power_state attribute is only present | ||
for device objects representing ACPI device nodes that provide | ||
power management methods and use ACPI power resources for power | ||
management. | ||
|
||
If present, it contains a string representing the real ACPI | ||
power state of the given device node as returned by the _PSC | ||
control method or inferred from the configuration of power | ||
resources. Its possible values, "D0", "D1", "D2", "D3hot", and | ||
"D3cold", reflect the power state names defined by the ACPI | ||
specification (ACPI 4 and above). | ||
|
||
In some situations the value of this attribute may be different | ||
from the value of the /sys/devices/.../power_state attribute for | ||
the same device object. If that happens, some shared power | ||
resources used by the device node are only ON because of some | ||
other devices using them at the moment. | ||
|
||
This attribute is read-only. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters