@@ -40,20 +40,27 @@ static void platform_pm_init_bug(struct platform_device *pdev)
int platform_pm_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
+ int ret;
dev_dbg(dev, "platform_pm_runtime_suspend()\n");
platform_pm_init_bug(pdev);
+ if (dev->driver && dev->driver->pm && dev->driver->pm->runtime_suspend)
+ ret = dev->driver->pm->runtime_suspend(dev);
+ else
+ ret = 0;
+
if (pdev->archdata.clk)
clk_disable(pdev->archdata.clk);
- return 0;
+ return ret;
}
int platform_pm_runtime_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
+ int ret;
dev_dbg(dev, "platform_pm_runtime_resume()\n");
@@ -62,7 +69,12 @@ int platform_pm_runtime_resume(struct device *dev)
if (pdev->archdata.clk)
clk_enable(pdev->archdata.clk);
- return 0;
+ if (dev->driver && dev->driver->pm && dev->driver->pm->runtime_resume)
+ ret = dev->driver->pm->runtime_resume(dev);
+ else
+ ret = 0;
+
+ return ret;
}
int platform_pm_runtime_idle(struct device *dev)