diff options
author | Jingoo Han <jg1.han@samsung.com> | 2012-04-04 10:57:44 +0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-04-16 08:17:59 +0400 |
commit | 4e0dd49d2c4bc10d56bc536113c16f165c0edeb3 (patch) | |
tree | b4e540a81251d3c11f41fde83a2053f2477ebb9b /drivers/video/s3c-fb.c | |
parent | 366ee7c2289cc307259166fe8c2f093920c1e575 (diff) | |
download | linux-4e0dd49d2c4bc10d56bc536113c16f165c0edeb3.tar.xz |
video: s3c-fb: add runtime_get/put to suspend/resume
This patch adds runtime_get/put to suspend/resume, which should be
necessary to prevent the problem to access the fimd register
without block power on.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/s3c-fb.c')
-rw-r--r-- | drivers/video/s3c-fb.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 18c84b8d45b5..ecb82bb4e606 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -1557,6 +1557,8 @@ static int s3c_fb_suspend(struct device *dev) struct s3c_fb_win *win; int win_no; + pm_runtime_get_sync(sfb->dev); + for (win_no = S3C_FB_MAX_WIN - 1; win_no >= 0; win_no--) { win = sfb->windows[win_no]; if (!win) @@ -1570,6 +1572,9 @@ static int s3c_fb_suspend(struct device *dev) clk_disable(sfb->lcd_clk); clk_disable(sfb->bus_clk); + + pm_runtime_put_sync(sfb->dev); + return 0; } @@ -1582,6 +1587,8 @@ static int s3c_fb_resume(struct device *dev) int win_no; u32 reg; + pm_runtime_get_sync(sfb->dev); + clk_enable(sfb->bus_clk); if (!sfb->variant.has_clksel) @@ -1628,6 +1635,8 @@ static int s3c_fb_resume(struct device *dev) s3c_fb_set_par(win->fbinfo); } + pm_runtime_put_sync(sfb->dev); + return 0; } #endif |