Messages in this thread | | | Date | Fri, 15 Jan 2010 16:12:29 +0300 | From | Anton Vorontsov <> | Subject | Re: [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
| |