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]
Message-ID: <20160112215352.GA5248@amd>
Date:	Tue, 12 Jan 2016 22:53:52 +0100
From:	Pavel Machek <pavel@....cz>
To:	"Andrew F. Davis" <afd@...com>
Cc:	pali.rohar@...il.com, sre@...ian.org, sre@...g0.de,
	kernel list <linux-kernel@...r.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-omap@...r.kernel.org, tony@...mide.com, khilman@...nel.org,
	aaro.koskinen@....fi, ivo.g.dimitrov.75@...il.com,
	patrikbachan@...il.com, serge@...lyn.com, a.hajda@...sung.com
Subject: Re: /sys/class/power_supply/bq27200-0/capacity changed meaning
 between 4.1 and 4.4?

Hi!

> >>If not, tell me, and I can do it, but it will involve a lot of swaring...
> >
> >I'll give it a look over.
> 
> OK, I'm still looking for a test setup, but this was definitely a problem,
> could you give this a try?:

Well, search no more. I tested it and seems to work ok. There's one
more blank line in the source, so I had to apply patch by hand.

Tested-by: Pavel Machek <pavel@....cz>
Acked-by: Pavel Machek <pavel@....cz>
Reported-by: Pavel Machek <pavel@....cz>
Cc: stable@...r.kernel.org

? :-).

And... thanks!
									Pavel

> diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
> index 880233c..4fec3cf 100644
> --- a/drivers/power/bq27xxx_battery.c
> +++ b/drivers/power/bq27xxx_battery.c
> @@ -470,8 +470,9 @@ static inline int bq27xxx_read(struct bq27xxx_device_info *di, int reg_index,
>  static int bq27xxx_battery_read_soc(struct bq27xxx_device_info *di)
>  {
>  	int soc;
> +	bool single = di->chip == BQ27000 || di->chip == BQ27010;
> -	soc = bq27xxx_read(di, BQ27XXX_REG_SOC, false);
> +	soc = bq27xxx_read(di, BQ27XXX_REG_SOC, single);
>  	if (soc < 0)
>  		dev_dbg(di->dev, "error reading State-of-Charge\n");

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ