From: "Pali Rohár" <pali.rohar@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Andrew F. Davis" <afd@ti.com>,
sre@debian.org, sre@ring0.de,
kernel list <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-omap@vger.kernel.org, tony@atomide.com, khilman@kernel.org,
aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com,
patrikbachan@gmail.com, serge@hallyn.com, a.hajda@samsung.com
Subject: Re: /sys/class/power_supply/bq27200-0/capacity changed meaning between 4.1 and 4.4?
Date: Wed, 13 Jan 2016 09:44:24 +0100 [thread overview]
Message-ID: <20160113084424.GC11560@pali> (raw)
In-Reply-To: <20160112215352.GA5248@amd>
On Tuesday 12 January 2016 22:53:52 Pavel Machek wrote:
> 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@ucw.cz>
> Acked-by: Pavel Machek <pavel@ucw.cz>
> Reported-by: Pavel Machek <pavel@ucw.cz>
> Cc: stable@vger.kernel.org
>
> ? :-).
>
> And... thanks!
> Pavel
There are more pending fixes for bq27xxx... Maybe your is duplicate?
http://thread.gmane.org/gmane.linux.power-management.general/70090
http://thread.gmane.org/gmane.linux.power-management.general/69716/focus=69714
http://thread.gmane.org/gmane.linux.power-management.general/69716/focus=2110580
Sebastian, please take them and ideally send to stable@ for backporting.
>
> > 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");
>
--
Pali Rohár
pali.rohar@gmail.com
WARNING: multiple messages have this Message-ID (diff)
From: pali.rohar@gmail.com (Pali Rohár)
To: linux-arm-kernel@lists.infradead.org
Subject: /sys/class/power_supply/bq27200-0/capacity changed meaning between 4.1 and 4.4?
Date: Wed, 13 Jan 2016 09:44:24 +0100 [thread overview]
Message-ID: <20160113084424.GC11560@pali> (raw)
In-Reply-To: <20160112215352.GA5248@amd>
On Tuesday 12 January 2016 22:53:52 Pavel Machek wrote:
> 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@ucw.cz>
> Acked-by: Pavel Machek <pavel@ucw.cz>
> Reported-by: Pavel Machek <pavel@ucw.cz>
> Cc: stable at vger.kernel.org
>
> ? :-).
>
> And... thanks!
> Pavel
There are more pending fixes for bq27xxx... Maybe your is duplicate?
http://thread.gmane.org/gmane.linux.power-management.general/70090
http://thread.gmane.org/gmane.linux.power-management.general/69716/focus=69714
http://thread.gmane.org/gmane.linux.power-management.general/69716/focus=2110580
Sebastian, please take them and ideally send to stable@ for backporting.
>
> > 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");
>
--
Pali Roh?r
pali.rohar at gmail.com
next prev parent reply other threads:[~2016-01-13 8:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 23:07 /sys/class/power_supply/bq27200-0/capacity changed meaning between 4.1 and 4.4? Pavel Machek
2016-01-09 23:07 ` Pavel Machek
2016-01-10 8:06 ` Pavel Machek
2016-01-10 8:06 ` Pavel Machek
2016-01-11 14:44 ` Andrew F. Davis
2016-01-11 14:44 ` Andrew F. Davis
2016-01-11 14:44 ` Andrew F. Davis
2016-01-11 14:25 ` Andrew F. Davis
2016-01-11 14:25 ` Andrew F. Davis
2016-01-11 14:25 ` Andrew F. Davis
2016-01-11 21:42 ` Pavel Machek
2016-01-11 21:42 ` Pavel Machek
2016-01-11 21:48 ` Andrew F. Davis
2016-01-11 21:48 ` Andrew F. Davis
2016-01-11 21:48 ` Andrew F. Davis
2016-01-12 15:22 ` Andrew F. Davis
2016-01-12 15:22 ` Andrew F. Davis
2016-01-12 15:22 ` Andrew F. Davis
2016-01-12 21:53 ` Pavel Machek
2016-01-12 21:53 ` Pavel Machek
2016-01-13 8:44 ` Pali Rohár [this message]
2016-01-13 8:44 ` Pali Rohár
2016-01-13 10:26 ` Sebastian Reichel
2016-01-13 10:26 ` Sebastian Reichel
2016-01-13 10:26 ` Sebastian Reichel
2016-01-13 10:32 ` Pali Rohár
2016-01-13 10:32 ` Pali Rohár
2016-01-13 11:01 ` Pavel Machek
2016-01-13 11:01 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160113084424.GC11560@pali \
--to=pali.rohar@gmail.com \
--cc=a.hajda@samsung.com \
--cc=aaro.koskinen@iki.fi \
--cc=afd@ti.com \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=patrikbachan@gmail.com \
--cc=pavel@ucw.cz \
--cc=serge@hallyn.com \
--cc=sre@debian.org \
--cc=sre@ring0.de \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.