Colin Percival wrote:
> The hald code uses hw.acpi.battery.units to see how many batteries there are, 
> then reads the _BIF data via ioctl; the "state"
> isn't even in _BIF.

ACPI specification 3.0a par. 10.2.1 :

 -------------
... Unlike most other devices, when a battery is inserted or removed
from the system, the device itself (the battery bay) is still considered
to be present in the system. For most systems, the _STA for this device
will always return a value with bits 0-3 set and will toggle bit 4 to
indicate the actual presence of a battery (see section 6.3.7, "_STA
[Status]"). When this insertion or removal occurs, the AML code handler
for this event should issue a Notify(battery_device, 0x81) to indicate
that the static battery information has changed. For systems that have
battery slots in a docking station or batteries that cannot be
surprise-removed, it may be beneficial or necessary to indicate that the
entire device has been removed. In this case, the standard methods and
notifications described in section 6.3, "Device Insertion, Removal, and
Status Objects," should be used.
 -------------

It seems that hald is broken as it doesn't handle properly both cases.
It should query bit 4 of _STA.

Dan


_______________________________________________
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"

Reply via email to