Thread (17 messages) 17 messages, 4 authors, 2017-01-31

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

From: Sebastian Reichel <sre@kernel.org>
Date: 2017-01-22 01:54:46
Also in: linux-omap

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help