lkml.org 
[lkml]   [2010]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] power: bq20z75: Update return value of CURRENT NOW
From
Date
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@nvidia.com>
> > >
> > > Reviewed-by: Olof Johansson <olof@lixom.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



\
 
 \ /
  Last update: 2010-12-22 00:47    [W:0.062 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site