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]

 



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.

> +	}
> +
> +	return 0;
> +}
>
> [...]

-- Sebastian

Attachment: signature.asc
Description: PGP signature


[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