# \[PATCH\] video: pxafb: add clk\_prepare/clk\_unprepare calls

- Subsystems: FRAMEBUFFER LAYER, THE REST
- Maintainers: Helge Deller, Linus Torvalds
- List: linux-fbdev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-fbdev/2012/03/13462831/t

## \[PATCH\] video: pxafb: add clk\_prepare/clk\_unprepare calls

- From: Philipp Zabel \<hidden\>
- Date: 2012-03-15 18:12:00 
- Message: https://ratatoskr.run/linux-fbdev/2012/03/13462831.md

```text
This patch adds clk_prepare/clk_unprepare calls to the pxafb
driver by using the helper functions clk_prepare_enable and
clk_disable_unprepare.

Signed-off-by: Philipp Zabel <redacted>
Cc: Haojian Zhuang <redacted>
Cc: Eric Miao <redacted>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
---
 drivers/video/pxafb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 1d1e4f1..904f839 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -1431,7 +1431,7 @@ static void pxafb_enable_controller(struct pxafb_info *fbi)
 	pr_debug("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3);
 
 	/* enable LCD controller clock */
-	clk_enable(fbi->clk);
+	clk_prepare_enable(fbi->clk);
 
 	if (fbi->lccr0 & LCCR0_LCDT)
 		return;
@@ -1471,7 +1471,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
 	wait_for_completion_timeout(&fbi->disable_done, 200 * HZ / 1000);
 
 	/* disable LCD controller clock */
-	clk_disable(fbi->clk);
+	clk_disable_unprepare(fbi->clk);
 }
 
 /*
-- 
1.7.9.1


```

## Re: \[PATCH\] video: pxafb: add clk\_prepare/clk\_unprepare calls

- From: Florian Tobias Schandinat \<FlorianSchandinat@gmx.de\>
- Date: 2012-03-21 18:42:11 
- Message: https://ratatoskr.run/linux-fbdev/2012/03/13462832.md

```text
On 03/15/2012 06:12 PM, Philipp Zabel wrote:
> This patch adds clk_prepare/clk_unprepare calls to the pxafb
> driver by using the helper functions clk_prepare_enable and
> clk_disable_unprepare.
> 
> Signed-off-by: Philipp Zabel <redacted>
> Cc: Haojian Zhuang <redacted>
> Cc: Eric Miao <redacted>
> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>

Applied.


Thanks,

Florian Tobias Schandinat

> ---
>  drivers/video/pxafb.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
> index 1d1e4f1..904f839 100644
> --- a/drivers/video/pxafb.c
> +++ b/drivers/video/pxafb.c
> @@ -1431,7 +1431,7 @@ static void pxafb_enable_controller(struct pxafb_info *fbi)
>  	pr_debug("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3);
>  
>  	/* enable LCD controller clock */
> -	clk_enable(fbi->clk);
> +	clk_prepare_enable(fbi->clk);
>  
>  	if (fbi->lccr0 & LCCR0_LCDT)
>  		return;
> @@ -1471,7 +1471,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
>  	wait_for_completion_timeout(&fbi->disable_done, 200 * HZ / 1000);
>  
>  	/* disable LCD controller clock */
> -	clk_disable(fbi->clk);
> +	clk_disable_unprepare(fbi->clk);
>  }
>  
>  /*

```
