1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/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
amd64 Fallout from the previous revision: lnc isn't quite ready for amd64 yet. 2005-07-22 16:02:40 +00:00
arm
boot Make code match comment: make the smallest unit of page allocation 2005-07-22 23:22:29 +00:00
bsm
cam
coda
compat
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
ddb
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
geom Comment typo 2005-07-20 18:08:16 +00:00
gnu
i4b
i386 Rewrite the acpi_battery interface to allow for other battery types 2005-07-23 19:36:00 +00:00
ia64
isa
isofs/cd9660
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
netatm
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
netipx
netkey
netnatm Remove FreeBSD 2.2 protocol usrreq compatibility code. 2005-07-19 13:36:39 +00:00
netncp
netsmb
nfs
nfs4client
nfsclient Remove the NFS client rslock. The rslock was used to serialize 2005-07-21 22:46:56 +00:00
nfsserver
opencrypto
pc98 MFi386: revision 1.1204. 2005-07-21 11:13:12 +00:00
pccard
pci - Use the PCIR_BAR() macro rather than hardcoding rids. 2005-07-21 16:43:07 +00:00
posix4
powerpc
rpc
security Remove duplicate initialization of mpo_create_stub pointer. 2005-07-21 17:17:51 +00:00
sparc64
sys Oops, bump __FreeBSD_version to mark shared library version bump. 2005-07-23 16:42:54 +00:00
tools
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