ACPI/PMU procfs HAL test program. Version 003.

Paul Ionescu i_p_a_u_l at yahoo.com
Tue Jan 25 23:35:59 PST 2005


Hi,

On Tue, 25 Jan 2005 23:32:18 +0000, Richard Hughes wrote:
> Changes from 002:
> 
> * More glib support with standard function calls. * Make procfs_getvalue
> accept "value:    hello" and "value    : hello" for PMU use. (Thanks
> Sjoerd...)
> * ibm kernel extension support. (Thanks Paul...) * /proc/* files are now
> cached into a linked list, and only read once, plus multiple files can be
> read into the linked list too. * All the applicable functions now accept a
> linked-list. * files are now broken apart into procfs.c (loader),
> procfs_acpi.c, procfs_pmu.c and procfs_common.c - this means patches
> should be simpler. * Pauls patch for short-circuiting reading the battery
> values. * Sjoerd's new code for buffering and the beginnings of proper PMU
> support.

Cool

> 
> To-Do:
> * Ideas for merging into the HAL head codebase are welcome. * Polling
> frequency variables, and whether to poll at all.

We can do polling, but we should be able to disable polling if user wants
it. But the polling should not be enabled/disabled for all.
Some users may need polling for fan speed but not for battery, and
for battery they rely on acpi battery events.

> WiP. * SmartBattery
> support. Does anyone have such a thing on their laptop? *

If not here, we can find some people with SmartBattery on acpi.devel list.

> Make code
> modules more generic. WiP
> 
> Files are at here:
> 
> http://hughsie.no-ip.com/write/hal/procfs-hal-003/
> 
> Comments as usual please.
> 
> Richard

on my laptop i have:

[13]capability  system.battery
[13]set_string  info.bus,       unknown
[13]set_string  info.udi,       /org/freedesktop/Hal/devices/battery_0
[13]capability  linux.acpi
[13]set_string  linux.acpi.procfs_path, /proc/acpi/battery/BAT1
[13]set_string  info.product,   Battery
[13]set_bool    system.battery.present, FALSE
* callout_device *
* new_device *
[14]capability  system.battery
[14]set_string  info.bus,       unknown
[14]set_string  info.udi,       /org/freedesktop/Hal/devices/battery_1
[14]capability  linux.acpi
[14]set_string  linux.acpi.procfs_path, /proc/acpi/battery/BAT0
[14]set_string  info.product,   Battery
[14]set_bool    system.battery.present, TRUE
[14]set_bool    system.battery.is_rechargable,  TRUE
[14]set_string  system.battery.serial,  1681
[14]set_string  system.battery.model,   IBM-08K8193
[14]set_string  system.battery.type,    LION
[14]set_string  system.battery.vendor,  SANYO
[14]set_bool    system.battery.rechargeable.is_charging,        FALSE

Two things:

Dealing with end-users here, IMO would be better to start counting from 1
not from 0 (as programmers do), so we will have .../battery_1 and
.../battery_2

And the order in hal should try to match the order in system, ie bat0
whould be .../battery_1 and bat1 should be ..../battery_2. Right now, on
my system, they are in reverse order, as you can see above.


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



More information about the Hal mailing list