[patch] pmu patch
Richard Hughes
ee21rh at surrey.ac.uk
Tue Feb 1 12:05:08 PST 2005
On Tue, 01 Feb 2005 19:52:46 +0100, Sjoerd Simons wrote:
> Attached path enabled hal to read the various sensors and battery
> information on apple machines.
Wow, nice one Sjoerd!
> The biggest issue is that you i really need to get all the pmu battery
> information in one read to ensure sane information (i guess acpi does
> need this too, but it doesn't right now).
Does it matter if there is a race? Is it likely?
> Other issues, battery.charge_level.maximum_specified is mandatory (i
> can't
Set maximum_specified = maximum_real?
or should we just remove maximum_specified, and just have:
battery.charge_level.maximum
> get that info with pmu) but battery.charge_level.maximum_real is
> available (which i can get).. battery.charge_level.unit can be set to
> a physical unit, but isn't it better to agree it's always a certain
> uni (always mWh for example and let hal do the conversion instead of
> requiring every app to do it)
I would say we should standardise on mWh, as I've never seen any other
representation of charge for batteries +1
> There is no key for remaining time, the kernel knows how to calculate
> this for pmu and apm (dunno about acpi).. Would be usefull to create a
> key for
Not keen on this idea. Booting this laptop with APM says I have 58 minutes
remaining, whilst booting with ACPI says I have over an hour and a half.
All a bit fishy if you ask me.
> The code also reads the sensors avaible from the thermal control units
> modern apple laptops and powermacs have (maybe others too, dunno)..
> I've placed it in pmu file too, although it isn't really a pmu thing..
Cool, maybe we should merge the power bits first tho... just until it all
settles out a bit.
> Biggest problem i'm seeing here with there is no key indicated for the
> value (i'm using system.sensor.value in my code currently). And there
> is no indication in which units these are. Imho it's best to choose
> standard units and let hal do the conversion when needed, just so
> higher leven applications don't have to do this..
+1, although I don't think David will agree... :-)
> So after all this now for the fun part, a screenshot:
> http://luon.net/~sjoerd/hal/hal_cpu_temperature.png
Right. From now on all patches MUST have an screen-shot. They rock.
> The keyboard light sensor and lid button stuff for which i need
> callouts will hopefully come later this week.
Cheers Sjoerd,
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