linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: Liam Breck <kernel@networkimprov.net>,
	"Mark A . Greer" <mgreer@animalcreek.com>,
	linux-pm@vger.kernel.org, linux-omap@vger.kernel.org,
	Matt Ranostay <matt@ranostay.consulting>
Subject: Re: [PATCH 1/2] power: bq24190_charger: Check the interrupt status on resume
Date: Mon, 23 Jan 2017 16:47:43 -0800	[thread overview]
Message-ID: <20170124004742.GZ7403@atomide.com> (raw)
In-Reply-To: <20170122015441.wzsbigozefzr5wzw@earth>

* Sebastian Reichel <sre@kernel.org> [170121 17:55]:
> Hi Tony,
> 
> I think your runtime_resume is missing runtime_pm_get/put_sync, see
> below:
> 
> On Fri, Jan 20, 2017 at 02:04:39PM -0800, Tony Lindgren wrote:
> > [...]
> > +static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
> > +{
> > +	struct bq24190_dev_info *bdi = data;
> > +
> > +	bdi->irq_event = true;
> > +	pm_runtime_get_sync(bdi->dev);
> > +	bq24190_check_status(bdi);
> > +	pm_runtime_put_sync(bdi->dev);
> 
> bq24190_check_status is called with runtime_pm enabled.
> 
> > +	bdi->irq_event = false;
> >  
> >  	return IRQ_HANDLED;
> >  }
> >
> > [...]
> >
> > +static int bq24190_runtime_resume(struct device *dev)
> > +{
> > +	struct i2c_client *client = to_i2c_client(dev);
> > +	struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
> > +
> > +	if (!bdi->initialized)
> > +		return 0;
> > +
> > +	if (!bdi->irq_event) {
> > +		dev_dbg(bdi->dev, "checking events on possible wakeirq\n");
> > +		bq24190_check_status(bdi);
> 
> bq24190_check_status is called without runtime_pm enabled.

But it's the runtime_resume call we're calling it from :)

I don't think there is anything to configure in bq24190 at least
at this point, we just want to see if we got the wakeirq call
resume while in some deeper idle state.

Regards,

Tony

  reply	other threads:[~2017-01-24  0:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 22:04 [PATCH 0/2] Two bq24190 PM improvments Tony Lindgren
2017-01-20 22:04 ` [PATCH 1/2] power: bq24190_charger: Check the interrupt status on resume Tony Lindgren
2017-01-21  8:08   ` Liam Breck
2017-01-22  1:51     ` Sebastian Reichel
2017-01-22  1:54   ` Sebastian Reichel
2017-01-24  0:47     ` Tony Lindgren [this message]
2017-01-20 22:04 ` [PATCH 2/2] power: bq24190_charger: Use PM runtime autosuspend Tony Lindgren
2017-01-21  0:47   ` Liam Breck
2017-01-24  1:27     ` Tony Lindgren
2017-01-24  3:34       ` Liam Breck
2017-01-24 18:29         ` Tony Lindgren
2017-01-24 23:05           ` Mark Greer
2017-01-26 16:20             ` Tony Lindgren
2017-01-26 23:56           ` Liam Breck
2017-01-30 23:55             ` Tony Lindgren
2017-01-31  0:01               ` Liam Breck
2017-01-31  0:04                 ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2017-01-31  0:02 [PATCHv2 0/2] Two bq24190 PM improvments Tony Lindgren
2017-01-31  0:02 ` [PATCH 1/2] power: bq24190_charger: Check the interrupt status on resume Tony Lindgren
2017-02-03  0:32   ` Liam Breck
2017-02-03 23:09 [PATCHv3 0/2] Two bq24190 PM improvments Tony Lindgren
2017-02-03 23:09 ` [PATCH 1/2] power: bq24190_charger: Check the interrupt status on resume Tony Lindgren
2017-02-08 23:12 [PATCHv4 0/2] Two bq24190 PM improvments Tony Lindgren
2017-02-08 23:13 ` [PATCH 1/2] power: bq24190_charger: Check the interrupt status on resume Tony Lindgren

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=20170124004742.GZ7403@atomide.com \
    --to=tony@atomide.com \
    --cc=kernel@networkimprov.net \
    --cc=linux-omap@vger.kernel.org \
    --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).