#include <linux/of_device.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
+#include <linux/pm_runtime.h>
#include <video/exynos5433_decon.h>
if (!ctx->suspended)
return;
+ pm_runtime_get_sync(ctx->dev);
ctx->suspended = false;
for (i = 0; i < ARRAY_SIZE(decon_clks_name); i++) {
for (i = ARRAY_SIZE(decon_clks_name) - 1; i >= 0; i--)
clk_disable_unprepare(ctx->clks[i]);
+ pm_runtime_put_sync(ctx->dev);
ctx->suspended = true;
/*
platform_set_drvdata(pdev, ctx);
- return component_add(dev, &decon_component_ops);
+ pm_runtime_enable(dev);
+
+ ret = component_add(dev, &decon_component_ops);
+ if (ret)
+ goto err_disable_pm_runtime;
+
+ return 0;
+
+err_disable_pm_runtime:
+ pm_runtime_disable(dev);
+
+ return ret;
}
static int exynos5433_decon_remove(struct platform_device *pdev)
{
component_del(&pdev->dev, &decon_component_ops);
+ pm_runtime_disable(&pdev->dev);
+
return 0;
}