From: Pavel Machek <pavel@ucw.cz>
To: Felipe Balbi <me@felipebalbi.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@slimlogic.co.uk>,
Mike Rapoport <mike@compulab.co.il>,
linux-kernel@vger.kernel.org
Subject: Re: Question about userspace-consumer
Date: Fri, 14 Aug 2009 18:31:38 +0200 [thread overview]
Message-ID: <20090814163138.GA1626@ucw.cz> (raw)
In-Reply-To: <20090811054438.GA7176@gandalf>
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
prev parent reply other threads:[~2009-08-15 16:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 20:05 Question about userspace-consumer Felipe Balbi
2009-08-10 21:58 ` Mark Brown
2009-08-11 5:44 ` Felipe Balbi
2009-08-11 9:40 ` Mark Brown
2009-08-11 10:30 ` Liam Girdwood
2009-08-11 20:49 ` Smart Battery System Design (was: Re: Question about userspace-consumer) Felipe Balbi
2009-08-11 20:59 ` Felipe Balbi
2009-08-11 22:36 ` Mark Brown
2009-08-12 6:47 ` Felipe Balbi
2009-08-12 10:05 ` Mark Brown
2009-08-12 19:07 ` Felipe Balbi
2009-08-12 22:53 ` Mark Brown
2009-08-14 16:32 ` Pavel Machek
2009-08-15 16:43 ` Mark Brown
2009-08-15 22:34 ` Pavel Machek
2009-08-16 9:18 ` Mark Brown
2009-08-22 9:28 ` Pavel Machek
2009-08-22 10:16 ` Mark Brown
2009-08-21 14:01 ` Pavel Machek
2009-08-22 14:16 ` Mark Brown
2009-08-22 19:35 ` Pavel Machek
2009-08-23 9:08 ` Mark Brown
2009-08-11 12:09 ` Question about userspace-consumer Mike Rapoport
2009-08-11 12:56 ` Mark Brown
2009-08-11 20:40 ` Felipe Balbi
2009-08-14 16:31 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090814163138.GA1626@ucw.cz \
--to=pavel@ucw.cz \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=me@felipebalbi.com \
--cc=mike@compulab.co.il \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox