Re: [PATCH 1/2] power: bq24190_charger: Check the interrupt status on resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Sebastian Reichel <sre@xxxxxxxxxx> [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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux