lkml.org 
[lkml]   [2010]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] [PATCH] Adding Intel Moorestown PMIC Battery Driver
On Fri, Jan 15, 2010 at 05:31:55PM +0530, Mahalingam, Nithish wrote:
[...]
> >> + unsigned int batt_charge_now; /* in mAS */
> >> + unsigned int batt_prev_charge_full; /* in mAS */
> >> + unsigned int batt_charge_rate; /* in units per second */
> >
> > Per include/linux/power_supply.h and
> > Documentation/power/power_supply_class.txt
> >
> > * All voltages, currents, charges, energies, time and temperatures in uV,
> > * uA, uAh, uWh, seconds and tenths of degree Celsius unless otherwise
> > * stated. It's driver's job to convert its raw values to units in which
> > * this class operates.
>
> I just now checked the hardware spec and it is indeed mAh. I will correct
> the comment appropriately.

Note, if the hardware reports the values in mAh (milli), the driver
still have to convert them to uAh (micro) before reporting the values
to userspace.

[...]
> > I think you can use threaded irq for this.
> >
> > See documentation for request_threaded_irq() in kernel/irq/manage.c.
> > And as an example of usage see drivers/mfd/wm8350-irq.c.
>
> Haa that is useful information... completely missed to read about this
> feature.

No wonder, it's just a new feature, not many know about it. ;-)

Once again, thanks for the driver!

--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2


\
 
 \ /
  Last update: 2010-01-15 14:15    [from the cache]
©2003-2011 Jasper Spaans