diff options
author | Lily Zhang <r58066@freescale.com> | 2012-03-13 18:47:50 +0800 |
---|---|---|
committer | Lily Zhang <r58066@freescale.com> | 2012-03-22 12:35:45 +0800 |
commit | daae94d72cb4872242ca06b0a5009eeaf493c2a5 (patch) | |
tree | 3fcfdda7fb732dd57be3ea7d69175bd8419acc13 /drivers | |
parent | bafbd8f39744eb0e95e54b50eddebc39adc0d2bc (diff) |
ENGR00177310-3 v4l2 capture: enable mclk when open function
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/mxc/capture/mxc_v4l2_capture.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c index d775c2c93755..03864a819201 100644 --- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c +++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c @@ -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"); |