]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00177310-3 v4l2 capture: enable mclk when open function
authorLily Zhang <r58066@freescale.com>
Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:11:18 +0000 (14:11 +0200)
Enable mclk when opening v4l2 capture device and disable
mclk when closing v4l2 capture device.
If mclk is disabled when operating MIPI camera, the test
is failed.

Signed-off-by: Lily Zhang <r58066@freescale.com>
drivers/media/video/mxc/capture/mxc_v4l2_capture.c

index d775c2c937557791b891371b1a41aed8d8dd0fab..03864a81920166b84baf2aa58f40e75af105f219 100644 (file)
@@ -1667,9 +1667,6 @@ static int mxc_v4l_open(struct file *file)
                ipu_csi_enable_mclk_if(cam->ipu, CSI_MCLK_I2C, cam->csi,
                                       true, true);
                vidioc_int_init(cam->sensor);
-
-               ipu_csi_enable_mclk_if(cam->ipu, CSI_MCLK_I2C, cam->csi,
-                                      false, false);
 }
 
        file->private_data = dev;
@@ -1711,6 +1708,9 @@ static int mxc_v4l_close(struct file *file)
        }
 
        if (--cam->open_count == 0) {
+               ipu_csi_enable_mclk_if(cam->ipu, CSI_MCLK_I2C, cam->csi,
+                       false, false);
+
                wait_event_interruptible(cam->power_queue,
                                         cam->low_power == false);
                pr_info("mxc_v4l_close: release resource\n");