linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Mark Greer <mgreer@animalcreek.com>
Cc: Liam Breck <liam@networkimprov.net>,
	linux-pm@vger.kernel.org, Sebastian Reichel <sre@kernel.org>,
	Liam Breck <kernel@networkimprov.net>,
	Matt Ranostay <matt@ranostay.consulting>
Subject: Re: [PATCH v2 4/6] power: bq24190_charger: Call power_supply_changed() for relevant component
Date: Mon, 16 Jan 2017 18:30:59 -0800	[thread overview]
Message-ID: <20170117023058.GD7399@atomide.com> (raw)
In-Reply-To: <20170117015424.GB2926@animalcreek.com>

* Mark Greer <mgreer@animalcreek.com> [170116 17:55]:
> On Mon, Jan 16, 2017 at 11:55:22AM -0800, Liam Breck wrote:
> > On Mon, Jan 16, 2017 at 10:31 AM, Mark Greer <mgreer@animalcreek.com> wrote:
> > > On Sun, Jan 15, 2017 at 10:08:04PM -0800, Liam Breck wrote:
> > >>
> > >
> > >> We wrongly get uevents for bq24190-charger and bq24190-battery on every
> > >> register change.
> > >>
> > >> Fix by checking the association with charger and battery before
> > >> emitting uevent(s).
> > >>
> > >> Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
> > >> Cc: Mark A. Greer <mgreer@animalcreek.com>
> > >> Cc: Matt Ranostay <matt@ranostay.consulting>
> > >> Cc: Tony Lindgren <tony@atomide.com>
> > >> Signed-off-by: Liam Breck <kernel@networkimprov.net>
> > >> ---
> > >>  drivers/power/supply/bq24190_charger.c | 50 +++++++++++++++++++---------------
> > >>  1 file changed, 27 insertions(+), 23 deletions(-)
> > >>
> > >> diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
> > >> index 62194d8..ba5a5b2 100644
> > >> --- a/drivers/power/supply/bq24190_charger.c
> > >> +++ b/drivers/power/supply/bq24190_charger.c
> > >
> > >> @@ -1225,8 +1227,12 @@ static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
> > >>                                       ret);
> > >>               }
> > >>
> > >> +             if ((bdi->ss_reg & battery_mask_ss) != (ss_reg & battery_mask_ss))
> > >> +                     alert_battery = true;
> > >> +             if ((bdi->ss_reg & ~battery_mask_ss) != (ss_reg & ~battery_mask_ss))
> > >
> > > Lines are > 80 characters. Please break up.
> > 
> > I did this deliberately, because the same logic appears for f_reg in
> > that function, and this way you can see that at a glance.
> 
> That's because those lines are <= 80 chars.  :)
> 
> > My research on 80-char limit found that it's not a hard rule.
> 
> Section 2 of Documentation/process/coding-style.rst makes it pretty clear
> along with exceptions.

Yeah and it's a good idea to avoid anything that can cause extra discussion
for nothing ;)

Tony

      reply	other threads:[~2017-01-17  2:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16  6:08 [PATCH v2 4/6] power: bq24190_charger: Call power_supply_changed() for relevant component Liam Breck
2017-01-16 18:31 ` Mark Greer
2017-01-16 18:58   ` Mark Greer
2017-01-16 19:55   ` Liam Breck
2017-01-17  1:54     ` Mark Greer
2017-01-17  2:30       ` Tony Lindgren [this message]

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=20170117023058.GD7399@atomide.com \
    --to=tony@atomide.com \
    --cc=kernel@networkimprov.net \
    --cc=liam@networkimprov.net \
    --cc=linux-pm@vger.kernel.org \
    --cc=matt@ranostay.consulting \
    --cc=mgreer@animalcreek.com \
    --cc=sre@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).