From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Richard Hughes <hughsient@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-kernel@vger.kernel.org, devel@laptop.org,
sfr@canb.auug.org.au, len.brown@intel.com, greg@kroah.com,
David Zeuthen <davidz@redhat.com>
Subject: Re: Battery class driver.
Date: Tue, 24 Oct 2006 13:41:27 +1000 [thread overview]
Message-ID: <1161661288.10524.542.camel@localhost.localdomain> (raw)
In-Reply-To: <1161633509.4994.16.camel@hughsie-laptop>
> No, I think the distinction between batteries and ac_adapter is large
> enough to have different classes of devices. You may have many
> batteries, but you'll only ever have one ac_adapter. I'm not sure it's
> an obvious abstraction to make.
No you won't :) You can have several power supplies, you can have UPS
too, and limited power budget depending on the "status" of these things
(for example, on some blades, we slow things down when one of the power
supply fails to limit our load on the remaining one(s), though that's
currently done outside of linux).
Ben.
> > > Comments?
>
> How are battery change notifications delivered to userspace? I know acpi
> is using the input layer for buttons in the future (very sane IMO), so
> using sysfs events for each property changing would probably be nice.
>
> Comments on your patch:
>
> > +#define BAT_INFO_TEMP2 (2) /* °C/1000 */
> Temperature expressed in degrees C/1000? - what if the temperature goes
> below 0? What about just using mK (kelvin / 1000) - I don't know what is
> used in the kernel elsewhere tho. Also, are you allowed the ° sign in
> kernel source now?
>
> > +#define BAT_INFO_CURRENT (6) /* mA */
> Can't this also be expressed in mW according to the ACPI spec?
>
> > +#define BAT_STAT_FIRE (1<<7)
> I know there is precedent for "FIRE" but maybe CRITICAL or DANGER might
> be better chosen words. We can reserve the word FIRE for when the faulty
> battery really is going to explode...
>
> Richard.
>
> > > commit 42fe507a262b2a2879ca62740c5312778ae78627
> > > Author: David Woodhouse <dwmw2@infradead.org>
> > > Date: Mon Oct 23 18:14:54 2006 +0100
> > >
> > > [BATTERY] Add support for OLPC battery
> > >
> > > Signed-off-by: David Woodhouse <dwmw2@infradead.org>
> > >
> > > commit 6cbec3b84e3ce737b4217788841ea10a28a5e340
> > > Author: David Woodhouse <dwmw2@infradead.org>
> > > Date: Mon Oct 23 18:14:14 2006 +0100
> > >
> > > [BATTERY] Add initial implementation of battery class
> > >
> > > I really don't like the sysfs interaction, and I don't much like the
> > > internal interaction with the battery drivers either. In fact, there
> > > isn't much I _do_ like, but it's good enough as a straw man.
> > >
> > > Signed-off-by: David Woodhouse <dwmw2@infradead.org>
>
next prev parent reply other threads:[~2006-10-24 3:41 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1161628327.19446.391.camel@pmac.infradead.org>
2006-10-23 19:18 ` Battery class driver Dan Williams
2006-10-23 19:58 ` Richard Hughes
2006-10-23 20:10 ` Roland Dreier
2006-10-23 20:48 ` David Woodhouse
2006-10-24 3:44 ` Benjamin Herrenschmidt
2006-10-24 17:18 ` Richard Hughes
2006-10-25 7:42 ` [PATCH v2] " David Woodhouse
2006-10-25 9:54 ` Shem Multinymous
2006-10-25 12:11 ` David Woodhouse
2006-10-25 14:42 ` Shem Multinymous
2006-10-25 22:25 ` David Woodhouse
2006-10-25 23:39 ` Shem Multinymous
2006-10-28 12:15 ` David Woodhouse
2006-10-28 13:22 ` Richard Hughes
2006-10-28 14:34 ` Shem Multinymous
2006-10-28 14:36 ` David Woodhouse
2006-10-28 14:55 ` David Zeuthen
2006-10-28 18:52 ` Pavel Machek
2006-10-28 19:48 ` David Zeuthen
2006-10-28 21:10 ` Pavel Machek
2006-10-28 15:09 ` David Zeuthen
2006-10-28 15:31 ` David Zeuthen
2006-10-28 18:12 ` Shem Multinymous
2006-10-31 7:49 ` Greg KH
2006-10-31 13:28 ` Shem Multinymous
2006-11-01 19:31 ` Greg KH
2006-11-01 19:53 ` Shem Multinymous
2006-11-01 20:53 ` Greg KH
2006-11-01 23:55 ` [ltp] " Henrique de Moraes Holschuh
2006-11-02 3:45 ` Greg KH
2006-11-02 17:49 ` Bill Davidsen
2006-11-02 19:19 ` Richard Hughes
2006-11-02 21:20 ` Pavel Machek
2006-11-03 12:46 ` Henrique de Moraes Holschuh
2006-11-03 15:13 ` Stefan Seyfried
2006-11-02 22:01 ` Pavel Machek
2006-11-03 13:12 ` U Kuehn
2006-11-05 20:52 ` Pavel Machek
2006-11-05 21:02 ` Jean Delvare
2006-11-01 21:27 ` Pavel Machek
2006-11-01 21:32 ` Richard Hughes
2006-10-31 7:59 ` Jean Delvare
2006-10-31 13:42 ` Shem Multinymous
2006-10-31 13:51 ` Xavier Bestel
2006-10-31 14:06 ` Shem Multinymous
2006-11-01 13:26 ` Richard Hughes
2006-11-01 13:54 ` David Woodhouse
2006-11-01 14:36 ` Henrique de Moraes Holschuh
2006-11-01 16:36 ` Shem Multinymous
2006-11-01 16:55 ` Henrique de Moraes Holschuh
2006-11-01 19:30 ` Greg KH
2006-11-02 7:52 ` Jean Delvare
2006-11-02 8:39 ` Richard Hughes
2006-11-02 13:54 ` Henrique de Moraes Holschuh
2006-11-02 17:52 ` Bill Davidsen
2006-11-02 19:26 ` Richard B. Johnson
2006-11-03 13:23 ` Henrique de Moraes Holschuh
2006-11-03 14:20 ` Richard B. Johnson
2006-11-03 16:10 ` [ltp] " Henrique de Moraes Holschuh
2006-10-28 18:55 ` Pavel Machek
2006-10-28 19:53 ` David Zeuthen
2006-10-28 21:05 ` Pavel Machek
2006-10-28 21:54 ` Henrique de Moraes Holschuh
2006-10-26 9:55 ` [ltp] " FeRD
2006-10-28 5:12 ` Pavel Machek
2006-10-24 3:41 ` Benjamin Herrenschmidt [this message]
2006-10-23 18:20 David Woodhouse
2006-10-23 18:26 ` Matthew Garrett
2006-10-23 18:30 ` David Woodhouse
2006-10-24 3:36 ` Benjamin Herrenschmidt
2006-10-23 18:30 ` Greg KH
2006-10-23 18:32 ` Greg KH
2006-10-23 18:50 ` David Woodhouse
2006-10-24 3:39 ` Benjamin Herrenschmidt
2006-10-23 21:04 ` Jean Delvare
2006-10-23 22:15 ` David Zeuthen
2006-10-23 22:59 ` Greg KH
2006-10-24 1:31 ` David Zeuthen
2006-10-24 3:04 ` Shem Multinymous
2006-10-24 2:56 ` Shem Multinymous
2006-10-24 3:27 ` Matthew Garrett
2006-10-24 3:48 ` Benjamin Herrenschmidt
2006-10-24 3:53 ` Matthew Garrett
2006-10-24 5:43 ` Benjamin Herrenschmidt
2006-10-24 11:09 ` Shem Multinymous
2006-10-24 2:04 ` Shem Multinymous
2006-10-25 10:45 ` Pavel Machek
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=1161661288.10524.542.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=davidz@redhat.com \
--cc=dcbw@redhat.com \
--cc=devel@laptop.org \
--cc=dwmw2@infradead.org \
--cc=greg@kroah.com \
--cc=hughsient@gmail.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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