From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 2/2] power: bq24190_charger: Use PM runtime autosuspend Date: Fri, 3 Feb 2017 14:28:13 -0800 Message-ID: <20170203222812.GA3900@atomide.com> References: <20170131000210.5442-1-tony@atomide.com> <20170131000210.5442-3-tony@atomide.com> <20170131003632.GB7403@atomide.com> <20170203185408.GB3721@atomide.com> <20170203211707.GC3721@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from muru.com ([72.249.23.125]:33570 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752376AbdBCW2X (ORCPT ); Fri, 3 Feb 2017 17:28:23 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Liam Breck Cc: Sebastian Reichel , Liam Breck , "Mark A . Greer" , linux-pm@vger.kernel.org, linux-omap@vger.kernel.org * Liam Breck [170203 13:46]: > On Fri, Feb 3, 2017 at 1:17 PM, Tony Lindgren wrote: > > Cc: Liam Breck > > Acked-by: Mark Greer > > Signed-off-by: Tony Lindgren > > Acked-by: Liam Breck Thanks for looking though it. > > @@ -1492,15 +1553,25 @@ static int bq24190_pm_resume(struct device *dev) > > { > > struct i2c_client *client = to_i2c_client(dev); > > struct bq24190_dev_info *bdi = i2c_get_clientdata(client); > > + int error; > > > > bdi->f_reg = 0; > > bdi->ss_reg = BQ24190_REG_SS_VBUS_STAT_MASK; /* impossible state */ > > > > - pm_runtime_get_sync(bdi->dev); > > + error = pm_runtime_get_sync(bdi->dev); > > + if (error < 0) { > > + pm_runtime_put_noidle(bdi->dev); > > + dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", error); > > + } > > Last nitpick: call put_noidle after dev_warn, as in suspend :-) Sure, will do that and repost v3 of both patches shortly. Regards, Tony