Re: [PATCH 8/9 v3] usb : musb: Using runtime pm apis for musb.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felipe Balbi <balbi@xxxxxx> 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.

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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux