Ideas for spec for PMU/ACPI, Was: Patch to hal-spec : 1/6-pmu-acpi

Richard Hughes ee21rh at surrey.ac.uk
Mon Jan 17 09:50:19 PST 2005


On Mon, 17 Jan 2005 11:59:15 -0500, David Zeuthen wrote:
>> <row>
>>   <entry><literal>linux.pmu_firmware_version</literal> (string)</entry>
>>   <entry>example: 0c</entry>
>>   <entry>No</entry>
>>   <entry>PMU firmware version</entry>
>> </row>
>> ...
>> 
>> With this idea we could have a battery addon that polls the battery keys,
>> which is common between ACPI and PMU. All the addons would be interface
>> neutral. 
> I'm not really that concerned how the specific ACPI and PMU properties
> look like; something that works and is documented is of course nice, but
> at the end of the day, the interesting parts for consumers of this
> is really the system.* properties; I mean, if applications start caring
> whether something is PMU or ACPI we've failed to provide a suitable
> abstraction.

Sure, but my way *is* suggesting the system.stuff is ACPI and PMU neutral
- it's just they will require acpi and pmu specifics for the addon code:

Applications would query:

hal-get-property 
 --udi device=/org/freedesktop/Hal/devices/batery_1
 --key battery.charge_level.current

And the battery polling code would read :
hal-get-property 
 --udi device=/org/freedesktop/Hal/devices/batery_1
 --key linux.procfs_path
and then update 
hal-set-property 
 --udi device=/org/freedesktop/Hal/devices/batery_1
 --key battery.charge_level.current
 --int VALUE_OF{linux.procfs_path}

Therefore the application is ACPI/PMU neutral, with a shared polling addon
that either queries linux.procfs_path or linux.pmu_device.

> On the point of common battery polling code, I don't really think
> this is useful as an addon should really be a small piece of code
> reading stuff and populating the appropriate properties. I could
> be wrong though.

Have i got the wrong idea on how the addon code is inheriting properties
from the devices?

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