summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpivar.h
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2001-10-26 17:43:05 +0000
committeriwasaki <iwasaki@FreeBSD.org>2001-10-26 17:43:05 +0000
commit1b24a8aa4e560f424c368bcc1fa8037f4773cea2 (patch)
tree21b123760e3f3009d3682b32acb590e02ad68027 /sys/dev/acpica/acpivar.h
parent5cf7b5f41f4236d42751f1ffbb7c54d5160772ca (diff)
downloadFreeBSD-src-1b24a8aa4e560f424c368bcc1fa8037f4773cea2.zip
FreeBSD-src-1b24a8aa4e560f424c368bcc1fa8037f4773cea2.tar.gz
Add APM compatibility feature to ACPI.
This emulates APM device node interface APIs (mainly ioctl) and provides APM services for the applications. The goal is to support most of APM applications without any changes. Implemented ioctls in this commit are: - APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl) - APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl) - APMIO_GETINFO and APMIO_GETINFO_OLD - APMIO_GETPWSTATUS With above, many APM applications which get batteries, ac-line info. and transition the system into suspend/standby mode (such as wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-) Reviewed by: arch@, audit@ and some guys
Diffstat (limited to 'sys/dev/acpica/acpivar.h')
-rw-r--r--sys/dev/acpica/acpivar.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 566afc4..2fc0f89 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -57,6 +57,9 @@ struct acpi_softc {
int acpi_sleep_button_sx;
int acpi_lid_switch_sx;
+ int acpi_standby_sx;
+ int acpi_suspend_sx;
+
bus_dma_tag_t acpi_waketag;
bus_dmamap_t acpi_wakemap;
vm_offset_t acpi_wakeaddr;
@@ -303,6 +306,7 @@ extern char *acpi_name(ACPI_HANDLE handle);
extern int acpi_avoid(ACPI_HANDLE handle);
extern int acpi_disabled(char *subsys);
+extern int acpi_machdep_init(device_t dev);
extern void acpi_install_wakeup_handler(struct acpi_softc *sc);
extern int acpi_sleep_machdep(struct acpi_softc *sc, int state);
@@ -310,11 +314,22 @@ extern int acpi_sleep_machdep(struct acpi_softc *sc, int state);
* Battery Abstruction.
*/
struct acpi_battinfo;
+struct acpi_battdesc;
extern int acpi_battery_register(int, int);
+extern int acpi_battery_get_battinfo(int, struct acpi_battinfo *);
+extern int acpi_battery_get_units(void);
+extern int acpi_battery_get_battdesc(int, struct acpi_battdesc *);
+
extern int acpi_cmbat_get_battinfo(int, struct acpi_battinfo *);
/*
+ * AC adapter interface.
+ */
+
+extern int acpi_acad_get_acline(int *);
+
+/*
* System power API.
*
* XXX should this be further generalised?
OpenPOWER on IntegriCloud