freebsd-dev/sys
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
..
alpha Convert the atomic_ptr() operations over to operating on uintptr_t 2005-07-15 18:17:59 +00:00
amd64 Fallout from the previous revision: lnc isn't quite ready for amd64 yet. 2005-07-22 16:02:40 +00:00
arm Convert the atomic_ptr() operations over to operating on uintptr_t 2005-07-15 18:17:59 +00:00
boot Make code match comment: make the smallest unit of page allocation 2005-07-22 23:22:29 +00:00
bsm For consistency with more system include files, add a trailing '_' to 2005-05-29 16:11:34 +00:00
cam Fix the recent panics/LORs/hangs created by my kqueue commit by: 2005-07-01 16:28:32 +00:00
coda - Change all filesystems and vfs_cache to relock the dvp once the child is 2005-04-13 10:59:09 +00:00
compat Regen. 2005-07-13 20:35:09 +00:00
conf MFi386: add vpd driver (vital product data.. model & serial numbers etc) 2005-07-21 21:57:31 +00:00
contrib Prevent a race condition. As pf_send_tcp() - called for expired synproxy 2005-07-20 18:58:27 +00:00
crypto gbde(8) is also rejndael user. 2005-03-11 22:07:04 +00:00
ddb Implement functions calls from within DDB on ia64. On ia64 a function 2005-07-02 23:52:37 +00:00
dev Rewrite the acpi_battery interface to allow for other battery types 2005-07-23 19:36:00 +00:00
doc
fs Correct devfs ruleset bypass. 2005-07-20 13:34:16 +00:00
gdb check return value of gdb_rx_varhex 2005-03-28 18:31:18 +00:00
geom Comment typo 2005-07-20 18:08:16 +00:00
gnu Repair this: 2005-07-09 18:30:31 +00:00
i4b Fix some long standing bugs in writing to the BPF device attached to 2005-06-26 18:11:11 +00:00
i386 Rewrite the acpi_battery interface to allow for other battery types 2005-07-23 19:36:00 +00:00
ia64 Convert the atomic_ptr() operations over to operating on uintptr_t 2005-07-15 18:17:59 +00:00
isa Fixup some more fallout from the lapic/i8254 changes: 2005-07-13 15:43:21 +00:00
isofs/cd9660 - Change all filesystems and vfs_cache to relock the dvp once the child is 2005-04-13 10:59:09 +00:00
kern Eliminate inconsistency in the setting of the B_DONE flag. Specifically, 2005-07-20 19:06:06 +00:00
libkern Temporary restore a part of rev 1.6. 2005-07-23 16:52:57 +00:00
modules Remove conditional code that has largely rotted that is also not on by 2005-07-21 16:40:08 +00:00
net Allocate one of the spare ifnet integer fields to hold if_drv_flags, 2005-07-21 22:01:06 +00:00
net80211 the AREF flag is only meaningful in ap mode; adhoc neighbors now 2005-07-23 00:16:46 +00:00
netatalk Eliminate MAC entry point mac_create_mbuf_from_mbuf(), which is 2005-07-05 23:39:51 +00:00
netatm Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
netgraph Fix missing '=' in structure initialization. 2005-07-23 19:28:51 +00:00
netinet Misc spelling and/or English fixes in comments. 2005-07-23 00:59:13 +00:00
netinet6 always copy ip6_pktopt. remove needcopy and needfree 2005-07-21 16:39:23 +00:00
netipsec Correct typo in a comment describing vshiftl(). 2005-06-02 23:56:10 +00:00
netipx Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
netkey
netnatm Remove FreeBSD 2.2 protocol usrreq compatibility code. 2005-07-19 13:36:39 +00:00
netncp avoid potential null ptr derefs 2005-02-23 22:44:38 +00:00
netsmb lockmgr(...,LK_DRAIN,...) requires a balancing LK_RELEASE: recent 2005-05-13 11:27:48 +00:00
nfs Fixes for NFS crashes on architectures that require strict alignment. 2005-07-14 20:08:27 +00:00
nfs4client - We want if (mrep != NULL) not if (m_freem != NULL). m_freem will never 2005-04-25 05:11:19 +00:00
nfsclient Remove the NFS client rslock. The rslock was used to serialize 2005-07-21 22:46:56 +00:00
nfsserver NFS write gathering defers execution of NFS server write requests to wait 2005-04-17 16:25:36 +00:00
opencrypto malloc.h relies on param.h for a definition of MAXCPU. I guess that there is 2005-05-30 05:01:44 +00:00
pc98 MFi386: revision 1.1204. 2005-07-21 11:13:12 +00:00
pccard Change a directory layout for pc98. 2005-05-10 12:02:18 +00:00
pci - Use the PCIR_BAR() macro rather than hardcoding rids. 2005-07-21 16:43:07 +00:00
posix4 Introduce MAC Framework and MAC Policy entry points to label and control 2005-05-04 10:39:15 +00:00
powerpc Convert the atomic_ptr() operations over to operating on uintptr_t 2005-07-15 18:17:59 +00:00
rpc - Don't call rpcclnt_realign() if we don't have any mbufs to realign. 2005-03-19 01:16:25 +00:00
security Remove duplicate initialization of mpo_create_stub pointer. 2005-07-21 17:17:51 +00:00
sparc64 Convert the atomic_ptr() operations over to operating on uintptr_t 2005-07-15 18:17:59 +00:00
sys Oops, bump __FreeBSD_version to mark shared library version bump. 2005-07-23 16:42:54 +00:00
tools Allow EVFILT_VNODE events to work on every filesystem type, not just 2005-06-09 20:20:31 +00:00
ufs Eliminate inconsistency in the setting of the B_DONE flag. Specifically, 2005-07-20 19:06:06 +00:00
vm Eliminate inconsistency in the setting of the B_DONE flag. Specifically, 2005-07-20 19:06:06 +00:00
Makefile When building cscopnamefile, default architecture to ${MACHINE}, not i386. 2005-03-08 00:09:41 +00:00