>-----Original Message-----
>From: Kevin Hilman [mailto:khil...@deeprootsystems.com] 
>Sent: Thursday, September 23, 2010 9:00 PM
>To: Balbi, Felipe
>Cc: Kalliguddi, Hema; linux-omap@vger.kernel.org; 
>linux-...@vger.kernel.org; Basak, Partha; Tony Lindgren; 
>Cousson, Benoit; Paul Walmsley
>Subject: Re: [PATCH 8/9 v3] usb : musb: Using runtime pm apis for musb.
>
>Felipe Balbi <ba...@ti.com> writes:
>
>> Hi,
>>
>> On Wed, Sep 22, 2010 at 07:30:30PM -0500, Kalliguddi, Hema wrote:
>>>Calling runtime pm APIs pm_runtime_put_sync() and 
>pm_runtime_get_sync()
>>>for enabling/disabling the clocks,sysconfig settings.
>>>
>>>Also need to put the USB in force standby and force idle 
>mode when usb not used
>>>and set it back to no idle and no stndby after wakeup.
>>>For OMAP3 auto idle bit has to be disabled because of the 
>errata.So using
>>>HWMOD_NO_OCP_AUTOIDLE flag for OMAP3430.
>
>[...]
>
>>>@@ -2424,13 +2425,16 @@ static int musb_suspend(struct device *d
>>>              * they will even be wakeup-enabled.
>>>              */
>>>     }
>>>+    pm_runtime_put_sync(dev);
>>>
>>>+#ifndef CONFIG_PM_RUNTIME
>>>     musb_save_context(musb);
>>>
>>>     if (musb->set_clock)
>>>             musb->set_clock(musb->clock, 0);
>>>     else
>>>             clk_disable(musb->clock);
>>>+#endif
>>
>> I would rather remove these, adding ifdefs is bad :-( Unless 
>other archs
>> (blackfin, davinci) would have problems if we remove those.
>
>I didn't like these #ifdefs either, but davinci doesn't have 
>runtime PM,
>and I don't think blackfin does either.
>
>But, rather than the ifdef here, this could be done with different
>pointers in struct dev_pm_ops based on the arch.
>
>Also, this shouldn't be based on CONFIG_PM_RUNTIME, but rather on the
>arch.  We can still enable runtime PM on davinci for other subsystems
>(PCI, USB core, etc.) but not have it supported for on-chip devices.
>
Is it a good idea to use the musb->set_clock function pointer for OMAP 
architure and
call the runtime pm apis from this function defined in the usb platform 
driver(omap2430)

>Kevin
>--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to