HAL ACPI Addon

David Zeuthen david at fubar.dk
Sun Feb 27 13:08:23 PST 2005


On Sun, 2005-02-27 at 19:25 +0000, Richard Hughes wrote:
>Now at present the acpi addon doesn't do much at all, excluding putting
>the acpi event data onto stdout. Presumably the data can be parsed:
>
>battery BAT1 00000080 00000001
>UDI=../devices/acpi_BAT1
>ac_adapter ADP1 00000080 00000000
>UDI=../devices/acpi_ADP1
>processor CPU0 00000080 00000000
>UDI=../devices/acpi_CPU0
>and so forth...
>
>so it's trivial to find the UDI from the acpi event.

Yes, we can use the naming convention defined in hald/linux2/acpi.c to
infer that the UDI must be /org/freedesktop/Hal/devices/acpi_%s :-)

> Do we want the addon
>to parse the input (and copy the rules from acpi.c) or to signal to hald
>to refresh the device? I'm not sure what the plan was on this, or what
>state the code is in for refreshing objects. 

Right, the code isn't done yet - patches are welcome :-)

At least on my system I don't get the BAT%d ACPI events that often so I
think we should poll from inside the hal daemon for battery status.

Regarding button and ac_adapter events, the addon should catch those and
either send a DeviceCondition event (for buttons) or invoke Rescan() -
for the former, we need to expose DeviceConditions in libhal which means
a patch for libhal/libhal.[ch] and hald/hald_dbus.c is needed.

David


_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list