summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_acad.c
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2002-03-04 18:46:13 +0000
committeriwasaki <iwasaki@FreeBSD.org>2002-03-04 18:46:13 +0000
commit3f245d8dd193f05b337f1358ec6b33ed212f9cc1 (patch)
tree8012c8174b9cc8503bad897aec51d04ec2c4490b /sys/dev/acpica/acpi_acad.c
parent3fe10323bf98b7928a3f885f578ec703252ee6b7 (diff)
downloadFreeBSD-src-3f245d8dd193f05b337f1358ec6b33ed212f9cc1.zip
FreeBSD-src-3f245d8dd193f05b337f1358ec6b33ed212f9cc1.tar.gz
Add generalized power profile code.
This makes other power-management system (APM for now) to be able to generate power profile change events (ie. AC-line status changes), and other kernel components, not only the ACPI components, can be notified the events. - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c - call power_profile_set_state() also from APM driver when AC-line status changes - add call-back function for Crusoe LongRun controlling on power profile changes for a example
Diffstat (limited to 'sys/dev/acpica/acpi_acad.c')
-rw-r--r--sys/dev/acpica/acpi_acad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_acad.c b/sys/dev/acpica/acpi_acad.c
index 10fe39a..2c9daf9 100644
--- a/sys/dev/acpica/acpi_acad.c
+++ b/sys/dev/acpica/acpi_acad.c
@@ -37,6 +37,7 @@
#include <sys/ioccom.h>
#include <sys/malloc.h>
#include <sys/conf.h>
+#include <sys/power.h>
#include "acpi.h"
#include <dev/acpica/acpivar.h>
@@ -79,7 +80,7 @@ acpi_acad_get_status(void *context)
if (sc->status != newstatus) {
sc->status = newstatus;
/* set system power profile based on AC adapter status */
- powerprofile_set_state(sc->status ? POWERPROFILE_PERFORMANCE : POWERPROFILE_ECONOMY);
+ power_profile_set_state(sc->status ? POWER_PROFILE_PERFORMANCE : POWER_PROFILE_ECONOMY);
ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
"%s Line\n",(sc->status) ? "On" : "Off");
}
OpenPOWER on IntegriCloud