OLPC battery class
Richard Hughes
hughsient at gmail.com
Tue Jun 19 11:57:44 EDT 2007
On Tue, 2007-06-19 at 23:36 +0800, David Woodhouse wrote:
> On Tue, 2007-06-19 at 16:29 +0100, Richard Hughes wrote:
> > No worries, I'm glad I sent the email before I wrote the HAL code! ;-)
>
> Sorry, I thought you were already aware of the new tree. Note the uevent
> stuff I added recently -- feedback on that would be welcome. I'm about
> to actually hook it up and make it trigger when AC is applied/removed
> and when there's a 1% change in the battery charge percentage.
Yes, that would be good.
> > Okay, apologies if I've got stroppy prematurely. Can I use the APM
> > driver for testing on my laptop (when acpi=off)?
>
> I'm not sure. It might be only for the 'APM emulation' used on other
> platforms, not real APM where you call into the APM BIOS.
I'll give it a go tonight.
> > > > * Why is the AC adapter exported as a battery of type ac? This is simply
> > > > wrong, they are _completely_ different types of device.
> > >
> > > No. They're _both_ power supplies. They can both have measurements of
> > > voltage, current, temperature, etc. The external input is just like an
> > > infinite battery.
> >
> > Hmm. I'm not completely convinced (are there any ac adapters that report
> > temperature current or voltage?)
>
> I don't have any. They certainly exist in high-end machines though. And
> even when they _don't_ have the temp/current/voltage measurements,
> they're _still_ just another power supply, with fewer of the optional
> extra properties. Having an entirely separate 'class' of devices just
> for them is a lot of duplication for no real reason.
Okay, but are they still under /sys/class/battery/ tho?
> > but I'll give the cbou tree a go and see how it works.
>
> If you actually have an XO to test on, then use the one from
> ~dwmw2/battery2-2.6 instead -- it solves an EC locking issue. And I'll
> be putting the one with updated EC access there soon too.
Yes I do - but I don't fancy compiling a new image for the B3
considering the high chance of me getting it wrong :-)
Is there any chance you can stick the code into a new kernel rpm for me
pls?
Thanks,
Richard.
More information about the Devel
mailing list