Adding PMU and ACPI into HAL

Richard Hughes ee21rh at surrey.ac.uk
Mon Jan 10 10:50:07 PST 2005


On Mon, 10 Jan 2005 11:41:41 -0500, David Zeuthen wrote:

> Not necessarily using the info.bus property - yes, hal-device-manager
> right
> now complains if it's not set but we might fix that later. The reason I
> don't
> want the info.bus = acpi is that ACPI isn't really a bus.

I thought you might say that.

What about info.bus = 'logical'

> 
> Anyway, I think we agree. Could it simply look like this:
> 
>  info.bus = 'unknown' # for good measure until h-d-m is fixed
>  info.udi = '/org/freedesktop/Hal/devices/acpi_proc_acpi_button_lid'
>  info.capabilities = 'acpi_button system system.button'
>  acpi_button.linux.path = '/proc/acpi/button/lid'
>  system.button.type = lid
>  system.button.has_state = TRUE
>  system.button.state.value = FALSE

Good for me.

Where's acpi_button.linux.path come from? Surely this would be needed for
all acpi objects.
What about acpi.linux.path?

> 
>> 2. A device file (e.g. battery_device.c) is used to populate the HAL tree
>> with a battery object. 
> 
> You want to have the Linux ACPI bits in hald/linux/acpi.c and make
> osspec.c
> call some functions to read off the data.

Sure I'll start reading lots of code... :-)

> 
>> 3. An addon is launched for the duration of the battery to update the
>> battery charge level. (when the addon code hits CVS...)
>> 
> 
> Right - we'll have a device information match the acpi_battery and merge
> the properties with the paths for the addon.. 
> 
> In general the do's and dont's for hald is this: You should only read
> files
> in /sys and /proc from the hald process and never open a device file.

Okay, as I planned.

> Things
> that require the device file for hardware detection needs to be
> contained
> in a single binary that hald launches (not necessarily an addon). I've
> got
> this for input devices in my local tree that I will commit soon (sorry,

Can you expand on this more? Do you mean for PMU? I know nothing about
this, so I guess it's more relevant for Sjoerd to provide a /dev/pmu ->
HAL interface using a external binary. But I know nothing of pmu other
than it is supposed to be a character device!
ACPI should need no such thing, or am I mis-understanding you?

> I keep saying this..)

No worries, I'm not even close to needing it yet

> 
> I think the former idea is the way to go.

I'm glad you said that. :-)

Thanks, Richard


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



More information about the Hal mailing list