From f9877d97cfa7b17ce5d4ac3df66b909376f2a16e Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Mon, 8 Oct 2012 13:53:46 +0800 Subject: ENGR00224912 mxc v4l2 capture:Correct mclk enable/disable 1) Change to enable/disable mclk only in open, release, suspend and resume functions, since we may simply think that sensor or mclk will be used soon after cam->open_count is non-zero. 2) Fix a bug when calling ipu_csi_enable_mclk_if() with wrong parameter(cam->csi should be cam->mclk_source) in mxc_v4l2_close() and in mxc_v4l2_s_ctrl() with V4L2_CID_MXC_SWITCH_CAM control id. Signed-off-by: Liu Ying (cherry picked from commit be689b81ac24c0a4373a989664ec51ad77db0ced) --- drivers/media/video/mxc/capture/mxc_v4l2_capture.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/media/video/mxc/capture/mxc_v4l2_capture.h') diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.h b/drivers/media/video/mxc/capture/mxc_v4l2_capture.h index 034fd168290f..d2efbe8453b2 100644 --- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.h +++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.h @@ -198,6 +198,7 @@ typedef struct _cam_data { wait_queue_head_t power_queue; unsigned int csi; u8 mclk_source; + bool mclk_on[2]; /* two mclk sources at most now */ int current_input; int local_buf_num; -- cgit v1.2.1