public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbou@mail.ru>
To: ian <spyro@f2s.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	Ondrej Zajicek <santiago@crfreenet.org>,
	dwmw2@infradead.org, linux-kernel@vger.kernel.org,
	kernel-discuss@handhelds.org
Subject: Re: [Kernel-discuss] Re: [PATCH 3/7] [RFC] Battery monitoring class
Date: Mon, 16 Apr 2007 07:12:56 +0400	[thread overview]
Message-ID: <20070416031256.GA30153@zarina> (raw)
In-Reply-To: <1176690774.29389.175.camel@wirenth>

On Mon, Apr 16, 2007 at 03:32:54AM +0100, ian wrote:
> On Sun, 2007-04-15 at 21:57 -0300, Henrique de Moraes Holschuh wrote:
> > 
> > No, that won't help much.  IMO, we want the sanest set of standard
> > attributes we can get, and weird as it might be, average reporting are
> > common properties of battery control firmware on laptops (maybe
> > because of SBS, but still...).
> 
> We need to think very carefully here.
> 
> charge, current, capacity, etc. are properties all batteries have, and
> the current values can all be sampled instantaneously.
> 
> funky values processed by 'black box' firmware are not universal
> properties of all batteries.
> 
> IOW, battery class should be for 'simple' battery types only.
> 
> perhaps rename it to simple battery class to make it distinct?
> 
> Userspace is the place to put the complications, in any case, and I see
> nothing wrong with having both a simple battery class AND other
> proprietary battery class an SBS battery class. (or a
> toshiba_proprietary_bios battery class or whatever).
> 
> Perhaps we need a 'libbattery.so' so that userspace can have a nice
> consistent interface?

Why? With current battery class we can do whatever everyone needs. No
need for wrappers.

Adding new properties is cheap and easy. Simple batteries using only
"simple" properties/attributes, and complicated batteries using
complicated attributes.

Because of your original design, simple batteries are stay simple, and
no noticing that there is some "complicated" attributes exists at all.
That's indeed great characteristic of that *universal* battery class.

For example, ds2760 is not really "simple" monitoring chip. ADC battery
is (it's in -hh tree so far). So, ds2760 is somewhere in between SBS
design, and dumb ADC batteries.

So, my another purposal, which I very like now:
Let's do self-documented properties. current_now, current_avg, e.t.c.
No more just "current", lets remove any ambiguousness!

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.org/bd2

  reply	other threads:[~2007-04-16  3:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 23:25 [PATCH 3/7] [RFC] Battery monitoring class Anton Vorontsov
2007-04-12  2:53 ` Randy Dunlap
2007-04-12 16:51   ` Anton Vorontsov
2007-04-12  3:43 ` Greg KH
2007-04-12 12:25   ` Henrique de Moraes Holschuh
2007-04-12 13:43   ` Anton Vorontsov
2007-04-12 13:08 ` Matthew Garrett
2007-04-12 14:15   ` Anton Vorontsov
2007-04-12 14:24     ` Matthew Garrett
2007-04-12 14:36       ` [Kernel-discuss] " Paul Sokolovsky
2007-04-12 18:56         ` Henrique de Moraes Holschuh
2007-04-12 20:44           ` Anton Vorontsov
2007-04-13  0:51             ` Henrique de Moraes Holschuh
2007-04-13  2:15               ` Anton Vorontsov
2007-04-24 19:36                 ` Pavel Machek
2007-04-13  2:34               ` Shem Multinymous
2007-04-13  2:36                 ` Anton Vorontsov
2007-04-13 13:51                   ` Henrique de Moraes Holschuh
2007-04-12 15:00 ` Shem Multinymous
2007-04-12 15:18   ` Anton Vorontsov
2007-04-12 17:23     ` Shem Multinymous
2007-04-13 13:49 ` Anton Vorontsov
2007-04-15  0:43   ` Anton Vorontsov
2007-05-04  9:59     ` Pavel Machek
2007-04-15 19:56 ` Pavel Machek
2007-04-15 22:10   ` [Kernel-discuss] " Anton Vorontsov
2007-04-15 22:08 ` Ondrej Zajicek
2007-04-15 22:50   ` Anton Vorontsov
2007-04-16  0:57     ` Henrique de Moraes Holschuh
2007-04-16  1:57       ` Anton Vorontsov
2007-04-16 14:34         ` Henrique de Moraes Holschuh
2007-04-16  2:32       ` [Kernel-discuss] " ian
2007-04-16  3:12         ` Anton Vorontsov [this message]
2007-04-16  8:28           ` ian

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=20070416031256.GA30153@zarina \
    --to=cbou@mail.ru \
    --cc=dwmw2@infradead.org \
    --cc=hmh@hmh.eng.br \
    --cc=kernel-discuss@handhelds.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=santiago@crfreenet.org \
    --cc=spyro@f2s.com \
    /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