From: David Woodhouse <dwmw2@infradead.org>
To: Greg KH <greg@kroah.com>
Cc: Jean Delvare <khali@linux-fr.org>,
linux-kernel@vger.kernel.org, devel@laptop.org,
davidz@redhat.com, mjg59@srcf.ucam.org, len.brown@intel.com,
sfr@canb.auug.org.au, benh@kernel.crashing.org
Subject: Re: Battery class driver.
Date: Mon, 23 Oct 2006 19:50:15 +0100 [thread overview]
Message-ID: <1161629415.19446.397.camel@pmac.infradead.org> (raw)
In-Reply-To: <20061023183048.GA13804@kroah.com>
On Mon, 2006-10-23 at 11:30 -0700, Greg KH wrote:
> On Mon, Oct 23, 2006 at 07:20:33PM +0100, David Woodhouse wrote:
> > At git://git.infradead.org/battery-2.6.git there is an initial
> > implementation of a battery class, along with a driver which makes use
> > of it. The patch is below, and also viewable at
> > http://git.infradead.org/?p=battery-2.6.git;a=commitdiff;h=master;hp=linus
> >
> > I don't like the sysfs interaction much -- is it really necessary for me
> > to provide a separate function for each attribute, rather than a single
> > function which handles them all and is given the individual attribute as
> > an argument? That seems strange and bloated.
>
> It is, but no one has asked for it to be changed to be like the struct
> device attributes are. In fact, why not just use the struct device
> attributes here instead? That will be much easier and keep me from
> having to convert your code over to use it in the future :)
Heh, OK. I'll look at that. Thanks.
> > I'm half tempted to ditch the sysfs attributes and just use a single
> > seq_file, in fact.
>
> Ick, no. You should use the hwmon interface, and standardize on a
> proper battery api just like those developers have standardized on other
> sensor apis that are exported to userspace.
Er, yes. The whole point in this is so we can standardise on a proper
battery API. I'm only really supposed to be adding support for the
battery on the $100 laptop, but I just couldn't bring myself to do yet
another different battery driver without trying to bring in some sanity.
I sincerely hope that those responsible for the various other different
userspace interfaces for PMU, ACPI, etc. are all hanging their heads in
shame at this point :)
--
dwmw2
next prev parent reply other threads:[~2006-10-23 18:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
[not found] <1161628327.19446.391.camel@pmac.infradead.org>
2006-10-23 19:18 ` 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-24 3:41 ` Benjamin Herrenschmidt
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=1161629415.19446.397.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=benh@kernel.crashing.org \
--cc=davidz@redhat.com \
--cc=devel@laptop.org \
--cc=greg@kroah.com \
--cc=khali@linux-fr.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.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
all inboxes | Powered by JetHome®