linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare
@ 2012-10-02 23:57 Thomas Abraham
  2012-10-04  6:18 ` Jingoo Han
  2012-10-10 12:33 ` Florian Tobias Schandinat
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Abraham @ 2012-10-02 23:57 UTC (permalink / raw)
  To: linux-fbdev; +Cc: FlorianSchandinat, jg1.han, kgene.kim, linux-samsung-soc

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
 drivers/video/s3c-fb.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 52b744f..2ed7b63 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1404,7 +1404,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
 		return PTR_ERR(sfb->bus_clk);
 	}
 
-	clk_enable(sfb->bus_clk);
+	clk_prepare_enable(sfb->bus_clk);
 
 	if (!sfb->variant.has_clksel) {
 		sfb->lcd_clk = devm_clk_get(dev, "sclk_fimd");
@@ -1414,7 +1414,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
 			goto err_bus_clk;
 		}
 
-		clk_enable(sfb->lcd_clk);
+		clk_prepare_enable(sfb->lcd_clk);
 	}
 
 	pm_runtime_enable(sfb->dev);
@@ -1504,10 +1504,10 @@ err_lcd_clk:
 	pm_runtime_disable(sfb->dev);
 
 	if (!sfb->variant.has_clksel)
-		clk_disable(sfb->lcd_clk);
+		clk_disable_unprepare(sfb->lcd_clk);
 
 err_bus_clk:
-	clk_disable(sfb->bus_clk);
+	clk_disable_unprepare(sfb->bus_clk);
 
 	return ret;
 }
@@ -1531,9 +1531,9 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
 			s3c_fb_release_win(sfb, sfb->windows[win]);
 
 	if (!sfb->variant.has_clksel)
-		clk_disable(sfb->lcd_clk);
+		clk_disable_unprepare(sfb->lcd_clk);
 
-	clk_disable(sfb->bus_clk);
+	clk_disable_unprepare(sfb->bus_clk);
 
 	pm_runtime_put_sync(sfb->dev);
 	pm_runtime_disable(sfb->dev);
@@ -1561,9 +1561,9 @@ static int s3c_fb_suspend(struct device *dev)
 	}
 
 	if (!sfb->variant.has_clksel)
-		clk_disable(sfb->lcd_clk);
+		clk_disable_unprepare(sfb->lcd_clk);
 
-	clk_disable(sfb->bus_clk);
+	clk_disable_unprepare(sfb->bus_clk);
 
 	pm_runtime_put_sync(sfb->dev);
 
@@ -1581,10 +1581,10 @@ static int s3c_fb_resume(struct device *dev)
 
 	pm_runtime_get_sync(sfb->dev);
 
-	clk_enable(sfb->bus_clk);
+	clk_prepare_enable(sfb->bus_clk);
 
 	if (!sfb->variant.has_clksel)
-		clk_enable(sfb->lcd_clk);
+		clk_prepare_enable(sfb->lcd_clk);
 
 	/* setup gpio and output polarity controls */
 	pd->setup_gpio();
@@ -1640,9 +1640,9 @@ static int s3c_fb_runtime_suspend(struct device *dev)
 	struct s3c_fb *sfb = platform_get_drvdata(pdev);
 
 	if (!sfb->variant.has_clksel)
-		clk_disable(sfb->lcd_clk);
+		clk_disable_unprepare(sfb->lcd_clk);
 
-	clk_disable(sfb->bus_clk);
+	clk_disable_unprepare(sfb->bus_clk);
 
 	return 0;
 }
@@ -1653,10 +1653,10 @@ static int s3c_fb_runtime_resume(struct device *dev)
 	struct s3c_fb *sfb = platform_get_drvdata(pdev);
 	struct s3c_fb_platdata *pd = sfb->pdata;
 
-	clk_enable(sfb->bus_clk);
+	clk_prepare_enable(sfb->bus_clk);
 
 	if (!sfb->variant.has_clksel)
-		clk_enable(sfb->lcd_clk);
+		clk_prepare_enable(sfb->lcd_clk);
 
 	/* setup gpio and output polarity controls */
 	pd->setup_gpio();
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare
  2012-10-02 23:57 [PATCH] video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare Thomas Abraham
@ 2012-10-04  6:18 ` Jingoo Han
  2012-10-10 12:33 ` Florian Tobias Schandinat
  1 sibling, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2012-10-04  6:18 UTC (permalink / raw)
  To: 'Thomas Abraham', linux-fbdev
  Cc: FlorianSchandinat, kgene.kim, linux-samsung-soc,
	'Jingoo Han'

On Wednesday, October 03, 2012 8:58 AM Thomas Abraham wrote
> 
> Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
> calls as required by common clock framework.
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>


It looks good. Also, I have tested this patch with Exynos4210.

Acked-by: Jingoo Han <jg1.han@samsung.com>


Best regards,
Jingoo Han


> ---
>  drivers/video/s3c-fb.c |   28 ++++++++++++++--------------
>  1 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 52b744f..2ed7b63 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -1404,7 +1404,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  		return PTR_ERR(sfb->bus_clk);
>  	}
> 
> -	clk_enable(sfb->bus_clk);
> +	clk_prepare_enable(sfb->bus_clk);
> 
>  	if (!sfb->variant.has_clksel) {
>  		sfb->lcd_clk = devm_clk_get(dev, "sclk_fimd");
> @@ -1414,7 +1414,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  			goto err_bus_clk;
>  		}
> 
> -		clk_enable(sfb->lcd_clk);
> +		clk_prepare_enable(sfb->lcd_clk);
>  	}
> 
>  	pm_runtime_enable(sfb->dev);
> @@ -1504,10 +1504,10 @@ err_lcd_clk:
>  	pm_runtime_disable(sfb->dev);
> 
>  	if (!sfb->variant.has_clksel)
> -		clk_disable(sfb->lcd_clk);
> +		clk_disable_unprepare(sfb->lcd_clk);
> 
>  err_bus_clk:
> -	clk_disable(sfb->bus_clk);
> +	clk_disable_unprepare(sfb->bus_clk);
> 
>  	return ret;
>  }
> @@ -1531,9 +1531,9 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
>  			s3c_fb_release_win(sfb, sfb->windows[win]);
> 
>  	if (!sfb->variant.has_clksel)
> -		clk_disable(sfb->lcd_clk);
> +		clk_disable_unprepare(sfb->lcd_clk);
> 
> -	clk_disable(sfb->bus_clk);
> +	clk_disable_unprepare(sfb->bus_clk);
> 
>  	pm_runtime_put_sync(sfb->dev);
>  	pm_runtime_disable(sfb->dev);
> @@ -1561,9 +1561,9 @@ static int s3c_fb_suspend(struct device *dev)
>  	}
> 
>  	if (!sfb->variant.has_clksel)
> -		clk_disable(sfb->lcd_clk);
> +		clk_disable_unprepare(sfb->lcd_clk);
> 
> -	clk_disable(sfb->bus_clk);
> +	clk_disable_unprepare(sfb->bus_clk);
> 
>  	pm_runtime_put_sync(sfb->dev);
> 
> @@ -1581,10 +1581,10 @@ static int s3c_fb_resume(struct device *dev)
> 
>  	pm_runtime_get_sync(sfb->dev);
> 
> -	clk_enable(sfb->bus_clk);
> +	clk_prepare_enable(sfb->bus_clk);
> 
>  	if (!sfb->variant.has_clksel)
> -		clk_enable(sfb->lcd_clk);
> +		clk_prepare_enable(sfb->lcd_clk);
> 
>  	/* setup gpio and output polarity controls */
>  	pd->setup_gpio();
> @@ -1640,9 +1640,9 @@ static int s3c_fb_runtime_suspend(struct device *dev)
>  	struct s3c_fb *sfb = platform_get_drvdata(pdev);
> 
>  	if (!sfb->variant.has_clksel)
> -		clk_disable(sfb->lcd_clk);
> +		clk_disable_unprepare(sfb->lcd_clk);
> 
> -	clk_disable(sfb->bus_clk);
> +	clk_disable_unprepare(sfb->bus_clk);
> 
>  	return 0;
>  }
> @@ -1653,10 +1653,10 @@ static int s3c_fb_runtime_resume(struct device *dev)
>  	struct s3c_fb *sfb = platform_get_drvdata(pdev);
>  	struct s3c_fb_platdata *pd = sfb->pdata;
> 
> -	clk_enable(sfb->bus_clk);
> +	clk_prepare_enable(sfb->bus_clk);
> 
>  	if (!sfb->variant.has_clksel)
> -		clk_enable(sfb->lcd_clk);
> +		clk_prepare_enable(sfb->lcd_clk);
> 
>  	/* setup gpio and output polarity controls */
>  	pd->setup_gpio();
> --
> 1.7.4.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare
  2012-10-02 23:57 [PATCH] video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare Thomas Abraham
  2012-10-04  6:18 ` Jingoo Han
@ 2012-10-10 12:33 ` Florian Tobias Schandinat
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Tobias Schandinat @ 2012-10-10 12:33 UTC (permalink / raw)
  To: Thomas Abraham; +Cc: linux-fbdev, jg1.han, kgene.kim, linux-samsung-soc

On 10/02/2012 11:57 PM, Thomas Abraham wrote:
> Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
> calls as required by common clock framework.
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>

Applied.


Thanks,

Florian Tobias Schandinat


> ---
>  drivers/video/s3c-fb.c |   28 ++++++++++++++--------------
>  1 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 52b744f..2ed7b63 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -1404,7 +1404,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  		return PTR_ERR(sfb->bus_clk);
>  	}
>  
> -	clk_enable(sfb->bus_clk);
> +	clk_prepare_enable(sfb->bus_clk);
>  
>  	if (!sfb->variant.has_clksel) {
>  		sfb->lcd_clk = devm_clk_get(dev, "sclk_fimd");
> @@ -1414,7 +1414,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  			goto err_bus_clk;
>  		}
>  
> -		clk_enable(sfb->lcd_clk);
> +		clk_prepare_enable(sfb->lcd_clk);
>  	}
>  
>  	pm_runtime_enable(sfb->dev);
> @@ -1504,10 +1504,10 @@ err_lcd_clk:
>  	pm_runtime_disable(sfb->dev);
>  
>  	if (!sfb->variant.has_clksel)
> -		clk_disable(sfb->lcd_clk);
> +		clk_disable_unprepare(sfb->lcd_clk);
>  
>  err_bus_clk:
> -	clk_disable(sfb->bus_clk);
> +	clk_disable_unprepare(sfb->bus_clk);
>  
>  	return ret;
>  }
> @@ -1531,9 +1531,9 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
>  			s3c_fb_release_win(sfb, sfb->windows[win]);
>  
>  	if (!sfb->variant.has_clksel)
> -		clk_disable(sfb->lcd_clk);
> +		clk_disable_unprepare(sfb->lcd_clk);
>  
> -	clk_disable(sfb->bus_clk);
> +	clk_disable_unprepare(sfb->bus_clk);
>  
>  	pm_runtime_put_sync(sfb->dev);
>  	pm_runtime_disable(sfb->dev);
> @@ -1561,9 +1561,9 @@ static int s3c_fb_suspend(struct device *dev)
>  	}
>  
>  	if (!sfb->variant.has_clksel)
> -		clk_disable(sfb->lcd_clk);
> +		clk_disable_unprepare(sfb->lcd_clk);
>  
> -	clk_disable(sfb->bus_clk);
> +	clk_disable_unprepare(sfb->bus_clk);
>  
>  	pm_runtime_put_sync(sfb->dev);
>  
> @@ -1581,10 +1581,10 @@ static int s3c_fb_resume(struct device *dev)
>  
>  	pm_runtime_get_sync(sfb->dev);
>  
> -	clk_enable(sfb->bus_clk);
> +	clk_prepare_enable(sfb->bus_clk);
>  
>  	if (!sfb->variant.has_clksel)
> -		clk_enable(sfb->lcd_clk);
> +		clk_prepare_enable(sfb->lcd_clk);
>  
>  	/* setup gpio and output polarity controls */
>  	pd->setup_gpio();
> @@ -1640,9 +1640,9 @@ static int s3c_fb_runtime_suspend(struct device *dev)
>  	struct s3c_fb *sfb = platform_get_drvdata(pdev);
>  
>  	if (!sfb->variant.has_clksel)
> -		clk_disable(sfb->lcd_clk);
> +		clk_disable_unprepare(sfb->lcd_clk);
>  
> -	clk_disable(sfb->bus_clk);
> +	clk_disable_unprepare(sfb->bus_clk);
>  
>  	return 0;
>  }
> @@ -1653,10 +1653,10 @@ static int s3c_fb_runtime_resume(struct device *dev)
>  	struct s3c_fb *sfb = platform_get_drvdata(pdev);
>  	struct s3c_fb_platdata *pd = sfb->pdata;
>  
> -	clk_enable(sfb->bus_clk);
> +	clk_prepare_enable(sfb->bus_clk);
>  
>  	if (!sfb->variant.has_clksel)
> -		clk_enable(sfb->lcd_clk);
> +		clk_prepare_enable(sfb->lcd_clk);
>  
>  	/* setup gpio and output polarity controls */
>  	pd->setup_gpio();


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-10 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02 23:57 [PATCH] video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare Thomas Abraham
2012-10-04  6:18 ` Jingoo Han
2012-10-10 12:33 ` Florian Tobias Schandinat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).