Date: Wed, 10 Dec 2014 02:06:28 +0100 From: Dan Lukes <dan@obluda.cz> Cc: "freebsd-acpi@freebsd.org" <freebsd-acpi@freebsd.org> Subject: Re: ENXIOing non-present battery Message-ID: <54879C94.1090800@obluda.cz> In-Reply-To: <5486D326.5080708@freebsd.org> References: <54840781.70603@freebsd.org> <CAJ-Vmokzdep71ty_ctvAEQSDvCsOQj15wQ8p96%2B3fCBtr8dvYg@mail.gmail.com> <54862F5E.4040909@freebsd.org> <CAJ-Vmo=c0f06JYs%2BK1GvCYjoSWdYqm3z_uti=6f6qEirQQ7Vzw@mail.gmail.com> <5486D326.5080708@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54879C94.1090800>