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] [day] [month] [year] [list]
Date:	Tue, 21 Dec 2010 15:41:15 -0800
From:	rklein <rklein@...dia.com>
To:	Anton Vorontsov <cbouatmailru@...il.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Chew <AChew@...dia.com>, Olof Johansson <olof@...om.net>
Subject: Re: [PATCH 1/1] power: bq20z75: Update return value of CURRENT NOW

On Tue, 2010-12-21 at 15:22 -0800, Anton Vorontsov wrote:
> On Mon, Dec 20, 2010 at 04:54:22PM -0800, rklein wrote:
> > On Tue, 2010-12-14 at 19:04 -0800, Olof Johansson wrote:
> > > On Tue, Dec 14, 2010 at 05:01:25PM -0800, rklein wrote:
> > > > The BQ20Z75 will return a negative value for current if the battery is
> > > > discharging and a positive value if charging. This should always be
> > > > exported
> > > > as a positive number.
> > > >
> > > > Signed-off-by: Rhyland Klein <rklein@...dia.com>
> > > 
> > > Reviewed-by: Olof Johansson <olof@...om.net>
> > > 
> > > -Olof
> > 
> > Anton, is this patch ok to get put in?
> 
> I'm not sure. Probably not. Why would you think that the current
> should always be positive? For ds2760 it isn't, for example.
> If some driver assumes always positive current, I think it should
> be fixed instead.
> 
> If the battery is discharging, let it be negative. That's what
> happens on wires anyway. :-)
> 

That makes sense to me, I will propose the change to the sw that was
expecting the positive value.

-rhyland

--
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