public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Shem Multinymous <multinymous@gmail.com>,
	David Zeuthen <davidz@redhat.com>,
	Richard Hughes <hughsient@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Dan Williams <dcbw@redhat.com>,
	linux-kernel@vger.kernel.org, devel@laptop.org,
	sfr@canb.auug.org.au, len.brown@intel.com,
	benh@kernel.crashing.org,
	linux-thinkpad mailing list <linux-thinkpad@linux-thinkpad.org>,
	Pavel Machek <pavel@suse.cz>, Jean Delvare <khali@linux-fr.org>
Subject: Re: [ltp] Re: [PATCH v2] Re: Battery class driver.
Date: Wed, 1 Nov 2006 19:45:08 -0800	[thread overview]
Message-ID: <20061102034508.GA30730@kroah.com> (raw)
In-Reply-To: <20061101235540.GA11581@khazad-dum.debian.net>

On Wed, Nov 01, 2006 at 08:55:40PM -0300, Henrique de Moraes Holschuh wrote:
> On Wed, 01 Nov 2006, Greg KH wrote:
> > On Wed, Nov 01, 2006 at 09:53:12PM +0200, Shem Multinymous wrote:
> > > Hi Greg,
> > > 
> > > On 11/1/06, Greg KH <greg@kroah.com> wrote:
> > > >> The suggestions so far were:
> > > >> 1. Append units string to the content of such attribute:
> > > >>   /sys/.../capacity_remaining reads "16495 mW".
> > > >> 2. Add a seprate *_units attribute saying what are units for other
> > > >> attribute:
> > > >>   /sys/.../capacity_units gives the units for
> > > >>   /sys/.../capacity_{remaining,last_full,design,min,...}.
> > > >> 3. Append the units to the attribute names:
> > > >>   capacity_{remaining,last_full,design_min,...}:mV.
> > > >
> > > >No, again, one for power and one for current.  Two different files
> > > >depending on the type of battery present.  That way there is no need to
> > > >worry about unit issues.
> > > 
> > > I'm missing something. How is that different from option 3 above?
> > 
> > No silly ":mV" on the file name.
> 
> As long as that also means no "silly _mV" in the name.  However, if the
> choice is between :mV and _mV, please go with :mV.

Neither should be in the name.

Again, people, look how we already do this in the kernel today with the
hwmon drivers.  They all just document the units and that's it.  No
problems.

> > > BTW, please note that we're talking about a large set of files that
> > > use these units (remaining, last full, design capacity, alarm
> > > thresholds, etc.), and not just a single attribute.
> > 
> > Sure, what's wrong with:
> > 	capacity_remaining_power
> > 	capacity_last_full_power
> > 	capacity_design_min_power
> > if you can read that from the battery, and:
> > 	capacity_remaining_current
> > 	capacity_last_full_current
> > 	capacity_design_min_current
> > if you can read that instead.
> 
> Well, "Wh" measures energy and not power, and "Ah" measures electric charge
> and not current, so it would be better to make that:
> 
> capacity_*_energy  (Wh-based)
> 
> and
> 
> capacity_*_charge  (Ah-based)

Ok, that's fine with me.

> Also, should we go with mWh/mAh, or with even smaller units because of the
> tiny battery-driven devices of tomorrow?

Well, what do the tiny battery-driven devices of today provide (like the
Nokia 770, other cell phones, smart hand-helds, etc.)  Those should give
you a good idea if that would be needed or not.

thanks,

greg k-h

  reply	other threads:[~2006-11-02  3:45 UTC|newest]

Thread overview: 66+ 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 [this message]
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

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=20061102034508.GA30730@kroah.com \
    --to=greg@kroah.com \
    --cc=benh@kernel.crashing.org \
    --cc=davidz@redhat.com \
    --cc=dcbw@redhat.com \
    --cc=devel@laptop.org \
    --cc=dwmw2@infradead.org \
    --cc=hmh@hmh.eng.br \
    --cc=hughsient@gmail.com \
    --cc=khali@linux-fr.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-thinkpad@linux-thinkpad.org \
    --cc=multinymous@gmail.com \
    --cc=pavel@suse.cz \
    --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