Re: [PATCH 06/15] video: mx1_camera: Use clk_prepare_enable/clk_disable_unprepare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 25, 2012 at 08:14:47PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> 
> Prepare the clock before enabling it.
> 
> Cc: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> Cc: <linux-media@xxxxxxxxxxxxxxx>
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>

Acked-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>


> ---
>  drivers/media/video/mx1_camera.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c
> index 4296a83..dc58084 100644
> --- a/drivers/media/video/mx1_camera.c
> +++ b/drivers/media/video/mx1_camera.c
> @@ -402,7 +402,7 @@ static void mx1_camera_activate(struct mx1_camera_dev *pcdev)
>  
>  	dev_dbg(pcdev->icd->parent, "Activate device\n");
>  
> -	clk_enable(pcdev->clk);
> +	clk_prepare_enable(pcdev->clk);
>  
>  	/* enable CSI before doing anything else */
>  	__raw_writel(csicr1, pcdev->base + CSICR1);
> @@ -421,7 +421,7 @@ static void mx1_camera_deactivate(struct mx1_camera_dev *pcdev)
>  	/* Disable all CSI interface */
>  	__raw_writel(0x00, pcdev->base + CSICR1);
>  
> -	clk_disable(pcdev->clk);
> +	clk_disable_unprepare(pcdev->clk);
>  }
>  
>  /*
> -- 
> 1.7.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux