lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Jan 2010 16:12:29 +0300
From:	Anton Vorontsov <avorontsov@...mvista.com>
To:	"Mahalingam, Nithish" <nithish.mahalingam@...el.com>
Cc:	"dwmw2@...radead.org" <dwmw2@...radead.org>,
	"cbou@...l.ru" <cbou@...l.ru>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
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@...il.com
irc://irc.freenode.net/bd2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ