Commit ca4c22d3 authored by Shawn Guo's avatar Shawn Guo

video: mxsfb: convert to clk_prepare/clk_unprepare

The patch converts mxsfb driver to clk_prepare/clk_unprepare by
using helper functions clk_prepare_enable/clk_disable_unprepare.
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: default avatarMarek Vasut <marek.vasut@gmail.com>
Acked-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent a4813770
...@@ -328,7 +328,7 @@ static void mxsfb_enable_controller(struct fb_info *fb_info) ...@@ -328,7 +328,7 @@ static void mxsfb_enable_controller(struct fb_info *fb_info)
dev_dbg(&host->pdev->dev, "%s\n", __func__); dev_dbg(&host->pdev->dev, "%s\n", __func__);
clk_enable(host->clk); clk_prepare_enable(host->clk);
clk_set_rate(host->clk, PICOS2KHZ(fb_info->var.pixclock) * 1000U); clk_set_rate(host->clk, PICOS2KHZ(fb_info->var.pixclock) * 1000U);
/* if it was disabled, re-enable the mode again */ /* if it was disabled, re-enable the mode again */
...@@ -368,7 +368,7 @@ static void mxsfb_disable_controller(struct fb_info *fb_info) ...@@ -368,7 +368,7 @@ static void mxsfb_disable_controller(struct fb_info *fb_info)
writel(VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4 + REG_CLR); writel(VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4 + REG_CLR);
clk_disable(host->clk); clk_disable_unprepare(host->clk);
host->enabled = 0; host->enabled = 0;
} }
...@@ -668,7 +668,7 @@ static int __devinit mxsfb_restore_mode(struct mxsfb_info *host) ...@@ -668,7 +668,7 @@ static int __devinit mxsfb_restore_mode(struct mxsfb_info *host)
line_count = fb_info->fix.smem_len / fb_info->fix.line_length; line_count = fb_info->fix.smem_len / fb_info->fix.line_length;
fb_info->fix.ypanstep = 1; fb_info->fix.ypanstep = 1;
clk_enable(host->clk); clk_prepare_enable(host->clk);
host->enabled = 1; host->enabled = 1;
return 0; return 0;
...@@ -841,7 +841,7 @@ static int __devinit mxsfb_probe(struct platform_device *pdev) ...@@ -841,7 +841,7 @@ static int __devinit mxsfb_probe(struct platform_device *pdev)
error_register: error_register:
if (host->enabled) if (host->enabled)
clk_disable(host->clk); clk_disable_unprepare(host->clk);
fb_destroy_modelist(&fb_info->modelist); fb_destroy_modelist(&fb_info->modelist);
error_init_fb: error_init_fb:
kfree(fb_info->pseudo_palette); kfree(fb_info->pseudo_palette);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment