Re: [PATCH v2 27/30] usb: musb: am35x: usb dev_pm_ops structure

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

 



On Wed, Dec 08, 2010 at 03:45:57PM +0300, Sergei Shtylyov wrote:
Hello.

On 07-12-2010 19:33, Felipe Balbi wrote:

instead of using musb_platform_suspend_resume,

musb_platform_suspend/resume?

we can use dev_pm_ops and let platform_device
core handle when to call musb_core's suspend and
glue layer's suspend.

Signed-off-by: Felipe Balbi<balbi@xxxxxx>
[...]

diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 14413a8..4569f7a 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
[...]
@@ -653,10 +637,56 @@ static int __exit am35x_remove(struct platform_device
*pdev)
return 0;
}

+#ifdef CONFIG_PM
+static int am35x_suspend(struct device *dev)
+{
+ struct am35x_glue *glue = dev_get_drvdata(dev);
+ struct musb *musb = glue_to_musb(musb);
+
+ phy_off();
+ clk_disable(glue->phy_clk);

This does not seem equivalent change -- the old code didn't disable PHY
clock...

It did in a different manner. It was relying on musb_platform_suspend()
to disable phy and musb_platform_resume() to re-enable it.

  Yes, but I'm not seeing clk_disable() call in the old code.

true, it's only disabling clocks when removing the module. Oh well,
looks like we now have real suspend. The phy is powered off anyway
through devconf2 register when save_context() is called, so it's
essentially the same, plus disabling the clocks.

--
balbi
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux