lkml.org 
[lkml]   [2009]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question about userspace-consumer
Hi!

> On Mon, Aug 10, 2009 at 10:58:01PM +0100, Mark Brown wrote:
> > On Mon, Aug 10, 2009 at 11:05:54PM +0300, Felipe Balbi wrote:
> >
> > > I was reading userspace-consumer file ad was wondering whether would be
> > > possible to use that in order to implement what SBS-IF [1] proposes
> > > using sbs-enabled devices.
> >
> > Looking at that I'm not sure why you wish to push this into user space?
>
> we need some daemon monitoring battery statuses and taking actions on
> that. Imagine, for example, usb charging where we can:
>
> a. charge up to 100mA when unconfigured
> b. charge up to 500mA when configured
> c. charge up to 2.5A when with dedicated charger
> d. charge up to 2.5mA when bus is suspended
>
> handling all of those cases on kernel space seems a little bit odd,
> especially because we still need to take care of state-of-charge,
> pack temperature, time-to-charge, etc etc etc.
>
> a big looping polling for that stuff in kernel space didn't seem ok to
> me.

As battery charging is done by hw on many common machines... yes it is
okay to do in kernel.

> > Like I say, from a quick read through of the specs I'm not sure that I'd
> > push this into user space but I've not thought about this deeply and may
> > be missing something.
>
> I think kernel should, as long as possible, only provide functionalities
> for userland to take decisions and actions, no ?
>
> Handling policy in kernel space I find it a little odd, specially
> because different manufacturers might have different charging algorithms
> they want to implement.

I don't see what policy you see in battery charging. There is
basically single battery chemistry in use, so this is not as complex
as you paint it...

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2009-08-15 18:23    [W:0.119 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site