lkml.org 
[lkml]   [2007]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/7] [RFC] Battery monitoring class
On Thu, Apr 12, 2007 at 02:08:18PM +0100, Matthew Garrett wrote:
> On Thu, Apr 12, 2007 at 03:25:03AM +0400, Anton Vorontsov wrote:
> > + * All voltages, currents, capacities and temperatures in mV, mA, mAh and
> > + * tenths of a degree unless otherwise stated. It's driver's job to convert
> > + * its raw values to which this class operates. If for some reason driver
> > + * can't afford this requirement, then it have to create its own attributes,
> > + * plus additional "XYZ_units" for each of them.
>
> ACPI batteries can report capacity and rate in either mA or mW. Given

You sure, capacity in mA? Then I don't know. But you can safely
fallback and create your own attribute (just as in David's battery class,
where every battery required to create its own attributes), plus create
capacity_units attribute. So, user space will know your driver's specific
units.

> the lack of a constant voltage, how do you accurately convert between
> the two? Right now, I think this is a loss of functionality over the
> current situation.


>
> --
> Matthew Garrett | mjg59@srcf.ucam.org

--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.org/bd2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-12 16:21    [W:0.248 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site