Troika : fimc-is2: update cis driver
authorwangdw10 <wangdw10@lenovo.com>
Mon, 1 Apr 2019 11:47:49 +0000 (19:47 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Mon, 10 Jun 2019 03:24:55 +0000 (11:24 +0800)
1. update 12a10/16885c code indets for fix SCAR
2. update 16885c setting to decrease vblank time
3. support LEC function for 12a10

Change-Id: I8835e51a447b8dbc267f82b21ffb8ef66e3cc443
Signed-off-by: wangdw10 <wangdw10@mt.com>
Reviewed-on: https://gerrit.mot.com/1330699
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key

drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10ff.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-16885c-setA.h
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-16885c.c

index 3577543ff375906f6351186d490f70e12045add0..53343411893064bb21d796356b7d848e9efc1995 100755 (executable)
@@ -854,8 +854,8 @@ int sensor_12a10_cis_set_frame_duration(struct v4l2_subdev *subdev, u32 frame_du
        }
 
        line_length_pck = cis_data->line_length_pck;
-       numerator = (u64)cis_data->pclk * frame_duration / (1000 * 1000);
-       frame_length_lines = (u16)(numerator / line_length_pck);
+       numerator = (u64)cis_data->pclk * frame_duration;
+       frame_length_lines = (u16)((numerator / line_length_pck) / (1000 * 1000));
 
        dbg_sensor(1, "[MOD:D:%d] %s, vt_pic_clk(%#x) frame_duration = %d us,"
                KERN_CONT "(line_length_pck%#x), frame_length_lines(%#x)\n",
@@ -1519,28 +1519,28 @@ int sensor_12a10_cis_wait_streamon(struct v4l2_subdev *subdev)
 
        cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
        if (unlikely(!cis)) {
-           err("cis is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("cis is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        cis_data = cis->cis_data;
        if (unlikely(!cis_data)) {
-           err("cis_data is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("cis_data is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        client = cis->client;
        if (unlikely(!client)) {
-           err("client is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("client is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
        if (ret < 0)
-           err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
+               err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
 
        /*
         * Read sensor frame counter (sensor_fcount address = 0x483F)
@@ -1552,11 +1552,11 @@ int sensor_12a10_cis_wait_streamon(struct v4l2_subdev *subdev)
 
                ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
                if (ret < 0)
-                   err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
+                       err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
 
                if (wait_cnt >= time_out_cnt) {
                        err("[MOD:D:%d] %s, Don't sensor stream on and time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
-                               cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
+                                       cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
                        ret = -EINVAL;
                        goto p_err;
                }
@@ -1574,52 +1574,51 @@ p_err:
        return ret;
 }
 
-
 int sensor_12a10_cis_wait_streamoff(struct v4l2_subdev *subdev)
 {
-    int ret = 0;
-    struct fimc_is_cis *cis;
-    struct i2c_client *client;
-    cis_shared_data *cis_data;
-    u32 wait_cnt = 0, time_out_cnt = 250;
-    u8 sensor_fcount = 0;
-
-    BUG_ON(!subdev);
-
-    cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
-    cis_data = cis->cis_data;
-    client = cis->client;
-
-    I2C_MUTEX_LOCK(cis->i2c_lock);
-    ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
-    I2C_MUTEX_UNLOCK(cis->i2c_lock);
-
-    if (ret < 0)
-            err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
-
-    while (sensor_fcount != 0x00) {
-            I2C_MUTEX_LOCK(cis->i2c_lock);
-            ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
-            I2C_MUTEX_UNLOCK(cis->i2c_lock);
-            if (ret < 0)
-                    err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
-
-                       usleep_range(CIS_STREAM_OFF_WAIT_TIME, CIS_STREAM_OFF_WAIT_TIME);
-            wait_cnt++;
-
-            if (wait_cnt >= time_out_cnt) {
-                    err("[MOD:D:%d] %s, time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
-                                    cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
-                    ret = -EINVAL;
-                    goto p_err;
-            }
-
-            dbg_sensor(1, "[MOD:D:%d] %s, sensor_fcount(%d), (wait_limit(%d) < time_out(%d))\n",
-                            cis->id, __func__, sensor_fcount, wait_cnt, time_out_cnt);
-    }
+       int ret = 0;
+       struct fimc_is_cis *cis;
+       struct i2c_client *client;
+       cis_shared_data *cis_data;
+       u32 wait_cnt = 0, time_out_cnt = 250;
+       u8 sensor_fcount = 0;
+
+       BUG_ON(!subdev);
+
+       cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
+       cis_data = cis->cis_data;
+       client = cis->client;
+
+       I2C_MUTEX_LOCK(cis->i2c_lock);
+       ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
+       I2C_MUTEX_UNLOCK(cis->i2c_lock);
+
+       if (ret < 0)
+               err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
+
+       while (sensor_fcount != 0x00) {
+               I2C_MUTEX_LOCK(cis->i2c_lock);
+               ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
+               I2C_MUTEX_UNLOCK(cis->i2c_lock);
+               if (ret < 0)
+                       err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
+
+               usleep_range(CIS_STREAM_OFF_WAIT_TIME, CIS_STREAM_OFF_WAIT_TIME);
+               wait_cnt++;
+
+               if (wait_cnt >= time_out_cnt) {
+                       err("[MOD:D:%d] %s, time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
+                                       cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
+                       ret = -EINVAL;
+                       goto p_err;
+               }
+
+               dbg_sensor(1, "[MOD:D:%d] %s, sensor_fcount(%d), (wait_limit(%d) < time_out(%d))\n",
+                               cis->id, __func__, sensor_fcount, wait_cnt, time_out_cnt);
+       }
 
 p_err:
-    return ret;
+       return ret;
 }
 
 static int sensor_12a10_cis_set_dual_slave_setting(struct fimc_is_cis *cis)
index 6f0206f4b559ea27c496b037ca4ac1d8bf000af8..88dfe753d7a9931dae0667178c0ced137a2b2fa0 100755 (executable)
@@ -606,9 +606,9 @@ int sensor_12a10ff_cis_set_exposure_time(struct v4l2_subdev *subdev, struct ae_p
        }
 
        /* Short exposure */
-       short_coarse_val[0] = (short_coarse_int & 0xF000) >> 12;
-       short_coarse_val[1] = (short_coarse_int & 0x0FF0) >> 4;
-       short_coarse_val[2] = (short_coarse_int & 0x000F) << 4;
+       short_coarse_val[0] = (u8)((short_coarse_int & 0xF000) >> 12);
+       short_coarse_val[1] = (u8)((short_coarse_int & 0x0FF0) >> 4);
+       short_coarse_val[2] = (u8)((short_coarse_int & 0x000F) << 4);
        ret = fimc_is_sensor_write8_array(client, 0x3500, short_coarse_val, 3);
        if (ret < 0)
                goto p_err;
@@ -1520,28 +1520,28 @@ int sensor_12a10ff_cis_wait_streamon(struct v4l2_subdev *subdev)
 
        cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
        if (unlikely(!cis)) {
-           err("cis is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("cis is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        cis_data = cis->cis_data;
        if (unlikely(!cis_data)) {
-           err("cis_data is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("cis_data is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        client = cis->client;
        if (unlikely(!client)) {
-           err("client is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("client is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
        if (ret < 0)
-           err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
+               err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
 
        /*
         * Read sensor frame counter (sensor_fcount address = 0x0005)
@@ -1553,11 +1553,11 @@ int sensor_12a10ff_cis_wait_streamon(struct v4l2_subdev *subdev)
 
                ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
                if (ret < 0)
-                   err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
+                       err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
 
                if (wait_cnt >= time_out_cnt) {
                        err("[MOD:D:%d] %s, Don't sensor stream on and time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
-                               cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
+                                       cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
                        ret = -EINVAL;
                        goto p_err;
                }
@@ -1577,49 +1577,49 @@ p_err:
 
 int sensor_12a10ff_cis_wait_streamoff(struct v4l2_subdev *subdev)
 {
-    int ret = 0;
-    struct fimc_is_cis *cis;
-    struct i2c_client *client;
-    cis_shared_data *cis_data;
-    u32 wait_cnt = 0, time_out_cnt = 250;
-    u8 sensor_fcount = 0;
-
-    BUG_ON(!subdev);
-
-    cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
-    cis_data = cis->cis_data;
-    client = cis->client;
-
-    I2C_MUTEX_LOCK(cis->i2c_lock);
-    ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
-    I2C_MUTEX_UNLOCK(cis->i2c_lock);
-
-    if (ret < 0)
-            err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
-
-    while (sensor_fcount != 0x00) {
-            I2C_MUTEX_LOCK(cis->i2c_lock);
-            ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
-            I2C_MUTEX_UNLOCK(cis->i2c_lock);
-            if (ret < 0)
-                    err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
-
-                       usleep_range(CIS_STREAM_OFF_WAIT_TIME, CIS_STREAM_OFF_WAIT_TIME);
-            wait_cnt++;
-
-            if (wait_cnt >= time_out_cnt) {
-                    err("[MOD:D:%d] %s, time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
-                                    cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
-                    ret = -EINVAL;
-                    goto p_err;
-            }
-
-            dbg_sensor(1, "[MOD:D:%d] %s, sensor_fcount(%d), (wait_limit(%d) < time_out(%d))\n",
-                            cis->id, __func__, sensor_fcount, wait_cnt, time_out_cnt);
-    }
+       int ret = 0;
+       struct fimc_is_cis *cis;
+       struct i2c_client *client;
+       cis_shared_data *cis_data;
+       u32 wait_cnt = 0, time_out_cnt = 250;
+       u8 sensor_fcount = 0;
+
+       BUG_ON(!subdev);
+
+       cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
+       cis_data = cis->cis_data;
+       client = cis->client;
+
+       I2C_MUTEX_LOCK(cis->i2c_lock);
+       ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
+       I2C_MUTEX_UNLOCK(cis->i2c_lock);
+
+       if (ret < 0)
+               err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
+
+       while (sensor_fcount != 0x00) {
+               I2C_MUTEX_LOCK(cis->i2c_lock);
+               ret = fimc_is_sensor_read8(client, 0x483F, &sensor_fcount);
+               I2C_MUTEX_UNLOCK(cis->i2c_lock);
+               if (ret < 0)
+                       err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x483F, sensor_fcount, ret);
+
+               usleep_range(CIS_STREAM_OFF_WAIT_TIME, CIS_STREAM_OFF_WAIT_TIME);
+               wait_cnt++;
+
+               if (wait_cnt >= time_out_cnt) {
+                       err("[MOD:D:%d] %s, time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
+                                       cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
+                       ret = -EINVAL;
+                       goto p_err;
+               }
+
+               dbg_sensor(1, "[MOD:D:%d] %s, sensor_fcount(%d), (wait_limit(%d) < time_out(%d))\n",
+                               cis->id, __func__, sensor_fcount, wait_cnt, time_out_cnt);
+       }
 
 p_err:
-    return ret;
+       return ret;
 }
 
 int sensor_12a10ff_cis_long_term_exposure(struct v4l2_subdev *subdev)
index 741ded63b66451b4a65e910333b07b60c76936bb..d0a02e243e77b6c27151273910f94fae4cb91af5 100755 (executable)
@@ -450,7 +450,8 @@ const u32 sensor_16885c_setfile_A_2336x1752_30fps[] = {
        0x3809, 0x20, 0x01,
        0x380a, 0x06, 0x01,
        0x380b, 0xd8, 0x01,
-       0x380d, 0x78, 0x01,
+       0x380c, 0x0a, 0x01,
+       0x380d, 0xf0, 0x01,
        0x380e, 0x07, 0x01,
        0x380f, 0x70, 0x01,
        0x3811, 0x07, 0x01,
@@ -481,6 +482,7 @@ const u32 sensor_16885c_setfile_A_2336x1752_60fps[] = {
        0x3809, 0x20, 0x01,
        0x380a, 0x06, 0x01,
        0x380b, 0xd8, 0x01,
+       0x380c, 0x05, 0x01,
        0x380d, 0x78, 0x01,
        0x380e, 0x07, 0x01,
        0x380f, 0x70, 0x01,
@@ -543,6 +545,7 @@ const u32 sensor_16885c_setfile_A_1920x1080_120fps[] = {
        0x3809, 0x80, 0x01,
        0x380a, 0x04, 0x01,
        0x380b, 0x38, 0x01,
+       0x380c, 0x05, 0x01,
        0x380d, 0x00, 0x01,
        0x380e, 0x04, 0x01,
        0x380f, 0x12, 0x01,
@@ -564,8 +567,8 @@ const struct sensor_pll_info_compact sensor_16885c_pllinfo_A_2336x1752_30fps = {
        EXT_CLK_Mhz * 1000 * 1000, /* ext_clk */
        769600000, /* mipi_datarate */
        160333333,      /* pclk  = VT pix CLK (this value is different by cis) */
-       0x0EE0, /* frame_length_lines   (0x380e) */
-       0x0578, /* line_length_pck      (0x380c) */
+       0x0770, /* frame_length_lines   (0x380e) */
+       0x0AF0, /* line_length_pck      (0x380c) */
 };
 
 const struct sensor_pll_info_compact sensor_16885c_pllinfo_A_2336x1752_60fps = {
index ac13de96bcb30af5e4eabcb5f87120d2dcd12d3a..0dcd4613baab38c9c210deb758d80238920ab075 100755 (executable)
@@ -1416,8 +1416,8 @@ int sensor_16885c_cis_get_min_digital_gain(struct v4l2_subdev *subdev, u32 *min_
        }
 
        cis_data = cis->cis_data;
-    cis_data->min_digital_gain[0] = REG_1X_BASE_DGAIN;
-    cis_data->min_digital_gain[1] = REG_1X_BASE_DGAIN_VALUE;
+       cis_data->min_digital_gain[0] = REG_1X_BASE_DGAIN;
+       cis_data->min_digital_gain[1] = REG_1X_BASE_DGAIN_VALUE;
        *min_dgain = cis_data->min_digital_gain[1];
 
        dbg_sensor(1, "[%s] code %d, permile %d\n", __func__,
@@ -1487,28 +1487,28 @@ int sensor_16885c_cis_wait_streamon(struct v4l2_subdev *subdev)
 
        cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
        if (unlikely(!cis)) {
-           err("cis is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("cis is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        cis_data = cis->cis_data;
        if (unlikely(!cis_data)) {
-           err("cis_data is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("cis_data is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        client = cis->client;
        if (unlikely(!client)) {
-           err("client is NULL");
-           ret = -EINVAL;
-           goto p_err;
+               err("client is NULL");
+               ret = -EINVAL;
+               goto p_err;
        }
 
        ret = fimc_is_sensor_read8(client, 0x485F, &sensor_fcount);
        if (ret < 0)
-           err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x485F, sensor_fcount, ret);
+               err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x485F, sensor_fcount, ret);
 
        /*
         * Read sensor frame counter (sensor_fcount address = 0x485F)
@@ -1520,11 +1520,11 @@ int sensor_16885c_cis_wait_streamon(struct v4l2_subdev *subdev)
 
                ret = fimc_is_sensor_read8(client, 0x485F, &sensor_fcount);
                if (ret < 0)
-                   err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x485F, sensor_fcount, ret);
+                       err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x485F, sensor_fcount, ret);
 
                if (wait_cnt >= time_out_cnt) {
                        err("[MOD:D:%d] %s, Don't sensor stream on and time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
-                               cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
+                                       cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
                        ret = -EINVAL;
                        goto p_err;
                }
@@ -1544,49 +1544,49 @@ p_err:
 
 int sensor_16885c_cis_wait_streamoff(struct v4l2_subdev *subdev)
 {
-        int ret = 0;
-        struct fimc_is_cis *cis;
-        struct i2c_client *client;
-        cis_shared_data *cis_data;
-        u32 wait_cnt = 0, time_out_cnt = 250;
-        u8 sensor_fcount = 0;
-
-        BUG_ON(!subdev);
-
-        cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
-        cis_data = cis->cis_data;
-        client = cis->client;
-
-        I2C_MUTEX_LOCK(cis->i2c_lock);
-        ret = fimc_is_sensor_read8(client, 0x485F, &sensor_fcount);
-        I2C_MUTEX_UNLOCK(cis->i2c_lock);
-
-        if (ret < 0)
-                err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x485F, sensor_fcount, ret);
-
-        while (sensor_fcount != 0x00) {
-                I2C_MUTEX_LOCK(cis->i2c_lock);
-                ret = fimc_is_sensor_read8(client, 0x485F, &sensor_fcount);
-                I2C_MUTEX_UNLOCK(cis->i2c_lock);
-                if (ret < 0)
-                        err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x485F, sensor_fcount, ret);
-
-                               usleep_range(CIS_STREAM_OFF_WAIT_TIME, CIS_STREAM_OFF_WAIT_TIME);
-                wait_cnt++;
-
-                if (wait_cnt >= time_out_cnt) {
-                        err("[MOD:D:%d] %s, time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
-                                        cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
-                        ret = -EINVAL;
-                        goto p_err;
-                }
-
-                dbg_sensor(1, "[MOD:D:%d] %s, sensor_fcount(%d), (wait_limit(%d) < time_out(%d))\n",
-                                cis->id, __func__, sensor_fcount, wait_cnt, time_out_cnt);
-        }
+       int ret = 0;
+       struct fimc_is_cis *cis;
+       struct i2c_client *client;
+       cis_shared_data *cis_data;
+       u32 wait_cnt = 0, time_out_cnt = 250;
+       u8 sensor_fcount = 0;
+
+       BUG_ON(!subdev);
+
+       cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
+       cis_data = cis->cis_data;
+       client = cis->client;
+
+       I2C_MUTEX_LOCK(cis->i2c_lock);
+       ret = fimc_is_sensor_read8(client, 0x485F, &sensor_fcount);
+       I2C_MUTEX_UNLOCK(cis->i2c_lock);
+
+       if (ret < 0)
+               err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x485F, sensor_fcount, ret);
+
+       while (sensor_fcount != 0x00) {
+               I2C_MUTEX_LOCK(cis->i2c_lock);
+               ret = fimc_is_sensor_read8(client, 0x485F, &sensor_fcount);
+               I2C_MUTEX_UNLOCK(cis->i2c_lock);
+               if (ret < 0)
+                       err("i2c transfer fail addr(%x), val(%x), ret = %d\n", 0x485F, sensor_fcount, ret);
+
+               usleep_range(CIS_STREAM_OFF_WAIT_TIME, CIS_STREAM_OFF_WAIT_TIME);
+               wait_cnt++;
+
+               if (wait_cnt >= time_out_cnt) {
+                       err("[MOD:D:%d] %s, time out, wait_limit(%d) > time_out(%d), sensor_fcount(%d)",
+                                       cis->id, __func__, wait_cnt, time_out_cnt, sensor_fcount);
+                       ret = -EINVAL;
+                       goto p_err;
+               }
+
+               dbg_sensor(1, "[MOD:D:%d] %s, sensor_fcount(%d), (wait_limit(%d) < time_out(%d))\n",
+                               cis->id, __func__, sensor_fcount, wait_cnt, time_out_cnt);
+       }
 
 p_err:
-        return ret;
+       return ret;
 }
 
 static struct fimc_is_cis_ops cis_ops = {