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>] [day] [month] [year] [list]
Date:	Wed, 14 Mar 2012 02:01:09 +0000 (GMT)
From:	ÇÔ¸íÁÖ <myungjoo.ham@...sung.com>
To:	Anton Vorontsov <cbouatmailru@...il.com>,
	"dirk.brandewie@...il.com" <dirk.brandewie@...il.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	¹Ú°æ¹Î <kyungmin.park@...sung.com>,
	"Jason.Wortham@...im-ic.com" <Jason.Wortham@...im-ic.com>,
	"bruce.e.robertson@...el.com" <bruce.e.robertson@...el.com>,
	Karol Lewandowski <k.lewandowsk@...sung.com>
Subject: Re: Re: [PATCH 5/5] max17042: Change capacity property to use reported
 SOC register

Anton Vorontsov<cbouatmailru@...il.com>, 2012-03-14 03:34 (GMT+09:00)
> On Tue, Jan 24, 2012 at 09:26:08AM -0800, dirk.brandewie@...il.com wrote:
> > From: Dirk Brandewie 
> > 
> > The SOC register (0dh) reports the state of charge before empty
> > compensation adjustments are applied.  The max value reported by this
> > register will decrease as the battery ages.
> > 
> > Use the RepSOC register (06h) to report the capacity of the
> > battery. RepSOC contains a filtered version of the battery capacity
> > after empty compensation adjustments have been applied.
> > 
> > Reported-by: Gary Keyes 
> > 
> > Signed-off-by: Dirk Brandewie 
> > ---
> >  drivers/power/max17042_battery.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
> > index 6e96b58..2194278 100644
> > --- a/drivers/power/max17042_battery.c
> > +++ b/drivers/power/max17042_battery.c
> > @@ -160,7 +160,7 @@ static int max17042_get_property(struct power_supply *psy,
> >   break;
> >   case POWER_SUPPLY_PROP_CAPACITY:
> >   val->intval = max17042_read_reg(chip->client,
> > - MAX17042_SOC) / 256;
> > + MAX17042_RepSOC) / 256;
> 
> Applied. But I don't get it: PROP_CAPACITY should report
> percents! And it looks that it reports something very
> different.

The 8 most significant bits show values in percents. The least 8 bits show 1/256 percents.

> 
> Also, if you look down the file, you'll see this:
> 
>         case POWER_SUPPLY_PROP_CHARGE_FULL:

I've just sent a patch to correct this problem: "max17042: fix CHARGE_FULL representation."



Cheers!
MyungJoo

--
MyungJoo Ham (ÇÔ¸íÁÖ), PHD
System S/W Lab, S/W Platform Team, Software Center
Samsung Electronics
Cell: +82-10-6714-2858

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ