>-----Original Message----- >From: Kevin Hilman [mailto:khilman@xxxxxxxxxxxxxxxxxxx] >Sent: Tuesday, August 31, 2010 8:54 PM >To: Kalliguddi, Hema >Cc: linux-omap@xxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; >Basak, Partha; Felipe Balbi; Tony Lindgren; Cousson, Benoit; >Paul Walmsley >Subject: Re: [PATCH 8/8 v2] usb : musb: Using runtime pm apis for musb. > >"Kalliguddi, Hema" <hemahk@xxxxxx> writes: > >>>> static int musb_platform_resume(struct musb *musb) >>>> { >>>> u32 l; >>>> + struct device *dev = musb->controller; >>>> + struct musb_hdrc_platform_data *pdata = dev->platform_data; >>>> + struct platform_device *pdev = to_platform_device(dev); >>>> >>>> if (!musb->clock) >>>> return 0; >>>> >>>> otg_set_suspend(musb->xceiv, 0); >>>> - >>>> - if (musb->set_clock) >>>> - musb->set_clock(musb->clock, 1); >>>> - else >>>> - clk_enable(musb->clock); >>>> - >>>> - l = musb_readl(musb->mregs, OTG_SYSCONFIG); >>>> - l &= ~ENABLEWAKEUP; /* disable wakeup */ >>>> - musb_writel(musb->mregs, OTG_SYSCONFIG, l); >>>> - >>>> + pm_runtime_enable(dev); >>>> + pm_runtime_get_sync(dev); >>>> + pdata->enable_wakeup(pdev); >>> >>>I think you mean ->disable_wakeup() here, right? >>> >> >> No I meant enable_wakeup only here. When smart idle/standby >is enabled, >> wakeup bit has to be set to generate the s-wakeup when the >devie is in idle >> and system is in ret. > >OK, I'm confused. > >The code being removed just above disables wakeups and the new code >enables wakeups. > The old code was not correct. The wakeup enable make sense only when the smart idle/smart Standby is enabled. And with get_sync musb is configured to be in smart idle/standby mode. >Also, you don't ever call ->disable_wakeup() elsewhere in the patch. >You call pdata->enable_wakeup() both in suspend and resume. Disable_wkaeup is not required now as there is no need of disabling this bit because with force idle/standby there is no use of wakeup enable/disable bit. Anyway again, we need have these APIs if Rajendra is going to post the patch to enable wkaeup in the framework if smart idle/standby is enabled. > >Kevin >-- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html