From: Robby Cai Date: Thu, 14 Mar 2013 08:51:00 +0000 (+0800) Subject: ENGR00252064-2 mx6sl: ov5640: need enable MCLK before read sensor ID X-Git-Tag: v3.0.35-fsl~64 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=417038ba11b4cb1a0f780aaeebf63a2dc9ad3cc2;p=karo-tx-linux.git ENGR00252064-2 mx6sl: ov5640: need enable MCLK before read sensor ID After the patch of auto-detection for sensor pushed, there's a need to read sensor ID in probe function. But on MX6SL, MCLK is not enabled at that time. So need to enable it before read sensor ID. Signed-off-by: Robby Cai --- diff --git a/drivers/media/video/mxc/capture/ov5640.c b/drivers/media/video/mxc/capture/ov5640.c index 2a1bc983e28e..3195377152b7 100644 --- a/drivers/media/video/mxc/capture/ov5640.c +++ b/drivers/media/video/mxc/capture/ov5640.c @@ -31,6 +31,7 @@ #include #include #include "mxc_v4l2_capture.h" +#include "fsl_csi.h" #define OV5640_VOLTAGE_ANALOG 2800000 #define OV5640_VOLTAGE_DIGITAL_CORE 1500000 @@ -1821,6 +1822,8 @@ static int ov5640_probe(struct i2c_client *client, if (plat_data->pwdn) plat_data->pwdn(0); + if (cpu_is_mx6sl()) + csi_enable_mclk(CSI_MCLK_I2C, true, true); retval = ov5640_read_reg(OV5640_CHIP_ID_HIGH_BYTE, &chip_id_high); if (retval < 0 || chip_id_high != 0x56) { pr_warning("camera ov5640 is not found\n"); @@ -1837,6 +1840,9 @@ static int ov5640_probe(struct i2c_client *client, if (plat_data->pwdn) plat_data->pwdn(1); + if (cpu_is_mx6sl()) + csi_enable_mclk(CSI_MCLK_I2C, false, false); + camera_plat = plat_data; ov5640_int_device.priv = &ov5640_data;