lkml.org 
[lkml]   [2010]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] power/ds2760_battery: make charge_now and charge_full writeable
On Tue, May 11, 2010 at 07:28:59PM +0200, Daniel Mack wrote:
[...]
> > 1. Could you at least change this back to
> > POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, so it'll be clear what
> > exactly this prop is actually changing, and
>
> Do you see any other way to store the actual rated capacity (not the one
> the battery had in its good days) inside the chip?

In that case it should be indeed POWER_SUPPLY_PROP_CHARGE_FULL,
which is full_active_uAh, which we get from di->raw[DS2760_ACTIVE_FULL]
and di->raw[DS2760_ACTIVE_FULL + 1].

We fall back to deriving it from rated_capacity if full_active
is 0 (your case?):

/* If the full_active_uAh value is not given, fall back to the rated
* capacity. This is likely to happen when chips are not part of the
* battery pack and is therefore not bootstrapped. */
if (di->full_active_uAh == 0)
di->full_active_uAh = di->rated_capacity / 1000L;

So, you probably want to make DS2760_ACTIVE_FULL writable, not
DS2760_RATED_CAPACITY.

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


\
 
 \ /
  Last update: 2010-05-12 10:35    [W:0.227 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site