Hello.
On 16-02-2011 15:28, Hema HK wrote:
Calling runtime pm APIs pm_runtime_put_sync() and pm_runtime_get_sync()
for enabling/disabling the clocks, sysconfig settings.
Enable clock, configure no-idle/standby when active and configure force
idle/standby
and disable clock when idled. This is taken care by the runtime framework when
driver calls the pm_runtime_get_sync and pm_runtime_put_sync APIs.
Need to configure MUSB into force standby and force idle mode when usb not used
Signed-off-by: Hema HK <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Cousson, Benoit <[email protected]>
Cc: Paul Walmsley <[email protected]>
[...]
Index: linux-2.6/drivers/usb/musb/omap2430.c
===================================================================
--- linux-2.6.orig/drivers/usb/musb/omap2430.c
+++ linux-2.6/drivers/usb/musb/omap2430.c
[...]
@@ -498,8 +463,10 @@ static int omap2430_suspend(struct devic
omap2430_low_level_exit(musb);
otg_set_suspend(musb->xceiv, 1);
omap2430_save_context(musb);
- clk_disable(glue->clk);
+ if (!pm_runtime_suspended(dev))
+ if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_suspend)
Could be collapsed into single *if*...
+ dev->bus->pm->runtime_suspend(dev);
The above line is over-indented.
return 0;
}
@@ -507,13 +474,10 @@ static int omap2430_resume(struct device
{
struct omap2430_glue *glue = dev_get_drvdata(dev);
struct musb *musb = glue_to_musb(glue);
- int ret;
- ret = clk_enable(glue->clk);
- if (ret) {
- dev_err(dev, "faled to enable clock\n");
- return ret;
- }
+ if (!pm_runtime_suspended(dev))
+ if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_resume)
Could be collapsed into single *if*...
+ dev->bus->pm->runtime_resume(dev);
omap2430_low_level_init(musb);
omap2430_restore_context(musb);
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html