Adding PMU and ACPI into HAL

Richard Hughes ee21rh at surrey.ac.uk
Sat Jan 8 08:28:57 PST 2005


Right, now there is some sort of agreement on the schema, now we have to
think about how we integrate parts of pmu and acpi into HAL.

HAL looks pretty sysfs-centric and I don't want to "bodge" a totally
different subsystem. I am asking all you experts for the proper way to do
this.

Assuming the addons feature works the way I imagine, I guessed the best
way to do ACPI/PMU would be:

1. HAL detects ACPI/PMU and registers a new bus (like it would for PCI) 
2. A device file (e.g. battery_device.c) is used to populate the HAL tree
with a battery object. 
3. An addon is launched for the duration of the battery to update the
battery charge level. (when the addon code hits CVS...)

OR

1. HAL detects ACPI (presence of /proc/acpi) or PMU (presence of /dev/pmu)
2. Launches an addon, lets say acpi_helper 
3. The addon uses /proc/acpi/ac_adaptor+button+battery information to
populate the HAL tree with extra nodes such as ac_adaptor. (is this
possible?) 
4. The addon continues to monitor /proc/acpi/ for any changes in battery
level, button status etc.

If you have better ideas, or ideas that fit more into the HAL model then
please post them here.

Richard

-- 

http://www.hughsie.com/PUBLIC-KEY


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



More information about the Hal mailing list