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.
Just killing the unnecessary platform_ops->suspend()/resume() methods.
That's clear.
WBR, Sergei
--
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