From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Liu Subject: Re: [PATCH 6/6] phy: twl4030-usb: Fix for musb session bit based PM Date: Tue, 15 Nov 2016 15:59:53 -0600 Message-ID: <20161115215927.GA22683@uda0271908> References: <20161115213755.12316-1-tony@atomide.com> <20161115213755.12316-7-tony@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: <20161115213755.12316-7-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Tony Lindgren Cc: Boris Brezillon , Greg Kroah-Hartman , Andreas Kemnade , Felipe Balbi , Kishon Vijay Abraham I , Ivaylo Dimitrov , Johan Hovold , Ladislav Michl , Laurent Pinchart , Sergei Shtylyov , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-omap@vger.kernel.org On Tue, Nov 15, 2016 at 01:37:55PM -0800, Tony Lindgren wrote: > Now with musb driver implementing generic session bit based > PM, we need to have the USB PHYs behaving in a sane way for > platforms implementing PM. > > Currently twl4030-usb enables PM in twl4030_phy_power_on() > and then disables it in twl4030_phy_power_off(). This will > block PM runtime for the SoC when no cable is connected. > > Fix the issue by moving PM runtime autosuspend call to > happen where it gets called in twl4030_phy_power_on(). > > Note that this patch should not be backported to anything > before commit 467d5c980709 ("usb: musb: Implement session bit > based runtime PM for musb-core") as before that all the > glue layers implemented their own PM. > > Fixes: 467d5c980709 ("usb: musb: Implement session bit based > runtime PM for musb-core") > Tested-by: Ladislav Michl > Tested-by: Laurent Pinchart > Signed-off-by: Tony Lindgren I would need Kishon's Acked-by, or he picks it to his tree. Thanks, -Bin. > --- > drivers/phy/phy-twl4030-usb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c > --- a/drivers/phy/phy-twl4030-usb.c > +++ b/drivers/phy/phy-twl4030-usb.c > @@ -459,8 +459,6 @@ static int twl4030_phy_power_off(struct phy *phy) > struct twl4030_usb *twl = phy_get_drvdata(phy); > > dev_dbg(twl->dev, "%s\n", __func__); > - pm_runtime_mark_last_busy(twl->dev); > - pm_runtime_put_autosuspend(twl->dev); > > return 0; > } > @@ -472,6 +470,8 @@ static int twl4030_phy_power_on(struct phy *phy) > dev_dbg(twl->dev, "%s\n", __func__); > pm_runtime_get_sync(twl->dev); > schedule_delayed_work(&twl->id_workaround_work, HZ); > + pm_runtime_mark_last_busy(twl->dev); > + pm_runtime_put_autosuspend(twl->dev); > > return 0; > } > -- > 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html