FIX ac_adaptor.present for *really* broken BIOS (Was: Question re
on battery vs on mains)
Richard Hughes
hughsient at gmail.com
Tue Aug 2 01:44:05 PDT 2005
On Tue, 2005-08-02 at 09:02 +0100, Richard Hughes wrote:
> HAL only does the 30 second fallback reading for battery.type = primary.
> This needs to be fixed.
First part of the fix attached.
For ChangeLog:
hald/linux2/acpi.c (ac_adapter_refresh_poll): New function, just set the
present key. This is quicker than setting the capability and category on
every forced refresh.
(ac_adapter_refresh): Use ac_adapter_refresh_poll and while we are here,
add device_property_atomic_update_begin and
device_property_atomic_update_end to make atomic.
(acpi_poll): Add the ac_adapter updates to make sure we get the value of
ac_adapter correct at least on every 30 second forced refresh. This
fixes really broken ACPI BIOS's that don't emit acad or batt events.
I'll fix the fairly common "no acad events, yes bat events" case this
afternoon, but this patch is a bit more involved.
David, please check and commit.
Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-acadap-refresh-on-battery-01.diff
Type: text/x-patch
Size: 2937 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050802/f3a3a95e/hal-acadap-refresh-on-battery-01.bin
-------------- next part --------------
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list