Skip to contentSkip to conversation

V4L: pxa_camera: add clk_prepare/clk_unprepare calls

PATCH In review Philipp Zabel 3 participants 3 messages Mar 15, 2012 – Mar 17, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 V4L: pxa_camera: add clk_prepare/clk_unprepare calls

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

Cc Mauro Carvalho Chehab <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Robert Jarzmik <[email protected]>
---
 drivers/media/video/pxa_camera.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/video/pxa_camera.c +2 -2
index 0bd7da2..5a413f4 100644
@@ -921,12 +921,12 @@ static void pxa_camera_activate(struct pxa_camera_dev *pcdev)
 		/* "Safe default" - 13MHz */
 		recalculate_fifo_timeout(pcdev, 13000000);
 
-	clk_enable(pcdev->clk);
+	clk_prepare_enable(pcdev->clk);
 }
 
 static void pxa_camera_deactivate(struct pxa_camera_dev *pcdev)
 {
-	clk_disable(pcdev->clk);
+	clk_disable_unprepare(pcdev->clk);
 }
 
 static irqreturn_t pxa_camera_irq(int irq, void *data)
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Philipp Zabel

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

Cc Mauro Carvalho Chehab <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Robert Jarzmik <[email protected]>

Certainly, clocks have to be prepared before being enabled AFAIK.

Cheers.

--
Robert

#2 lore raw

Hi Robert

Quoted 6 lines · Robert Jarzmik
Quoted 4 lines · Philipp Zabel

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

Quoted 7 lines
Quoted 4 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Robert Jarzmik <[email protected]>

Certainly, clocks have to be prepared before being enabled AFAIK.

Thanks for the ack, but I've already pushed this patch up to Mauro. Now, only if he picks it up when pushing to Linus.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/