diff options
-rw-r--r-- | drivers/usb/musb/musb_core.c | 9 | ||||
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 3 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.c | 5 |
3 files changed, 11 insertions, 6 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index c370ed59ef7b..89c270a99549 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2220,7 +2220,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
2220 | if (status) | 2220 | if (status) |
2221 | goto fail5; | 2221 | goto fail5; |
2222 | 2222 | ||
2223 | pm_runtime_put(musb->controller); | 2223 | pm_runtime_mark_last_busy(musb->controller); |
2224 | pm_runtime_put_autosuspend(musb->controller); | ||
2224 | 2225 | ||
2225 | /* | 2226 | /* |
2226 | * For why this is currently needed, see commit 3e43a0725637 | 2227 | * For why this is currently needed, see commit 3e43a0725637 |
@@ -2248,6 +2249,7 @@ fail2_5: | |||
2248 | usb_phy_shutdown(musb->xceiv); | 2249 | usb_phy_shutdown(musb->xceiv); |
2249 | 2250 | ||
2250 | err_usb_phy_init: | 2251 | err_usb_phy_init: |
2252 | pm_runtime_dont_use_autosuspend(musb->controller); | ||
2251 | pm_runtime_put_sync(musb->controller); | 2253 | pm_runtime_put_sync(musb->controller); |
2252 | 2254 | ||
2253 | fail2: | 2255 | fail2: |
@@ -2313,8 +2315,6 @@ static int musb_remove(struct platform_device *pdev) | |||
2313 | spin_unlock_irqrestore(&musb->lock, flags); | 2315 | spin_unlock_irqrestore(&musb->lock, flags); |
2314 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | 2316 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); |
2315 | musb_platform_exit(musb); | 2317 | musb_platform_exit(musb); |
2316 | pm_runtime_put(musb->controller); | ||
2317 | /* FIXME power down */ | ||
2318 | 2318 | ||
2319 | musb_phy_callback = NULL; | 2319 | musb_phy_callback = NULL; |
2320 | 2320 | ||
@@ -2326,6 +2326,9 @@ static int musb_remove(struct platform_device *pdev) | |||
2326 | cancel_work_sync(&musb->irq_work); | 2326 | cancel_work_sync(&musb->irq_work); |
2327 | cancel_delayed_work_sync(&musb->finish_resume_work); | 2327 | cancel_delayed_work_sync(&musb->finish_resume_work); |
2328 | cancel_delayed_work_sync(&musb->deassert_reset_work); | 2328 | cancel_delayed_work_sync(&musb->deassert_reset_work); |
2329 | pm_runtime_dont_use_autosuspend(musb->controller); | ||
2330 | pm_runtime_put_sync(musb->controller); | ||
2331 | pm_runtime_disable(musb->controller); | ||
2329 | musb_free(musb); | 2332 | musb_free(musb); |
2330 | device_init_wakeup(dev, 0); | 2333 | device_init_wakeup(dev, 0); |
2331 | return 0; | 2334 | return 0; |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 152865b36522..fff5a8a283e3 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1963,7 +1963,8 @@ static int musb_gadget_stop(struct usb_gadget *g) | |||
1963 | * that currently misbehaves. | 1963 | * that currently misbehaves. |
1964 | */ | 1964 | */ |
1965 | 1965 | ||
1966 | pm_runtime_put(musb->controller); | 1966 | pm_runtime_mark_last_busy(musb->controller); |
1967 | pm_runtime_put_autosuspend(musb->controller); | ||
1967 | 1968 | ||
1968 | return 0; | 1969 | return 0; |
1969 | } | 1970 | } |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index c84e0322c108..07363d28fbc1 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -435,8 +435,9 @@ static int omap2430_musb_init(struct musb *musb) | |||
435 | phy_init(musb->phy); | 435 | phy_init(musb->phy); |
436 | phy_power_on(musb->phy); | 436 | phy_power_on(musb->phy); |
437 | 437 | ||
438 | pm_runtime_put_noidle(musb->controller); | 438 | pm_runtime_mark_last_busy(musb->controller); |
439 | pm_runtime_put_noidle(glue->dev); | 439 | pm_runtime_put_autosuspend(musb->controller); |
440 | pm_runtime_put(glue->dev); | ||
440 | return 0; | 441 | return 0; |
441 | 442 | ||
442 | err1: | 443 | err1: |