@@ -1011,6 +1011,8 @@ static int dsps_suspend(struct device *dev)
struct musb *musb = platform_get_drvdata(glue->musb);
void __iomem *mbase;
+ pm_runtime_get_sync(dev);
+
del_timer_sync(&glue->timer);
if (!musb)
@@ -1027,8 +1029,9 @@ static int dsps_suspend(struct device *dev)
glue->context.rx_mode = musb_readl(mbase, wrp->rx_mode);
dsps_dma_controller_suspend(glue);
+ pm_suspend_ignore_children(dev, true);
- return 0;
+ return pm_runtime_force_suspend(dev);
}
static int dsps_resume(struct device *dev)
@@ -1040,6 +1043,8 @@ static int dsps_resume(struct device *dev)
if (!musb)
return 0;
+ pm_suspend_ignore_children(dev, false);
+ pm_runtime_force_resume(dev);
dsps_dma_controller_resume(glue);
@@ -1055,6 +1060,8 @@ static int dsps_resume(struct device *dev)
musb->port_mode == MUSB_PORT_MODE_DUAL_ROLE)
dsps_mod_timer(glue, -1);
+ pm_runtime_put(dev);
+
return 0;
}
#endif