summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorDonghwa Lee <dh09.lee@samsung.com>2013-03-21 09:45:29 +0900
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:42:55 +0900
commit0359349f71b26431dd4ab8132bb6d255717fc69f (patch)
treee57e611d0e8ed278d8e683417733dd1fd7dd20c1 /drivers/video
parent7ebbcae5358b1916b3400676bc7307c9bd78f314 (diff)
downloadlinux-3.10-0359349f71b26431dd4ab8132bb6d255717fc69f.tar.gz
linux-3.10-0359349f71b26431dd4ab8132bb6d255717fc69f.tar.bz2
linux-3.10-0359349f71b26431dd4ab8132bb6d255717fc69f.zip
ARM: DISPLAY: support suspend/resume for mipi dsi of DISPLAY CORE
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/display/source-exynos_dsi.c37
1 files changed, 32 insertions, 5 deletions
diff --git a/drivers/video/display/source-exynos_dsi.c b/drivers/video/display/source-exynos_dsi.c
index 145d57be56f..d7094f4e4f7 100644
--- a/drivers/video/display/source-exynos_dsi.c
+++ b/drivers/video/display/source-exynos_dsi.c
@@ -989,7 +989,9 @@ static int exynos_dsi_enable(struct video_source *src)
return ret;
dsi->params = params.p.dsi;
- regulator_bulk_enable(ARRAY_SIZE(dsi->supplies), dsi->supplies);
+ ret = regulator_bulk_enable(ARRAY_SIZE(dsi->supplies), dsi->supplies);
+ if (ret < 0)
+ return ret;
clk_prepare_enable(dsi->bus_clk);
clk_prepare_enable(dsi->pll_clk);
@@ -1008,6 +1010,7 @@ static int exynos_dsi_enable(struct video_source *src)
static int exynos_dsi_disable(struct video_source *src)
{
struct exynos_dsi *dsi = src_to_dsi(src);
+ int ret;
if (!dsi->enabled)
return 0;
@@ -1025,7 +1028,9 @@ static int exynos_dsi_disable(struct video_source *src)
clk_disable_unprepare(dsi->pll_clk);
clk_disable_unprepare(dsi->bus_clk);
- regulator_bulk_disable(ARRAY_SIZE(dsi->supplies), dsi->supplies);
+ ret = regulator_bulk_disable(ARRAY_SIZE(dsi->supplies), dsi->supplies);
+ if (ret < 0)
+ return ret;
return 0;
}
@@ -1297,18 +1302,40 @@ static int exynos_dsi_remove(struct platform_device *pdev)
* Power management
*/
+#ifdef CONFIG_PM_SLEEP
static int exynos_dsi_suspend(struct device *dev)
{
struct exynos_dsi *dsi = dev_get_drvdata(dev);
+ struct video_source *src = &dsi->out;
+ int ret;
- if (dsi->enabled)
- return -EBUSY;
+ if (dsi->enabled) {
+ ret = display_entity_set_state(src->sink, DISPLAY_ENTITY_STATE_OFF);
+ if (ret < 0)
+ return -EBUSY;
+ }
return 0;
}
+static int exynos_dsi_resume(struct device *dev)
+{
+ struct exynos_dsi *dsi = dev_get_drvdata(dev);
+ struct video_source *src = &dsi->out;
+ int ret;
+
+ if (!dsi->enabled) {
+ ret = display_entity_set_state(src->sink, DISPLAY_ENTITY_STATE_ON);
+ if (ret < 0)
+ return -EBUSY;
+ }
+
+ return 0;
+}
+#endif
+
static const struct dev_pm_ops exynos_dsi_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(exynos_dsi_suspend, NULL)
+ SET_SYSTEM_SLEEP_PM_OPS(exynos_dsi_suspend, exynos_dsi_resume)
};
/*