summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-12-02 08:04:57 +0000
committernjl <njl@FreeBSD.org>2004-12-02 08:04:57 +0000
commite2200548dce3a1d13f76ceedad42ce9930c5bab1 (patch)
tree12af6384a564c54470b9aacacdfa74557524a98a
parent833856a52126d07eeee6cfca7da12b06953be833 (diff)
downloadFreeBSD-src-e2200548dce3a1d13f76ceedad42ce9930c5bab1.zip
FreeBSD-src-e2200548dce3a1d13f76ceedad42ce9930c5bab1.tar.gz
Add the ACPI_PWR_FOR_SLEEP method. It takes a device and outputs the
appropriate power (Dx) state, if the BIOS suggests one. MFC after: 3 weeks
-rw-r--r--sys/dev/acpica/acpi_if.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_if.m b/sys/dev/acpica/acpi_if.m
index 7365d9c..48a060a 100644
--- a/sys/dev/acpica/acpi_if.m
+++ b/sys/dev/acpica/acpi_if.m
@@ -109,6 +109,26 @@ METHOD ACPI_STATUS evaluate_object {
};
#
+# Get the highest power state (D0-D3) that is usable for a device when
+# suspending/resuming. If a bus calls this when suspending a device, it
+# must also call it when resuming.
+#
+# device_t bus: parent bus for the device
+#
+# device_t dev: check this device's appropriate power state
+#
+# int *dstate: if successful, contains the highest valid sleep state
+#
+# Returns: 0 on success, ESRCH if device has no special state, or
+# some other error value.
+#
+METHOD int pwr_for_sleep {
+ device_t bus;
+ device_t dev;
+ int *dstate;
+};
+
+#
# Rescan a subtree and optionally reattach devices to handles. Users
# specify a callback that is called for each ACPI_HANDLE of type Device
# that is a child of "dev".
OpenPOWER on IntegriCloud