freebsd-dev/sys/i386/acpica
Nate Lawson 76f6fe4f31 Rewrite the acpi_battery interface to allow for other battery types
(i.e., smart battery) and fix various bugs found during the cleanup.

API changes:
* kernel access:
Access to individual batteries is now via devclass_find("battery").
Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and
ACPI_BATT_GET_INFO (for _BIF-formatted data).  The helper function
acpi_battery_get_battinfo() now takes a device_t instead of a unit #
argument.  If dev is NULL, this signifies all batteries.

* ioctl access:
The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been
removed.  Since there is now no need for a mapping between "virtual" unit
and physical unit, usermode programs can just specify the unit directly and
skip the old translation steps.  In fact, acpiconf(8) was actually already
doing this and virtual unit was the same as physical unit in all cases
since there was previously only one battery type (acpi_cmbat).  Additionally,
we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all
batteries, if they provide the associated methods.

* apm compatibility device/ioctls:  no change
* sysctl:  no change

Since most third-party applications use the apm(4) compat interface, there
should be very few affected applications (if any).

Reviewed by:	bruno
MFC after:	5 days
2005-07-23 19:36:00 +00:00
..
acpi_machdep.c Rewrite the acpi_battery interface to allow for other battery types 2005-07-23 19:36:00 +00:00
acpi_wakecode.S Pick up the selectors to use for various kernel segments from assym.s 2005-04-22 09:53:04 +00:00
acpi_wakeup.c netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
genwakecode.sh Only export defined symbols. Note that I couldn't find any difference 2004-12-12 06:59:14 +00:00
madt.c Remove support for mixed mode altogether now that we no longer use IRQ 0 2005-04-14 17:59:58 +00:00
Makefile Use headers from the kernel source tree rather than installed headers. 2004-04-13 13:43:11 +00:00
OsdEnvironment.c Make unnecessary globals static and remove unused includes. 2004-05-06 02:18:58 +00:00