[COMMON] fimc-is2: code sync for kane/Troika Q upgrade
authorwangdw10 <wangdw10@lenovo.com>
Thu, 11 Jul 2019 04:54:35 +0000 (12:54 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:37:03 +0000 (17:37 +0800)
Change-Id: Ia3337813762117cfa811676e0de09ac3b1506942
Signed-off-by: wangdw10 <wangdw10@mt.com>
Reviewed-on: https://gerrit.mot.com/1384347
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
58 files changed:
drivers/media/platform/exynos/fimc-is2/fimc-is-core.c
drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c
drivers/media/platform/exynos/fimc-is2/fimc-is-groupmgr.c
drivers/media/platform/exynos/fimc-is2/fimc-is-i2c-config.c
drivers/media/platform/exynos/fimc-is2/fimc-is-video.c
drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-control.c
drivers/media/platform/exynos/fimc-is2/include/fimc-is-binary.h
drivers/media/platform/exynos/fimc-is2/include/fimc-is-metadata.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-mcsp.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/actuator/fimc-is-actuator-dw9839.c
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-2l1.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l2.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l3.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2l7.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p2.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p6.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p7sq.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p7sx.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p8.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2t7sx.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2x5sp-setA.h
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2x5sp.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3h1.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3l2.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3m2.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3m3.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3p3.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3p8.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-3p8sp.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-4e6.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-4h5.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-4h5yc.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-5e2.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-5e3.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-5e9-setC.h
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-gm1sp-setA.h
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-gm1sp-setB.h
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-gm1sp.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-gm1sp.h
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx219.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx241.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx258.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx260.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx320.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-imx333.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-rpb.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-sr259.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-control-sensor.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-device-sensor-peri.h
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/modules/fimc-is-device-module-2x5sp.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/modules/fimc-is-device-module-5e9.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/modules/fimc-is-device-module-base.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/modules/fimc-is-device-module-gm1sp.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/pafstat/fimc-is-pafstat.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/pdp/fimc-is-hw-pdp-v1_0.c

index fb540397ef67dc9f641fba6c4c1b3f31ee0005ed..8c5825615ba73f885927c8a7285539986b99be78 100644 (file)
@@ -738,7 +738,7 @@ static ssize_t store_pattern_en(struct device *dev,
                        sysfs_debug.pattern_en = cmd;
                break;
        default:
-               pr_warn("%s: invalid paramter (%d)\n", __func__, cmd);
+               pr_warn("%s: invalid paramter (%lu)\n", __func__, cmd);
                break;
        }
 
index 092e1dc0d2f34fa2c0a29e0557c5479c33a48e4d..da7b440e9a2dc0756c41850044f75058037c7109 100644 (file)
@@ -994,36 +994,10 @@ int fimc_is_sensor_dm_tag(struct fimc_is_device_sensor *device,
 {
        int ret = 0;
        u32 hashkey;
-       struct v4l2_subdev *subdev_module;
-       struct fimc_is_module_enum *module;
-       struct fimc_is_device_sensor_peri *sensor_peri = NULL;
-       struct v4l2_subdev *subdev_cis = NULL;
-       struct fimc_is_cis *cis = NULL;
 
        FIMC_BUG(!device);
        FIMC_BUG(!frame);
 
-       subdev_module = device->subdev_module;
-       if (!subdev_module) {
-               err("subdev_module is NULL");
-               return -EINVAL;
-       }
-
-       module = v4l2_get_subdevdata(subdev_module);
-       if (!module) {
-               err("module is NULL");
-               return -EINVAL;
-       }
-       sensor_peri = (struct fimc_is_device_sensor_peri *)module->private_data;
-
-       subdev_cis = sensor_peri->subdev_cis;
-       if (!subdev_cis) {
-               err("[SEN:%d] no subdev_cis", module->sensor_id);
-               return -ENXIO;
-       }
-       cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev_cis);
-       FIMC_BUG(!cis);
-
        hashkey = frame->fcount % FIMC_IS_TIMESTAMP_HASH_KEY;
        if (frame->shot) {
                frame->shot->dm.request.frameCount = frame->fcount;
@@ -1034,14 +1008,6 @@ int fimc_is_sensor_dm_tag(struct fimc_is_device_sensor *device,
                 * So, embedded data should be extraced before frame end.
                 */
                frame->shot->udm.frame_id = device->frame_id[hashkey];
-
-               /* get gyro self test value from cis */
-               if (cis->gyro_self_test_step == 2) {
-                       frame->shot_ext->user.gyro_info.x = cis->gyro_test_val.x;
-                       frame->shot_ext->user.gyro_info.y = cis->gyro_test_val.y;
-                       frame->shot_ext->user.gyro_info.z = cis->gyro_test_val.z;
-                       frame->shot_ext->user.gyro_info.state = cis->gyro_test_val.state;
-               }
 #ifdef DBG_JITTER
                fimc_is_jitter(frame->shot->dm.sensor.timeStamp);
 #endif
index 1b4e7b4d450b22e6db32c7da1f10b8c5a9bba529..e979aba99a48d76bacf88e82c88b6c6c5807e9a1 100644 (file)
@@ -2550,34 +2550,6 @@ int fimc_is_group_buffer_queue(struct fimc_is_groupmgr *groupmgr,
                }
 #endif
 
-#ifdef ENABLE_FAST_AF_TRIGGER
-               /* for reduce AF control delay,
-                * it need to copy "afMode & afTrigger" in queued frame
-                * at only AF mode == CONTINUOUS_PICTURE or CONTINUOUS_VIDEO
-                *         AF trigger == START
-                *         PreCaptureTrigger != START
-                */
-               if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) {
-                       struct fimc_is_frame *prev;
-
-                       if (((frame->shot->ctl.aa.afMode == AA_AFMODE_CONTINUOUS_VIDEO ||
-                               frame->shot->ctl.aa.afMode == AA_AFMODE_CONTINUOUS_PICTURE) &&
-                               frame->shot->ctl.aa.afTrigger == AA_AF_TRIGGER_START) &&
-                               frame->shot->ctl.aa.aePrecaptureTrigger != AA_AE_PRECAPTURE_TRIGGER_START) {
-
-                               list_for_each_entry_reverse(prev, &framemgr->queued_list[FS_REQUEST], list) {
-                                       prev->shot->ctl.aa.afMode = frame->shot->ctl.aa.afMode;
-                                       prev->shot->ctl.aa.afTrigger = frame->shot->ctl.aa.afTrigger;
-                               }
-
-                               list_for_each_entry_reverse(prev, &framemgr->queued_list[FS_PROCESS], list) {
-                                       prev->shot->ctl.aa.afMode = frame->shot->ctl.aa.afMode;
-                                       prev->shot->ctl.aa.afTrigger = frame->shot->ctl.aa.afTrigger;
-                               }
-                       }
-               }
-#endif
-
 #ifdef SENSOR_REQUEST_DELAY
                if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state) &&
                        (frame->shot->uctl.opMode == CAMERA_OP_MODE_HAL3_GED)) {
@@ -3435,8 +3407,7 @@ int fimc_is_group_done(struct fimc_is_groupmgr *groupmgr,
                                break;
                        }
 
-                       if (device->sensor &&
-                               (device->sensor->subdev_eeprom || device->sensor->use_otp_cal)) {
+                       if (device->sensor->subdev_eeprom || device->sensor->use_otp_cal) {
                                /* Sensor EEPROM CAL data status update */
                                for (i = 0; i < CAMERA_CRC_INDEX_MAX; i++)
                                        frame->shot_ext->user.crc_result[i] = device->sensor->cal_status[i];
index c29bf051437d96ad4a3fbeecce135b57fe532955..bdfcfe0db5fefb990109d7179795dafb11c433b7 100644 (file)
@@ -74,9 +74,6 @@ int fimc_is_i2c_pin_control(struct fimc_is_module_enum *module, u32 scenario, u3
        sensor_peri = (struct fimc_is_device_sensor_peri *)module->private_data;
        device = v4l2_get_subdev_hostdata(module->subdev);
        core = (struct fimc_is_core *)dev_get_drvdata(fimc_is_dev);
-
-       FIMC_BUG(!core);
-
        specific = core->vender.private_data;
 
        switch (scenario) {
@@ -89,11 +86,12 @@ int fimc_is_i2c_pin_control(struct fimc_is_module_enum *module, u32 scenario, u3
                }
                if (device->ois) {
                        i2c_channel = module->ext.ois_con.peri_setting.i2c.channel;
-
-                       if (i2c_config_state == I2C_PIN_STATE_ON)
-                               atomic_inc(&core->i2c_rsccount[i2c_channel]);
-                       else if (i2c_config_state == I2C_PIN_STATE_OFF)
-                               atomic_dec(&core->i2c_rsccount[i2c_channel]);
+                       if (core != NULL) {
+                               if (i2c_config_state == I2C_PIN_STATE_ON)
+                                       atomic_inc(&core->i2c_rsccount[i2c_channel]);
+                               else if (i2c_config_state == I2C_PIN_STATE_OFF)
+                                       atomic_dec(&core->i2c_rsccount[i2c_channel]);
+                       }
 
                        if (atomic_read(&core->i2c_rsccount[i2c_channel]) == value) {
                                info("%s[%d] ois i2c config(%d), position(%d), scenario(%d), i2c_channel(%d)\n",
index faa8585d6931c227ad0f5964379b691c4c2491a0..fbb704eff59fed10d24e60243239d81a63698918 100644 (file)
@@ -1785,25 +1785,6 @@ int fimc_is_video_prepare(struct file *file,
                        goto p_err;
                }
 
-               if (!V4L2_TYPE_IS_MULTIPLANAR(buf->type)) {
-                       mverr("the type of passed buffer is not multi-planar",
-                                       vctx, video);
-                       ret = -EINVAL;
-                       goto p_err;
-               }
-
-               if (!buf->m.planes) {
-                       mverr("planes array not provided", vctx, video);
-                       ret = -EINVAL;
-                       goto p_err;
-               }
-
-               if (buf->length > FIMC_IS_MAX_PLANES) {
-                       mverr("incorrect planes array length", vctx, video);
-                       ret = -EINVAL;
-                       goto p_err;
-               }
-
                /* Destination */
                memcpy(&pipe->buf[PIPE_SLOT_DST][index], buf, sizeof(struct v4l2_buffer));
                memcpy(pipe->planes[PIPE_SLOT_DST][index], buf->m.planes, sizeof(struct v4l2_plane) * buf->length);
index de90d791847eb27e151e69a249b380d41db08572..14bbb1089d8b56e232385d2bfa433c958ac80d7f 100644 (file)
@@ -286,9 +286,11 @@ static void _fimc_is_hardware_sfr_dump(struct fimc_is_hw_ip *hw_ip, bool flag_pr
        print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 32, 4,
                        hw_ip->regs, reg_size, false);
 #else
-       if (flag_print_log)
-               print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 32, 4,
-                               hw_ip->regs, reg_size, false);
+       if (flag_print_log) {
+               if (hw_ip->id != DEV_HW_3AA1 || hw_ip->id != DEV_HW_VRA)
+                       print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 32, 4,
+                                       hw_ip->regs, reg_size, false);
+       }
 #endif
        if (IS_ERR_OR_NULL(hw_ip->sfr_b_dump))
                return;
@@ -2734,7 +2736,7 @@ int fimc_is_hardware_frame_ndone(struct fimc_is_hw_ip *ldr_hw_ip,
                        }
 
                        if (done_type == IS_SHOT_TIMEOUT)
-                               _fimc_is_hardware_sfr_dump(hw_ip, false);
+                               _fimc_is_hardware_sfr_dump(hw_ip, true);
                }
                head = head->child;
        }
index 278a7c83cb89da731ddcc2d8fc4e041e39656cc8..65699d0af4ee7edaaa2c47895bff1472ce561f80 100644 (file)
 /* static reserved memory for libraries */
 #define CDH_SIZE               SZ_128K         /* CDH : Camera Debug Helper */
 
-#ifdef CONFIG_KASAN
 #define LIB_OFFSET             (VMALLOC_START + 0xF6000000 - 0x8000000)
-#else
-#define LIB_OFFSET             (VMALLOC_START + 0x1000000000UL + 0xF6000000 - 0x8000000)
-#endif
-
 #define __LIB_START            (LIB_OFFSET + 0x04000000 - CDH_SIZE)
 #define LIB_START              (__LIB_START + CDH_SIZE)
 
index 3ccc0fd0d61183270d85099964d34a35342d0f31..5e0ed10e062dc6483e3fd956987483565c60409b 100644 (file)
@@ -2052,13 +2052,6 @@ enum camera_crc_index {
        CAMERA_CRC_INDEX_MAX,
 };
 
-enum sensor_gyro_info_state {
-       SENSOR_GYRO_INFO_STATE_BASE = 0,
-       SENSOR_GYRO_INFO_STATE_SUCCESS,
-       SENSOR_GYRO_INFO_STATE_FAIL,
-       SENSOR_GYRO_INFO_STATE_MAX,
-};
-
 struct facial_score {
        int32_t                 left_eye;
        int32_t                 right_eye;
@@ -2087,21 +2080,12 @@ struct ddk_setfile_ver
        char            setfile_version[128];
 };
 
-struct sensor_gyro_info {
-       int32_t x;
-       int32_t y;
-       int32_t z;
-       enum sensor_gyro_info_state state;
-};
-
 struct camera2_shot_ext_user {
        int             crc_result[CAMERA_CRC_INDEX_MAX];
        int             focus_actual_pos;
        int             focus_target_pos;
 
        struct ddk_setfile_ver  ddk_version;
-
-       struct sensor_gyro_info gyro_info;
 };
 
 /** \brief
index 6d69c7e2b9dbd5a8cf65a3c49b647c79cf68de65..e3f64f52f495ba5afff117a1fda14a3044f05fe6 100644 (file)
 /* HACK */
 #define DISABLE_CHECK_PERFRAME_FMT_SIZE
 
-#define BDS_DVFS
+/* #define BDS_DVFS */
 #define ENABLE_HW_FAST_READ_OUT
 #define FULL_OTF_TAIL_GROUP_ID         GROUP_ID_MCS0
 
index ebec66e4534a0851fcf088b38ee48bb82467d02a..d288dd8a38fb43580850cb85f1cabff9a5f26916 100644 (file)
@@ -483,6 +483,14 @@ static int fimc_is_ischain_mxp_tag(struct fimc_is_subdev *subdev,
                index = PARAM_MCS_OUTPUT3;
                target_addr = ldr_frame->sc3TargetAddress;
                break;
+       case FIMC_IS_VIDEO_M4P_NUM:
+               index = PARAM_MCS_OUTPUT4;
+               target_addr = ldr_frame->sc4TargetAddress;
+               break;
+       case FIMC_IS_VIDEO_M5P_NUM:
+               index = PARAM_MCS_OUTPUT5;
+               target_addr = ldr_frame->sc5TargetAddress;
+               break;
        default:
                mserr("vid(%d) is not matched", device, subdev, node->vid);
                ret = -EINVAL;
index 046d1e7d3cd5196844f813bd765ef620493f9262..e04f837c1a465f659b250c667883dd7136766e45 100644 (file)
@@ -154,24 +154,6 @@ skip_cal:
        actuator_info->pcal = (pcal_msb << 8) | pcal_lsb;
        actuator_info->ncal = (ncal_msb << 8) | ncal_lsb;
 
-       /* read pcal, ncal */
-       actuator_info = (struct dw9839_actuator_info *)actuator->priv_info;
-       ret = fimc_is_sensor_addr8_read8(client, REG_PCAL_MSB, &pcal_msb);
-       if (ret < 0)
-               goto p_err;
-       ret = fimc_is_sensor_addr8_read8(client, REG_PCAL_LSB, &pcal_lsb);
-       if (ret < 0)
-               goto p_err;
-       ret = fimc_is_sensor_addr8_read8(client, REG_NCAL_MSB, &ncal_msb);
-       if (ret < 0)
-               goto p_err;
-       ret = fimc_is_sensor_addr8_read8(client, REG_NCAL_LSB, &ncal_lsb);
-       if (ret < 0)
-               goto p_err;
-
-       actuator_info->pcal = (pcal_msb << 8) | pcal_lsb;
-       actuator_info->ncal = (ncal_msb << 8) | ncal_lsb;
-
        info("%s done\n", __func__);
 p_err:
        return ret;
@@ -427,7 +409,7 @@ p_err:
 
        return ret;
 }
-#if 0
+
 int sensor_dw9839_actuator_get_actual_position(struct v4l2_subdev *subdev, u32 *info)
 {
        int ret = 0;
@@ -492,81 +474,11 @@ int sensor_dw9839_actuator_get_actual_position(struct v4l2_subdev *subdev, u32 *
        pr_info("[%s] time %lu us", __func__, (end.tv_sec - st.tv_sec) * 1000000 + (end.tv_usec - st.tv_usec));
 #endif
 
-       /* dw9839 actuator do not use af cal */
-       actuator->actuator_data.actuator_init = false;
 p_err:
        I2C_MUTEX_UNLOCK(actuator->i2c_lock);
 
        return ret;
 }
-#endif
-
-int sensor_dw9839_actuator_get_actual_position(struct v4l2_subdev *subdev, u32 *info)
-{
-       int ret = 0;
-       struct fimc_is_actuator *actuator;
-       struct i2c_client *client;
-       struct dw9839_actuator_info *actuator_info;
-       u8 pos_msb = 0, pos_lsb = 0;
-       u32 adc_pos;
-       u64 temp;
-
-#ifdef DEBUG_ACTUATOR_TIME
-       struct timeval st, end;
-
-       do_gettimeofday(&st);
-#endif
-
-       FIMC_BUG(!subdev);
-       FIMC_BUG(!info);
-
-       actuator = (struct fimc_is_actuator *)v4l2_get_subdevdata(subdev);
-       FIMC_BUG(!actuator);
-
-       client = actuator->client;
-       if (unlikely(!client)) {
-               err("client is NULL");
-               ret = -EINVAL;
-               goto p_err;
-       }
-
-       FIMC_BUG(!actuator->priv_info);
-       actuator_info = (struct dw9839_actuator_info *)actuator->priv_info;
-
-       ret = fimc_is_sensor_addr8_write8(client, REG_ADC_R_EN, 1);
-       if (ret < 0)
-               goto p_err;
-       ret = fimc_is_sensor_addr8_read8(client, REG_ADC_R_MSB, &pos_msb);
-       if (ret < 0)
-               goto p_err;
-       ret = fimc_is_sensor_addr8_read8(client, REG_ADC_R_LSB, &pos_lsb);
-       if (ret < 0)
-               goto p_err;
-
-       /* pos_msb uses [1:0] bit */
-       adc_pos = ((pos_msb & 0x3) << 8) | pos_lsb;
-
-       /* convert adc_pos to 10bit position
-        * ncal <= adc_pos <= pcal ------> 0 <= 10bit_pos <= 1023
-        */
-       temp = (u64)(adc_pos - actuator_info->ncal) << ACTUATOR_POS_SIZE_10BIT;
-       *info = (u32)(temp / (u64)(actuator_info->pcal - actuator_info->ncal));
-
-       if (*info > 1023)
-               *info = 1023;
-
-       dbg_actuator("%s: cal(p:%d, n:%d), adc_pos(msb:%d, lsb:%d, sum:%d) -> target_pos(%d) actual pos(%d)\n",
-                       __func__, actuator_info->pcal, actuator_info->ncal, pos_msb & 0x3, pos_lsb, adc_pos,
-                       actuator->position, *info);
-
-#ifdef DEBUG_ACTUATOR_TIME
-       do_gettimeofday(&end);
-       pr_info("[%s] time %lu us", __func__, (end.tv_sec - st.tv_sec) * 1000000 + (end.tv_usec - st.tv_usec));
-#endif
-
-p_err:
-       return ret;
-}
 
 static int sensor_dw9839_actuator_g_ctrl(struct v4l2_subdev *subdev, struct v4l2_control *ctrl)
 {
index e996add62eef3bb0899726880a14d15340520aa0..818004c4c26afa138913e3c2dc75708819a1f7b1 100755 (executable)
@@ -1756,76 +1756,6 @@ int sensor_12a10_cis_long_term_exposure(struct v4l2_subdev *subdev)
        return ret;
 }
 
-static int sensor_12a10_cis_set_dual_slave_setting(struct fimc_is_cis *cis)
-{
-       int ret = 0;
-       struct i2c_client *client;
-
-       cis_shared_data *cis_data;
-       FIMC_BUG(!cis);
-
-       client = cis->client;
-       if (unlikely(!client)) {
-               err("client is NULL");
-               ret = -EINVAL;
-               goto p_err;
-       }
-
-       dbg_sensor(1, "[MOD:D:%d] %s\n", cis->id, __func__);
-
-       cis_data = cis->cis_data;
-
-       /* Vsync Input Source Select */
-       fimc_is_sensor_write8(client, 0x3002, 0x21);
-       fimc_is_sensor_write8(client, 0x3643, 0x22);
-       fimc_is_sensor_write8(client, 0x3822, 0xa1);
-       fimc_is_sensor_write8(client, 0x3823, 0x78);
-       fimc_is_sensor_write8(client, 0x3824, 0x00);// frame start sync
-       fimc_is_sensor_write8(client, 0x3825, 0x20);
-       fimc_is_sensor_write8(client, 0x3826, 0x00);
-       fimc_is_sensor_write8(client, 0x3827, 0x08);
-       fimc_is_sensor_write8(client, 0x3c80, 0x08);
-
-p_err:
-       return ret;
-}
-
-int sensor_12a10_cis_set_dual_setting(struct v4l2_subdev *subdev)
-{
-       int ret = 0;
-       struct fimc_is_cis *cis;
-       struct i2c_client *client;
-
-       FIMC_BUG(!subdev);
-
-       cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
-
-       FIMC_BUG(!cis);
-
-       client = cis->client;
-       if (unlikely(!client)) {
-               err("client is NULL");
-               ret = -EINVAL;
-               goto p_err;
-       }
-
-       switch (cis->dual_sync_mode) {
-       case DUAL_SYNC_MASTER:
-               break;
-       case DUAL_SYNC_SLAVE:
-               ret = sensor_12a10_cis_set_dual_slave_setting(cis);
-               if (ret)
-                       err("12a10 dual slave setting fail");
-               break;
-       default:
-               err("invalid cis->dual_sync_mode(%d)\n", cis->dual_sync_mode);
-               ret = -EINVAL;
-       }
-
-p_err:
-       return ret;
-}
-
 static struct fimc_is_cis_ops cis_ops = {
        .cis_init = sensor_12a10_cis_init,
        .cis_log_status = sensor_12a10_cis_log_status,
index 0a8904259f955070d5db391d7ba680e6c50bf44c..aa654795a22eb8edbfe4321f31a34d205ab3678b 100755 (executable)
@@ -276,7 +276,7 @@ static int sensor_12a10ff_cis_group_param_hold_func(struct v4l2_subdev *subdev,
                ret = fimc_is_sensor_write8(client, 0x3208, 0x10);
                ret = fimc_is_sensor_write8(client, 0x320b, 0x00);
                ret = fimc_is_sensor_write8(client, 0x3208, 0xa0);
-
+    
        if (ret < 0)
                goto p_err;
 
index ba53ccf4170305317ac68b5d3d1f88137642ce34..4bcd4ab16f00ce23926c9b6a1967aaae519cfffa 100644 (file)
@@ -2053,7 +2053,6 @@ static struct fimc_is_cis_ops cis_ops_2l1 = {
        .cis_wait_streamon = sensor_cis_wait_streamon,
        .cis_data_calculation = sensor_2l1_cis_data_calc,
        .cis_set_long_term_exposure = sensor_2l1_cis_long_term_exposure,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_2l1_probe(struct i2c_client *client,
@@ -2166,9 +2165,6 @@ static int cis_2l1_probe(struct i2c_client *client,
                snprintf(subdev_cis->name, V4L2_SUBDEV_NAME_SIZE, "cis-subdev.%d", cis->id);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        ret = of_property_read_string(dnode, "setfile", &setfile);
        if (ret) {
                err("setfile index read fail(%d), take default setfile!!", ret);
index c9b553ee43aac322426717d3304c4ca53fe4a8ca..aab6a792006fc9cb9ea0fe5ce2f64851830ce78c 100644 (file)
@@ -2035,7 +2035,6 @@ static struct fimc_is_cis_ops cis_ops_2l2 = {
        .cis_wait_streamon = sensor_cis_wait_streamon,
        .cis_data_calculation = sensor_2l2_cis_data_calc,
        .cis_set_long_term_exposure = sensor_2l2_cis_long_term_exposure,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_2l2_probe(struct i2c_client *client,
@@ -2148,9 +2147,6 @@ static int cis_2l2_probe(struct i2c_client *client,
                snprintf(subdev_cis->name, V4L2_SUBDEV_NAME_SIZE, "cis-subdev.%d", cis->id);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        ret = of_property_read_string(dnode, "setfile", &setfile);
        if (ret) {
                err("setfile index read fail(%d), take default setfile!!", ret);
index e550a5826620beb32830194e0c5f66e70eece5f0..8e7b6a2ad7716c4b888e26a57bef08056cdc8d3c 100644 (file)
@@ -2975,7 +2975,6 @@ static struct fimc_is_cis_ops cis_ops_2l3 = {
        .cis_set_long_term_exposure = sensor_2l3_cis_long_term_exposure,
        .cis_set_frs_control = sensor_2l3_cis_set_frs_control,
        .cis_set_super_slow_motion_roi = sensor_2l3_cis_set_super_slow_motion_roi,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
        .cis_check_rev = sensor_2l3_cis_check_rev,
        .cis_set_super_slow_motion_threshold = sensor_2l3_cis_set_super_slow_motion_threshold,
        .cis_get_super_slow_motion_threshold = sensor_2l3_cis_get_super_slow_motion_threshold,
@@ -3089,9 +3088,6 @@ static int cis_2l3_probe(struct i2c_client *client,
                snprintf(subdev_cis->name, V4L2_SUBDEV_NAME_SIZE, "cis-subdev.%d", cis->id);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        ret = of_property_read_string(dnode, "setfile", &setfile);
        if (ret) {
                err("setfile index read fail(%d), take default setfile!!", ret);
index b9ab9ff263fb59a790eb834503ceae15708f2f71..8cb43aec02abd64360384b14f7f589ac7bc2bb4a 100644 (file)
@@ -1800,7 +1800,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_retention_prepare = sensor_2l7_cis_retention_prepare,
        .cis_retention_crc_check = sensor_2l7_cis_retention_crc_check,
 #endif
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_2l7_probe(struct i2c_client *client,
@@ -1940,9 +1939,6 @@ static int cis_2l7_probe(struct i2c_client *client,
 #endif
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 0472be16cc4954484d7d28fb79776fc58b9031e8..bc08529fc8735c1e2efe438d55796c0adb42964a 100644 (file)
@@ -1621,7 +1621,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int __init cis_2p2_probe(struct i2c_client *client,
@@ -1746,9 +1745,6 @@ static int __init cis_2p2_probe(struct i2c_client *client,
                sensor_2p2_max_setfile_num = sizeof(sensor_2p2_setfiles_A) / sizeof(sensor_2p2_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index f215868594a0f14169c31720ded04fe4144430c4..0364464b79d9c24e649140a88db9c54d889f575e 100644 (file)
@@ -1753,7 +1753,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 int cis_2p6_probe(struct i2c_client *client,
@@ -1890,9 +1889,6 @@ int cis_2p6_probe(struct i2c_client *client,
                sensor_2p6_pllinfos = sensor_2p6_pllinfos_A;
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 7eea58b99ba158bf108cfc17c89c4c007564a7d1..cf1a58be4e214e223087eef3a9d4018bddcb53dd 100644 (file)
@@ -143,41 +143,6 @@ static int sensor_2p7sq_wait_stream_off_status(cis_shared_data *cis_data)
        return ret;
 }
 
-void sensor_2p7sq_cis_select_setfile(struct v4l2_subdev *subdev)
-{
-       u8 rev = 0;
-       struct fimc_is_cis *cis = NULL;
-
-       WARN_ON(!subdev);
-
-       cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
-       WARN_ON(!cis);
-       WARN_ON(!cis->cis_data);
-
-       rev = cis->cis_data->cis_rev;
-
-       switch (rev) {
-       case 0xA0: /* 2P7SQ */
-               pr_info("%s setfile_A(2P7SQ)\n", __func__);
-               sensor_2p7sq_global = sensor_2p7sq_setfile_A_Global;
-               sensor_2p7sq_global_size = ARRAY_SIZE(sensor_2p7sq_setfile_A_Global);
-               sensor_2p7sq_setfiles = sensor_2p7sq_setfiles_A;
-               sensor_2p7sq_setfile_sizes = sensor_2p7sq_setfile_A_sizes;
-               sensor_2p7sq_max_setfile_num = ARRAY_SIZE(sensor_2p7sq_setfiles_A);
-               sensor_2p7sq_pllinfos = sensor_2p7sq_pllinfos_A;
-               break;
-       default:
-               err("Unsupported 2p7sq sensor revision(%#x) use setfile_A for default\n", rev);
-               sensor_2p7sq_global = sensor_2p7sq_setfile_A_Global;
-               sensor_2p7sq_global_size = ARRAY_SIZE(sensor_2p7sq_setfile_A_Global);
-               sensor_2p7sq_setfiles = sensor_2p7sq_setfiles_A;
-               sensor_2p7sq_setfile_sizes = sensor_2p7sq_setfile_A_sizes;
-               sensor_2p7sq_max_setfile_num = ARRAY_SIZE(sensor_2p7sq_setfiles_A);
-               sensor_2p7sq_pllinfos = sensor_2p7sq_pllinfos_A;
-               break;
-       }
-}
-
 /* CIS OPS */
 int sensor_2p7sq_cis_init(struct v4l2_subdev *subdev)
 {
@@ -210,8 +175,6 @@ int sensor_2p7sq_cis_init(struct v4l2_subdev *subdev)
                ret = 0;
        }
 
-       sensor_2p7sq_cis_select_setfile(subdev);
-
        cis->cis_data->cur_width = SENSOR_2P7SQ_MAX_WIDTH;
        cis->cis_data->cur_height = SENSOR_2P7SQ_MAX_HEIGHT;
        cis->cis_data->low_expo_start = 33000;
@@ -1788,6 +1751,33 @@ static int cis_2p7sq_probe(struct i2c_client *client,
                setfile = "default";
        }
 
+       if (strcmp(setfile, "default") == 0 ||
+                       strcmp(setfile, "setA") == 0) {
+               probe_info("%s setfile_A\n", __func__);
+               sensor_2p7sq_global = sensor_2p7sq_setfile_A_Global;
+               sensor_2p7sq_global_size = ARRAY_SIZE(sensor_2p7sq_setfile_A_Global);
+               sensor_2p7sq_setfiles = sensor_2p7sq_setfiles_A;
+               sensor_2p7sq_setfile_sizes = sensor_2p7sq_setfile_A_sizes;
+               sensor_2p7sq_pllinfos = sensor_2p7sq_pllinfos_A;
+               sensor_2p7sq_max_setfile_num = ARRAY_SIZE(sensor_2p7sq_setfiles_A);
+       } else if (strcmp(setfile, "setB") == 0) {
+               probe_info("%s setfile_B\n", __func__);
+               sensor_2p7sq_global = sensor_2p7sq_setfile_B_Global;
+               sensor_2p7sq_global_size = ARRAY_SIZE(sensor_2p7sq_setfile_B_Global);
+               sensor_2p7sq_setfiles = sensor_2p7sq_setfiles_B;
+               sensor_2p7sq_setfile_sizes = sensor_2p7sq_setfile_B_sizes;
+               sensor_2p7sq_pllinfos = sensor_2p7sq_pllinfos_B;
+               sensor_2p7sq_max_setfile_num = ARRAY_SIZE(sensor_2p7sq_setfiles_B);
+       } else {
+               err("%s setfile index out of bound, take default (setfile_A)", __func__);
+               sensor_2p7sq_global = sensor_2p7sq_setfile_A_Global;
+               sensor_2p7sq_global_size = ARRAY_SIZE(sensor_2p7sq_setfile_A_Global);
+               sensor_2p7sq_setfiles = sensor_2p7sq_setfiles_A;
+               sensor_2p7sq_setfile_sizes = sensor_2p7sq_setfile_A_sizes;
+               sensor_2p7sq_pllinfos = sensor_2p7sq_pllinfos_A;
+               sensor_2p7sq_max_setfile_num = ARRAY_SIZE(sensor_2p7sq_setfiles_A);
+       }
+
        cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
        probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
 
index 05681486566dd2bb6895374bc0988e32d425320a..fd67474e0f703c3c8b2932dadc2e3813f014ee4a 100644 (file)
@@ -1655,7 +1655,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_2p7sx_probe(struct i2c_client *client,
@@ -1779,9 +1778,6 @@ static int cis_2p7sx_probe(struct i2c_client *client,
                sensor_2p7sx_max_setfile_num = ARRAY_SIZE(sensor_2p7sx_setfiles_A);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index bc0d263abac09f4bf6ffa9fe7e4b10c07ff87bda..721f9c307b7de5db51e93fca6c12521d7cf05111 100644 (file)
@@ -1615,7 +1615,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_2p8_probe(struct i2c_client *client,
@@ -1734,9 +1733,6 @@ static int cis_2p8_probe(struct i2c_client *client,
                sensor_2p8_max_setfile_num = sizeof(sensor_2p8_setfiles_A) / sizeof(sensor_2p8_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 3fba5e3e75777456f1e1b42150020c6a6c5065e2..72d0a8c53c66b7dfb94bf470edfb0728e2803296 100644 (file)
@@ -143,41 +143,6 @@ static int sensor_2t7sx_wait_stream_off_status(cis_shared_data *cis_data)
        return ret;
 }
 
-void sensor_2t7sx_cis_select_setfile(struct v4l2_subdev *subdev)
-{
-       u8 rev = 0;
-       struct fimc_is_cis *cis = NULL;
-
-       WARN_ON(!subdev);
-
-       cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev);
-       WARN_ON(!cis);
-       WARN_ON(!cis->cis_data);
-
-       rev = cis->cis_data->cis_rev;
-
-       switch (rev) {
-       case 0xA0: /* 2T7SX */
-               pr_info("%s setfile_A(2T7SX)\n", __func__);
-               sensor_2t7sx_global = sensor_2t7sx_setfile_A_Global;
-               sensor_2t7sx_global_size = ARRAY_SIZE(sensor_2t7sx_setfile_A_Global);
-               sensor_2t7sx_setfiles = sensor_2t7sx_setfiles_A;
-               sensor_2t7sx_setfile_sizes = sensor_2t7sx_setfile_A_sizes;
-               sensor_2t7sx_max_setfile_num = ARRAY_SIZE(sensor_2t7sx_setfiles_A);
-               sensor_2t7sx_pllinfos = sensor_2t7sx_pllinfos_A;
-               break;
-       default:
-               err("Unsupported 2p7sq sensor revision(%#x) use setfile_A for default\n", rev);
-               sensor_2t7sx_global = sensor_2t7sx_setfile_A_Global;
-               sensor_2t7sx_global_size = ARRAY_SIZE(sensor_2t7sx_setfile_A_Global);
-               sensor_2t7sx_setfiles = sensor_2t7sx_setfiles_A;
-               sensor_2t7sx_setfile_sizes = sensor_2t7sx_setfile_A_sizes;
-               sensor_2t7sx_max_setfile_num = ARRAY_SIZE(sensor_2t7sx_setfiles_A);
-               sensor_2t7sx_pllinfos = sensor_2t7sx_pllinfos_A;
-               break;
-       }
-}
-
 /* CIS OPS */
 int sensor_2t7sx_cis_init(struct v4l2_subdev *subdev)
 {
@@ -210,8 +175,6 @@ int sensor_2t7sx_cis_init(struct v4l2_subdev *subdev)
                ret = 0;
        }
 
-       sensor_2t7sx_cis_select_setfile(subdev);
-
        cis->cis_data->cur_width = SENSOR_2T7SX_MAX_WIDTH;
        cis->cis_data->cur_height = SENSOR_2T7SX_MAX_HEIGHT;
        cis->cis_data->low_expo_start = 33000;
@@ -1788,6 +1751,33 @@ static int cis_2t7sx_probe(struct i2c_client *client,
                setfile = "default";
        }
 
+       if (strcmp(setfile, "default") == 0 ||
+                       strcmp(setfile, "setA") == 0) {
+               probe_info("%s setfile_A\n", __func__);
+               sensor_2t7sx_global = sensor_2t7sx_setfile_A_Global;
+               sensor_2t7sx_global_size = ARRAY_SIZE(sensor_2t7sx_setfile_A_Global);
+               sensor_2t7sx_setfiles = sensor_2t7sx_setfiles_A;
+               sensor_2t7sx_setfile_sizes = sensor_2t7sx_setfile_A_sizes;
+               sensor_2t7sx_pllinfos = sensor_2t7sx_pllinfos_A;
+               sensor_2t7sx_max_setfile_num = ARRAY_SIZE(sensor_2t7sx_setfiles_A);
+       } else if (strcmp(setfile, "setB") == 0) {
+               probe_info("%s setfile_B\n", __func__);
+               sensor_2t7sx_global = sensor_2t7sx_setfile_B_Global;
+               sensor_2t7sx_global_size = ARRAY_SIZE(sensor_2t7sx_setfile_B_Global);
+               sensor_2t7sx_setfiles = sensor_2t7sx_setfiles_B;
+               sensor_2t7sx_setfile_sizes = sensor_2t7sx_setfile_B_sizes;
+               sensor_2t7sx_pllinfos = sensor_2t7sx_pllinfos_B;
+               sensor_2t7sx_max_setfile_num = ARRAY_SIZE(sensor_2t7sx_setfiles_B);
+       } else {
+               err("%s setfile index out of bound, take default (setfile_A)", __func__);
+               sensor_2t7sx_global = sensor_2t7sx_setfile_A_Global;
+               sensor_2t7sx_global_size = ARRAY_SIZE(sensor_2t7sx_setfile_A_Global);
+               sensor_2t7sx_setfiles = sensor_2t7sx_setfiles_A;
+               sensor_2t7sx_setfile_sizes = sensor_2t7sx_setfile_A_sizes;
+               sensor_2t7sx_pllinfos = sensor_2t7sx_pllinfos_A;
+               sensor_2t7sx_max_setfile_num = ARRAY_SIZE(sensor_2t7sx_setfiles_A);
+       }
+
        cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
        probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
 
index 52a02551729675709b14727a8d4ddc9d0c0b85f4..c05413efa0d080938497192f3f77bc67c37e0e76 100644 (file)
@@ -6762,7 +6762,7 @@ const u32 sensor_2x5sp_setfiles_A_otp_initial[] = {
 const struct sensor_pll_info_compact sensor_2x5sp_pllinfo_A_2880x2160_30fps = {
        EXT_CLK_Mhz * 1000 * 1000, /* ext_clk */
        1200000000, /* mipi_datarate */
-       957670000,      /* pclk  = VT pix CLK (this value is different by cis) */
+       478830000,      /* pclk  = VT pix CLK (this value is different by cis) */
        0x13C8, /* frame_length_lines   (0x0340) */
        0x189A, /* line_length_pck      (0x0342) */
 };
index 6cec160abbbb2ae5b5a413e68b5945ba665ff622..c1779b125e2a479b268d1a6137ebac08de2da9e6 100644 (file)
@@ -161,38 +161,6 @@ int sensor_2x5sp_cis_check_rev(struct v4l2_subdev *subdev)
        return ret;
 }
 
-#if 0
-int sensor_2x5sp_cis_otp_check_awb_ratio(char *unit, char *golden, char *limit)
-{
-       int ret = 0;
-
-       float r_g_min = (float)(limit[0]) / 1000;
-       float r_g_max = (float)(limit[1]) / 1000;
-       float b_g_min = (float)(limit[2]) / 1000;
-       float b_g_max = (float)(limit[3]) / 1000;
-
-       float rg = (float) ((unit[1]) | (unit[0] << 8)) / 16384;
-       float bg = (float) ((unit[3]) | (unit[2] << 8)) / 16384;
-
-       float golden_rg = (float) ((golden[1]) | (golden[0] << 8)) / 16384;
-       float golden_bg = (float) ((golden[3]) | (golden[2] << 8)) / 16384;
-
-       if (rg < (golden_rg - r_g_min) || rg > (golden_rg + r_g_max)) {
-               err("%s(): Final RG calibration factors out of range! rg=0x%x golden_rg=0x%x",
-                       __func__, (unit[1] | unit[0] << 8), (golden[1] | golden[0] << 8));
-               ret = 1;
-       }
-
-       if (bg < (golden_bg - b_g_min) || bg > (golden_bg + b_g_max)) {
-               err("%s(): Final BG calibration factors out of range! bg=0x%x, golden_bg=0x%x",
-                       __func__, (unit[3] | unit[2] << 8), (golden[3] | golden[2] << 8));
-               ret = 1;
-       }
-
-       return ret;
-}
-#endif
-
 int sensor_2x5sp_cis_otp_check_awb_ratio(char *unit, char *golden, char *limit)
 {
        int ret = 0;
@@ -2465,7 +2433,7 @@ static int cis_2x5sp_probe(struct i2c_client *client,
 
        subdev_cis = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
        if (!subdev_cis) {
-               err("subdev_cis NULL");
+               probe_err("subdev_cis NULL");
                ret = -ENOMEM;
                goto p_err;
        }
index 7f1d57636e923c5b9e061b165ad65a9bff19c83e..11de650a656afa8caf25e9c091be584e6f5566e4 100644 (file)
@@ -1706,7 +1706,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_3h1_probe(struct i2c_client *client,
@@ -1815,9 +1814,6 @@ static int cis_3h1_probe(struct i2c_client *client,
                snprintf(subdev_cis->name, V4L2_SUBDEV_NAME_SIZE, "cis-subdev.%d", cis->id);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        if (of_property_read_string(dnode, "setfile", &setfile)) {
                err("setfile index read fail(%d), take default setfile!!", ret);
                setfile = "default";
index 14986ddca17bb111890d803ab8bd48b3fd9c45d6..e7e518a5d33e0664f31bba6e28612bc3f298bd4f 100644 (file)
@@ -1629,7 +1629,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_3l2_probe(struct i2c_client *client,
@@ -1757,9 +1756,6 @@ static int cis_3l2_probe(struct i2c_client *client,
                sensor_3l2_max_setfile_num = sizeof(sensor_3l2_setfiles_A) / sizeof(sensor_3l2_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 779e84e78e122c124d435469550e8182c53eeb1c..9d0e58bdade5257bf13421fb0ec9231494e68e22 100644 (file)
@@ -1621,7 +1621,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_3m2_probe(struct i2c_client *client,
@@ -1746,9 +1745,6 @@ static int cis_3m2_probe(struct i2c_client *client,
                sensor_3m2_max_setfile_num = sizeof(sensor_3m2_setfiles_A) / sizeof(sensor_3m2_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 49337db5c10cce468817501ef0135f272eb59dd0..ef277cfe5b8d05e981094227b2a7783ebbd648be 100644 (file)
@@ -2077,7 +2077,6 @@ static struct fimc_is_cis_ops cis_ops = {
 #ifdef CAMERA_REAR2_SENSOR_SHIFT_CROP
        .cis_update_pdaf_tail_size = sensor_3m3_cis_update_pdaf_tail_size,
 #endif
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
        .cis_check_rev = sensor_3m3_cis_check_rev,
 };
 
@@ -2210,9 +2209,6 @@ static int cis_3m3_probe(struct i2c_client *client,
                setfile = "default";
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 78100df00a61a4c882d9b329b1af8bf4b04788b5..a586b226b7bf7d94c1bbdeb7e24e14ccb85e6731 100644 (file)
@@ -1609,7 +1609,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_3p3_probe(struct i2c_client *client,
@@ -1728,9 +1727,6 @@ static int cis_3p3_probe(struct i2c_client *client,
                sensor_3p3_max_setfile_num = sizeof(sensor_3p3_setfiles_A) / sizeof(sensor_3p3_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 0c5addc46d0cb0af731a40ce5460b206bf211622..8b339a3db8ba3749aa3d3070e7800ff0406ce811 100644 (file)
@@ -1688,7 +1688,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_3p8_probe(struct i2c_client *client,
@@ -1825,9 +1824,6 @@ static int cis_3p8_probe(struct i2c_client *client,
                sensor_3p8_pllinfos = sensor_3p8_pllinfos_A;
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index fef70329110832778dcc29bff678e4f30d6c9e14..5bc6e0084477f3c12b50f325ebd4b4ede09408ab 100644 (file)
@@ -1641,7 +1641,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_3p8sp_probe(struct i2c_client *client,
@@ -1766,9 +1765,6 @@ static int cis_3p8sp_probe(struct i2c_client *client,
                sensor_3p8sp_pllinfos = sensor_3p8sp_pllinfos_A;
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index e6f6db15d0e6fa627b87099e7f31ae707844bdcb..9a328a661689c3e0ceda43eda150212ca162201a 100644 (file)
@@ -1668,7 +1668,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_4e6_probe(struct i2c_client *client,
@@ -1780,9 +1779,6 @@ static int cis_4e6_probe(struct i2c_client *client,
                snprintf(subdev_cis->name, V4L2_SUBDEV_NAME_SIZE, "cis-subdev.%d", cis->id);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        ret = of_property_read_string(dnode, "setfile", &setfile);
        if (ret) {
                err("setfile index read fail(%d), take default setfile!!", ret);
index d1ab955fbc8ed231ae5cbac2140922f8080f7181..1b24638759fb9bff72ee1d727f35fc0a6350db5e 100644 (file)
@@ -1669,7 +1669,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_4h5_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_4h5_probe(struct i2c_client *client,
@@ -1788,9 +1787,6 @@ static int cis_4h5_probe(struct i2c_client *client,
                sensor_4h5_max_setfile_num = sizeof(sensor_4h5_setfiles_A) / sizeof(sensor_4h5_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index ed8ba8ec842272bc62831e3817f7eb5c6874402c..accf23da5d7ed4d9d13293c8cd6b4ac77bc6caa0 100644 (file)
@@ -1684,7 +1684,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_4h5yc_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_4h5yc_probe(struct i2c_client *client,
@@ -1801,9 +1800,6 @@ static int cis_4h5yc_probe(struct i2c_client *client,
                sensor_4h5yc_max_setfile_num = sizeof(sensor_4h5yc_setfiles_A) / sizeof(sensor_4h5yc_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 0e28f5111fd30b4c746ed8daf87536ccfce2fa3e..2d23f92e1199f066553a7b737a61d538d9fd8065 100644 (file)
@@ -1588,7 +1588,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_5e2_probe(struct i2c_client *client,
@@ -1701,9 +1700,6 @@ static int cis_5e2_probe(struct i2c_client *client,
                sensor_5e2_max_setfile_num = sizeof(sensor_5e2_setfiles_A) / sizeof(sensor_5e2_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 769467d6c62495fc4f4078e8a5b1ea5c54c0603b..695235455f96f369e86e7b3e5db79b5a9fa63a7e 100644 (file)
@@ -1768,7 +1768,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int __init cis_5e3_probe(struct i2c_client *client,
@@ -1900,9 +1899,6 @@ static int __init cis_5e3_probe(struct i2c_client *client,
                sensor_5e3_max_setfile_num = sizeof(sensor_5e3_setfiles_A) / sizeof(sensor_5e3_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index c8428722c97505a6f578cd8f2ccad9cc2f5fbd1b..2bf1ce26384597568cd54e3e9a201d9e9c9c6430 100755 (executable)
@@ -63,7 +63,7 @@ const u32 sensor_5e9_setfile_C_Global[] = {
        0x3C35, 0x5C, 0x1,
 };
 
-/* 26Mhz, 5E9_2592x1944_30fps_MCLK26_0917.txt */
+/* S5K5E9_2592x1944_30fps_871Mbps_MCLK26_1109.txt */
 const u32 sensor_5e9_setfile_C_2592x1944_30fps[] = {
        0x0136, 0x1A, 0x1,
        0x0137, 0x00, 0x1,
@@ -113,6 +113,7 @@ const u32 sensor_5e9_setfile_C_2592x1944_30fps[] = {
        0x30B8, 0x2E, 0x1,
        0x30BA, 0x36, 0x1,
        /* dual slave setting */
+       /* TODO: dual slave setting */
 #if 0
        0x3C02, 0x01, 0x1,
        0x3C05, 0x1D, 0x1,
index 23cf8c853744488ed5e724b35795061a947b3b1c..33139f7f2dfa6f8412d51fff5cd62e0682b4fde6 100644 (file)
@@ -635,7 +635,7 @@ const u32 sensor_gm1sp_setfile_A_4000x3000_30fps[] = {
 const struct sensor_pll_info_compact sensor_gm1sp_pllinfo_A_4000x3000_30fps = {
        EXT_CLK_Mhz * 1000 * 1000, /* ext_clk */
        1152670000, /* mipi_datarate */
-       483170000,      /* pclk  = VT pix CLK (this value is different by cis) */
+       120790000,      /* pclk  = VT pix CLK (this value is different by cis) */
        0x0C86, /* frame_length_lines   (0x0340) */
        0x13A0, /* line_length_pck      (0x0342) */
 };
index acf3aa36b434f096ef2cf9fc5c6e2ebf66c44bbd..67c4935929e437827e532cfb5c17851cbca5d946 100644 (file)
@@ -2542,920 +2542,6 @@ const u32 sensor_gm1sp_setfile_B_1280x720_240fps[] = {
        0x6F12, 0xA32E, 0x2,
 };
 
-const u32 sensor_gm1sp_setfile_B_4000x3000_30fps_Gyro_test_1st[] = {
-       0x6028, 0x4000, 0x2,
-       0x6214, 0x7971, 0x2,
-       0x6218, 0x7150, 0x2,
-       0x0344, 0x0008, 0x2,
-       0x0346, 0x0008, 0x2,
-       0x0348, 0x0FA7, 0x2,
-       0x034A, 0x0BBF, 0x2,
-       0x034C, 0x0FA0, 0x2,
-       0x034E, 0x0BB8, 0x2,
-       0x0350, 0x0000, 0x2,
-       0x0352, 0x0000, 0x2,
-       0x0340, 0x0C86, 0x2,
-       0x0342, 0x13A0, 0x2,
-       0x0900, 0x0111, 0x2,
-       0x0380, 0x0001, 0x2,
-       0x0382, 0x0001, 0x2,
-       0x0384, 0x0001, 0x2,
-       0x0386, 0x0001, 0x2,
-       0x0404, 0x1000, 0x2,
-       0x0402, 0x1010, 0x2,
-       0x0136, 0x1A00, 0x2,
-       0x0304, 0x0006, 0x2,
-       0x030C, 0x0000, 0x2,
-       0x0306, 0x00DF, 0x2,
-       0x0302, 0x0001, 0x2,
-       0x0300, 0x0008, 0x2,
-       0x030E, 0x0003, 0x2,
-       0x0312, 0x0001, 0x2,
-       0x0310, 0x0085, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x1492, 0x2,
-       0x6F12, 0x0078, 0x2,
-       0x602A, 0x0E4E, 0x2,
-       0x6F12, 0x007A, 0x2,
-       0x6028, 0x4000, 0x2,
-       0x0118, 0x0004, 0x2,
-       0x021E, 0x0000, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x2126, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x1168, 0x2,
-       0x6F12, 0x0020, 0x2,
-       0x602A, 0x2DB6, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x1668, 0x2,
-       0x6F12, 0xF0F0, 0x2,
-       0x602A, 0x166A, 0x2,
-       0x6F12, 0xF0F0, 0x2,
-       0x602A, 0x118A, 0x2,
-       0x6F12, 0x0802, 0x2,
-       0x602A, 0x151E, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x217E, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x1520, 0x2,
-       0x6F12, 0x0008, 0x2,
-       0x602A, 0x2522, 0x2,
-       0x6F12, 0x0804, 0x2,
-       0x602A, 0x2524, 0x2,
-       0x6F12, 0x0400, 0x2,
-       0x602A, 0x2568, 0x2,
-       0x6F12, 0x5500, 0x2,
-       0x602A, 0x2588, 0x2,
-       0x6F12, 0x1111, 0x2,
-       0x602A, 0x258C, 0x2,
-       0x6F12, 0x1111, 0x2,
-       0x602A, 0x25A6, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x252C, 0x2,
-       0x6F12, 0x0601, 0x2,
-       0x602A, 0x252E, 0x2,
-       0x6F12, 0x0605, 0x2,
-       0x602A, 0x25A8, 0x2,
-       0x6F12, 0x1100, 0x2,
-       0x602A, 0x25AC, 0x2,
-       0x6F12, 0x0011, 0x2,
-       0x602A, 0x25B0, 0x2,
-       0x6F12, 0x1100, 0x2,
-       0x602A, 0x25B4, 0x2,
-       0x6F12, 0x0011, 0x2,
-       0x602A, 0x15A4, 0x2,
-       0x6F12, 0x0141, 0x2,
-       0x602A, 0x15A6, 0x2,
-       0x6F12, 0x0545, 0x2,
-       0x602A, 0x15A8, 0x2,
-       0x6F12, 0x0649, 0x2,
-       0x602A, 0x15AA, 0x2,
-       0x6F12, 0x024D, 0x2,
-       0x602A, 0x15AC, 0x2,
-       0x6F12, 0x0151, 0x2,
-       0x602A, 0x15AE, 0x2,
-       0x6F12, 0x0555, 0x2,
-       0x602A, 0x15B0, 0x2,
-       0x6F12, 0x0659, 0x2,
-       0x602A, 0x15B2, 0x2,
-       0x6F12, 0x025D, 0x2,
-       0x602A, 0x15B4, 0x2,
-       0x6F12, 0x0161, 0x2,
-       0x602A, 0x15B6, 0x2,
-       0x6F12, 0x0565, 0x2,
-       0x602A, 0x15B8, 0x2,
-       0x6F12, 0x0669, 0x2,
-       0x602A, 0x15BA, 0x2,
-       0x6F12, 0x026D, 0x2,
-       0x602A, 0x15BC, 0x2,
-       0x6F12, 0x0171, 0x2,
-       0x602A, 0x15BE, 0x2,
-       0x6F12, 0x0575, 0x2,
-       0x602A, 0x15C0, 0x2,
-       0x6F12, 0x0679, 0x2,
-       0x602A, 0x15C2, 0x2,
-       0x6F12, 0x027D, 0x2,
-       0x602A, 0x15C4, 0x2,
-       0x6F12, 0x0141, 0x2,
-       0x602A, 0x15C6, 0x2,
-       0x6F12, 0x0545, 0x2,
-       0x602A, 0x15C8, 0x2,
-       0x6F12, 0x0649, 0x2,
-       0x602A, 0x15CA, 0x2,
-       0x6F12, 0x024D, 0x2,
-       0x602A, 0x15CC, 0x2,
-       0x6F12, 0x0151, 0x2,
-       0x602A, 0x15CE, 0x2,
-       0x6F12, 0x0555, 0x2,
-       0x602A, 0x15D0, 0x2,
-       0x6F12, 0x0659, 0x2,
-       0x602A, 0x15D2, 0x2,
-       0x6F12, 0x025D, 0x2,
-       0x602A, 0x15D4, 0x2,
-       0x6F12, 0x0161, 0x2,
-       0x602A, 0x15D6, 0x2,
-       0x6F12, 0x0565, 0x2,
-       0x602A, 0x15D8, 0x2,
-       0x6F12, 0x0669, 0x2,
-       0x602A, 0x15DA, 0x2,
-       0x6F12, 0x026D, 0x2,
-       0x602A, 0x15DC, 0x2,
-       0x6F12, 0x0171, 0x2,
-       0x602A, 0x15DE, 0x2,
-       0x6F12, 0x0575, 0x2,
-       0x602A, 0x15E0, 0x2,
-       0x6F12, 0x0679, 0x2,
-       0x602A, 0x15E2, 0x2,
-       0x6F12, 0x027D, 0x2,
-       0x602A, 0x1A50, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x1A54, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x6028, 0x4000, 0x2,
-       0x0D00, 0x0101, 0x2,
-       0x0D02, 0x0001, 0x2,
-       0x0114, 0x0300, 0x2,
-       0x0202, 0x0010, 0x2,
-       0x0226, 0x0010, 0x2,
-       0x0204, 0x0020, 0x2,
-       0x0B06, 0x0101, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x107A, 0x2,
-       0x6F12, 0x1D00, 0x2,
-       0x602A, 0x1074, 0x2,
-       0x6F12, 0x1D00, 0x2,
-       0x602A, 0x0E7C, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1120, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x1122, 0x2,
-       0x6F12, 0x0028, 0x2,
-       0x602A, 0x1128, 0x2,
-       0x6F12, 0x0604, 0x2,
-       0x602A, 0x1AC0, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x1AC2, 0x2,
-       0x6F12, 0x0002, 0x2,
-       0x602A, 0x1494, 0x2,
-       0x6F12, 0x3D68, 0x2,
-       0x602A, 0x1498, 0x2,
-       0x6F12, 0xF10D, 0x2,
-       0x602A, 0x1488, 0x2,
-       0x6F12, 0x0F04, 0x2,
-       0x602A, 0x148A, 0x2,
-       0x6F12, 0x170B, 0x2,
-       0x602A, 0x150E, 0x2,
-       0x6F12, 0x00C2, 0x2,
-       0x602A, 0x1510, 0x2,
-       0x6F12, 0xC0AF, 0x2,
-       0x602A, 0x1512, 0x2,
-       0x6F12, 0x00A0, 0x2,
-       0x602A, 0x1486, 0x2,
-       0x6F12, 0x1430, 0x2,
-       0x602A, 0x1490, 0x2,
-       0x6F12, 0x4D09, 0x2,
-       0x602A, 0x149E, 0x2,
-       0x6F12, 0x01C4, 0x2,
-       0x602A, 0x11CC, 0x2,
-       0x6F12, 0x0008, 0x2,
-       0x602A, 0x11CE, 0x2,
-       0x6F12, 0x000B, 0x2,
-       0x602A, 0x11D0, 0x2,
-       0x6F12, 0x0003, 0x2,
-       0x602A, 0x11DA, 0x2,
-       0x6F12, 0x0012, 0x2,
-       0x602A, 0x11E6, 0x2,
-       0x6F12, 0x002A, 0x2,
-       0x602A, 0x125E, 0x2,
-       0x6F12, 0x0048, 0x2,
-       0x602A, 0x11F4, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x11F8, 0x2,
-       0x6F12, 0x0016, 0x2,
-       0x6028, 0x4000, 0x2,
-       0xF444, 0x05BF, 0x2,
-       0xF44A, 0x0008, 0x2,
-       0xF44E, 0x0012, 0x2,
-       0xF46E, 0x40C0, 0x2,
-       0xF470, 0x7809, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x1CAA, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CAC, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CAE, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB0, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB2, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB4, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB6, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB8, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CBA, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CBC, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CBE, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC0, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC2, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC4, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC6, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC8, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x6000, 0x2,
-       0x6F12, 0x000F, 0x2,
-       0x602A, 0x6002, 0x2,
-       0x6F12, 0xFFFF, 0x2,
-       0x602A, 0x6004, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x6006, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6008, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x600A, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x600C, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x600E, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6010, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6012, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6014, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6016, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6018, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x601A, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x601C, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x601E, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6020, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6022, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6024, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6026, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6028, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x602A, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x602C, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x1144, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x1146, 0x2,
-       0x6F12, 0x1B00, 0x2,
-       0x602A, 0x1080, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x1084, 0x2,
-       0x6F12, 0x00C0, 0x2,
-       0x602A, 0x108A, 0x2,
-       0x6F12, 0x00C0, 0x2,
-       0x602A, 0x1090, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x1092, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1094, 0x2,
-       0x6F12, 0xA32E, 0x2,
-       0x6028, 0x4000, 0x2,
-       0x010C, 0x0100, 0x2,
-       0x011A, 0x0401, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x0EB0, 0x2,
-       0x6F12, 0x0400, 0x2,
-       0x602A, 0x0ECA, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0E2D, 0x2,
-       0x6F12, 0x0130, 0x2,
-       0x602A, 0x0EDC, 0x2,
-       0x6F12, 0x0002, 0x2,
-       0x602A, 0x0EDE, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0E80, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0EDA, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x0E88, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0E8A, 0x2,
-       0x6F12, 0x0060, 0x2,
-       0x602A, 0x0ED8, 0x2,
-       0x6F12, 0x0A00, 0x2,
-       0x602A, 0x102C, 0x2,
-       0x6F12, 0x0075, 0x2,
-       0x602A, 0x1030, 0x2,
-       0x6F12, 0x0041, 0x2,
-       0x602A, 0x0F8C, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0F8E, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F90, 0x2,
-       0x6F12, 0x0051, 0x2,
-       0x602A, 0x0F92, 0x2,
-       0x6F12, 0x0800, 0x2,
-       0x602A, 0x0F94, 0x2,
-       0x6F12, 0x0052, 0x2,
-       0x602A, 0x0F96, 0x2,
-       0x6F12, 0x0400, 0x2,
-       0x602A, 0x0F98, 0x2,
-       0x6F12, 0x004F, 0x2,
-       0x602A, 0x0F9A, 0x2,
-       0x6F12, 0x0600, 0x2,
-       0x602A, 0x0F9C, 0x2,
-       0x6F12, 0x004E, 0x2,
-       0x602A, 0x0F9E, 0x2,
-       0x6F12, 0x0C00, 0x2,
-       0x602A, 0x0FA0, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0FA2, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0EEC, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0EEE, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0EF0, 0x2,
-       0x6F12, 0x0014, 0x2,
-       0x602A, 0x0EF2, 0x2,
-       0x6F12, 0x1B00, 0x2,
-       0x602A, 0x0EF4, 0x2,
-       0x6F12, 0x0013, 0x2,
-       0x602A, 0x0EF6, 0x2,
-       0x6F12, 0x0600, 0x2,
-       0x602A, 0x0EF8, 0x2,
-       0x6F12, 0x004C, 0x2,
-       0x602A, 0x0EFA, 0x2,
-       0x6F12, 0x3300, 0x2,
-       0x602A, 0x0EFC, 0x2,
-       0x6F12, 0x0065, 0x2,
-       0x602A, 0x0EFE, 0x2,
-       0x6F12, 0x0800, 0x2,
-       0x602A, 0x0F00, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0F02, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0F04, 0x2,
-       0x6F12, 0x007A, 0x2,
-       0x602A, 0x0F06, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x0F08, 0x2,
-       0x6F12, 0x007B, 0x2,
-       0x602A, 0x0F0A, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x0F0C, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0F0E, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x0F10, 0x2,
-       0x6F12, 0x0071, 0x2,
-       0x602A, 0x0F12, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F14, 0x2,
-       0x6F12, 0x0072, 0x2,
-       0x602A, 0x0F16, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F18, 0x2,
-       0x6F12, 0x0073, 0x2,
-       0x602A, 0x0F1A, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F1C, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0F1E, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F20, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F22, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0FDC, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0FDE, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x0FE0, 0x2,
-       0x6F12, 0x0071, 0x2,
-       0x602A, 0x0FE2, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0FE4, 0x2,
-       0x6F12, 0x0072, 0x2,
-       0x602A, 0x0FE6, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0FE8, 0x2,
-       0x6F12, 0x0073, 0x2,
-       0x602A, 0x0FEA, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0FEC, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0FEE, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0FF0, 0x2,
-       0x6F12, 0x004E, 0x2,
-       0x602A, 0x0FF2, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x102E, 0x2,
-       0x6F12, 0x0025, 0x2,
-       0x602A, 0x602E, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x6038, 0x2,
-       0x6F12, 0x0103, 0x2,
-       0x602A, 0x603A, 0x2,
-       0x6F12, 0x005F, 0x2,
-       0x602A, 0x603C, 0x2,
-       0x6F12, 0x0060, 0x2,
-       0x602A, 0x603E, 0x2,
-       0x6F12, 0x0061, 0x2,
-};
-
-const u32 sensor_gm1sp_setfile_B_4000x3000_30fps_Gyro_test_2nd[] = {
-       0x6028, 0x4000, 0x2,
-       0x6214, 0x7971, 0x2,
-       0x6218, 0x7150, 0x2,
-       0x0344, 0x0008, 0x2,
-       0x0346, 0x0008, 0x2,
-       0x0348, 0x0FA7, 0x2,
-       0x034A, 0x0BBF, 0x2,
-       0x034C, 0x0FA0, 0x2,
-       0x034E, 0x0BB8, 0x2,
-       0x0350, 0x0000, 0x2,
-       0x0352, 0x0000, 0x2,
-       0x0340, 0x0C86, 0x2,
-       0x0342, 0x13A0, 0x2,
-       0x0900, 0x0111, 0x2,
-       0x0380, 0x0001, 0x2,
-       0x0382, 0x0001, 0x2,
-       0x0384, 0x0001, 0x2,
-       0x0386, 0x0001, 0x2,
-       0x0404, 0x1000, 0x2,
-       0x0402, 0x1010, 0x2,
-       0x0136, 0x1A00, 0x2,
-       0x0304, 0x0006, 0x2,
-       0x030C, 0x0000, 0x2,
-       0x0306, 0x00DF, 0x2,
-       0x0302, 0x0001, 0x2,
-       0x0300, 0x0008, 0x2,
-       0x030E, 0x0003, 0x2,
-       0x0312, 0x0001, 0x2,
-       0x0310, 0x0085, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x1492, 0x2,
-       0x6F12, 0x0078, 0x2,
-       0x602A, 0x0E4E, 0x2,
-       0x6F12, 0x007A, 0x2,
-       0x6028, 0x4000, 0x2,
-       0x0118, 0x0004, 0x2,
-       0x021E, 0x0000, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x2126, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x1168, 0x2,
-       0x6F12, 0x0020, 0x2,
-       0x602A, 0x2DB6, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x1668, 0x2,
-       0x6F12, 0xF0F0, 0x2,
-       0x602A, 0x166A, 0x2,
-       0x6F12, 0xF0F0, 0x2,
-       0x602A, 0x118A, 0x2,
-       0x6F12, 0x0802, 0x2,
-       0x602A, 0x151E, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x217E, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x1520, 0x2,
-       0x6F12, 0x0008, 0x2,
-       0x602A, 0x2522, 0x2,
-       0x6F12, 0x0804, 0x2,
-       0x602A, 0x2524, 0x2,
-       0x6F12, 0x0400, 0x2,
-       0x602A, 0x2568, 0x2,
-       0x6F12, 0x5500, 0x2,
-       0x602A, 0x2588, 0x2,
-       0x6F12, 0x1111, 0x2,
-       0x602A, 0x258C, 0x2,
-       0x6F12, 0x1111, 0x2,
-       0x602A, 0x25A6, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x252C, 0x2,
-       0x6F12, 0x0601, 0x2,
-       0x602A, 0x252E, 0x2,
-       0x6F12, 0x0605, 0x2,
-       0x602A, 0x25A8, 0x2,
-       0x6F12, 0x1100, 0x2,
-       0x602A, 0x25AC, 0x2,
-       0x6F12, 0x0011, 0x2,
-       0x602A, 0x25B0, 0x2,
-       0x6F12, 0x1100, 0x2,
-       0x602A, 0x25B4, 0x2,
-       0x6F12, 0x0011, 0x2,
-       0x602A, 0x15A4, 0x2,
-       0x6F12, 0x0141, 0x2,
-       0x602A, 0x15A6, 0x2,
-       0x6F12, 0x0545, 0x2,
-       0x602A, 0x15A8, 0x2,
-       0x6F12, 0x0649, 0x2,
-       0x602A, 0x15AA, 0x2,
-       0x6F12, 0x024D, 0x2,
-       0x602A, 0x15AC, 0x2,
-       0x6F12, 0x0151, 0x2,
-       0x602A, 0x15AE, 0x2,
-       0x6F12, 0x0555, 0x2,
-       0x602A, 0x15B0, 0x2,
-       0x6F12, 0x0659, 0x2,
-       0x602A, 0x15B2, 0x2,
-       0x6F12, 0x025D, 0x2,
-       0x602A, 0x15B4, 0x2,
-       0x6F12, 0x0161, 0x2,
-       0x602A, 0x15B6, 0x2,
-       0x6F12, 0x0565, 0x2,
-       0x602A, 0x15B8, 0x2,
-       0x6F12, 0x0669, 0x2,
-       0x602A, 0x15BA, 0x2,
-       0x6F12, 0x026D, 0x2,
-       0x602A, 0x15BC, 0x2,
-       0x6F12, 0x0171, 0x2,
-       0x602A, 0x15BE, 0x2,
-       0x6F12, 0x0575, 0x2,
-       0x602A, 0x15C0, 0x2,
-       0x6F12, 0x0679, 0x2,
-       0x602A, 0x15C2, 0x2,
-       0x6F12, 0x027D, 0x2,
-       0x602A, 0x15C4, 0x2,
-       0x6F12, 0x0141, 0x2,
-       0x602A, 0x15C6, 0x2,
-       0x6F12, 0x0545, 0x2,
-       0x602A, 0x15C8, 0x2,
-       0x6F12, 0x0649, 0x2,
-       0x602A, 0x15CA, 0x2,
-       0x6F12, 0x024D, 0x2,
-       0x602A, 0x15CC, 0x2,
-       0x6F12, 0x0151, 0x2,
-       0x602A, 0x15CE, 0x2,
-       0x6F12, 0x0555, 0x2,
-       0x602A, 0x15D0, 0x2,
-       0x6F12, 0x0659, 0x2,
-       0x602A, 0x15D2, 0x2,
-       0x6F12, 0x025D, 0x2,
-       0x602A, 0x15D4, 0x2,
-       0x6F12, 0x0161, 0x2,
-       0x602A, 0x15D6, 0x2,
-       0x6F12, 0x0565, 0x2,
-       0x602A, 0x15D8, 0x2,
-       0x6F12, 0x0669, 0x2,
-       0x602A, 0x15DA, 0x2,
-       0x6F12, 0x026D, 0x2,
-       0x602A, 0x15DC, 0x2,
-       0x6F12, 0x0171, 0x2,
-       0x602A, 0x15DE, 0x2,
-       0x6F12, 0x0575, 0x2,
-       0x602A, 0x15E0, 0x2,
-       0x6F12, 0x0679, 0x2,
-       0x602A, 0x15E2, 0x2,
-       0x6F12, 0x027D, 0x2,
-       0x602A, 0x1A50, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x1A54, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x6028, 0x4000, 0x2,
-       0x0D00, 0x0101, 0x2,
-       0x0D02, 0x0001, 0x2,
-       0x0114, 0x0300, 0x2,
-       0x0202, 0x0010, 0x2,
-       0x0226, 0x0010, 0x2,
-       0x0204, 0x0020, 0x2,
-       0x0B06, 0x0101, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x107A, 0x2,
-       0x6F12, 0x1D00, 0x2,
-       0x602A, 0x1074, 0x2,
-       0x6F12, 0x1D00, 0x2,
-       0x602A, 0x0E7C, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1120, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x1122, 0x2,
-       0x6F12, 0x0028, 0x2,
-       0x602A, 0x1128, 0x2,
-       0x6F12, 0x0604, 0x2,
-       0x602A, 0x1AC0, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x1AC2, 0x2,
-       0x6F12, 0x0002, 0x2,
-       0x602A, 0x1494, 0x2,
-       0x6F12, 0x3D68, 0x2,
-       0x602A, 0x1498, 0x2,
-       0x6F12, 0xF10D, 0x2,
-       0x602A, 0x1488, 0x2,
-       0x6F12, 0x0F04, 0x2,
-       0x602A, 0x148A, 0x2,
-       0x6F12, 0x170B, 0x2,
-       0x602A, 0x150E, 0x2,
-       0x6F12, 0x00C2, 0x2,
-       0x602A, 0x1510, 0x2,
-       0x6F12, 0xC0AF, 0x2,
-       0x602A, 0x1512, 0x2,
-       0x6F12, 0x00A0, 0x2,
-       0x602A, 0x1486, 0x2,
-       0x6F12, 0x1430, 0x2,
-       0x602A, 0x1490, 0x2,
-       0x6F12, 0x4D09, 0x2,
-       0x602A, 0x149E, 0x2,
-       0x6F12, 0x01C4, 0x2,
-       0x602A, 0x11CC, 0x2,
-       0x6F12, 0x0008, 0x2,
-       0x602A, 0x11CE, 0x2,
-       0x6F12, 0x000B, 0x2,
-       0x602A, 0x11D0, 0x2,
-       0x6F12, 0x0003, 0x2,
-       0x602A, 0x11DA, 0x2,
-       0x6F12, 0x0012, 0x2,
-       0x602A, 0x11E6, 0x2,
-       0x6F12, 0x002A, 0x2,
-       0x602A, 0x125E, 0x2,
-       0x6F12, 0x0048, 0x2,
-       0x602A, 0x11F4, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x11F8, 0x2,
-       0x6F12, 0x0016, 0x2,
-       0x6028, 0x4000, 0x2,
-       0xF444, 0x05BF, 0x2,
-       0xF44A, 0x0008, 0x2,
-       0xF44E, 0x0012, 0x2,
-       0xF46E, 0x40C0, 0x2,
-       0xF470, 0x7809, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x1CAA, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CAC, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CAE, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB0, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB2, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB4, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB6, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CB8, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CBA, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CBC, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CBE, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC0, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC2, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC4, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC6, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1CC8, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x6000, 0x2,
-       0x6F12, 0x000F, 0x2,
-       0x602A, 0x6002, 0x2,
-       0x6F12, 0xFFFF, 0x2,
-       0x602A, 0x6004, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x6006, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6008, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x600A, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x600C, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x600E, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6010, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6012, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6014, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6016, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6018, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x601A, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x601C, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x601E, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6020, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6022, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6024, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6026, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x6028, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x602A, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x602C, 0x2,
-       0x6F12, 0x1000, 0x2,
-       0x602A, 0x1144, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x1146, 0x2,
-       0x6F12, 0x1B00, 0x2,
-       0x602A, 0x1080, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x1084, 0x2,
-       0x6F12, 0x00C0, 0x2,
-       0x602A, 0x108A, 0x2,
-       0x6F12, 0x00C0, 0x2,
-       0x602A, 0x1090, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x1092, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x1094, 0x2,
-       0x6F12, 0xA32E, 0x2,
-       0x6028, 0x4000, 0x2,
-       0x010C, 0x0100, 0x2,
-       0x011A, 0x0401, 0x2,
-       0x6028, 0x2000, 0x2,
-       0x602A, 0x0EB0, 0x2,
-       0x6F12, 0x0400, 0x2,
-       0x602A, 0x0ECA, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0E2D, 0x2,
-       0x6F12, 0x0130, 0x2,
-       0x602A, 0x0EDC, 0x2,
-       0x6F12, 0x0002, 0x2,
-       0x602A, 0x0EDE, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0E80, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0EDA, 0x2,
-       0x6F12, 0x0001, 0x2,
-       0x602A, 0x0E88, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0E8A, 0x2,
-       0x6F12, 0x0060, 0x2,
-       0x602A, 0x0ED8, 0x2,
-       0x6F12, 0x0A00, 0x2,
-       0x602A, 0x102C, 0x2,
-       0x6F12, 0x0075, 0x2,
-       0x602A, 0x1030, 0x2,
-       0x6F12, 0x0041, 0x2,
-       0x602A, 0x0F8C, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0F8E, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F90, 0x2,
-       0x6F12, 0x0051, 0x2,
-       0x602A, 0x0F92, 0x2,
-       0x6F12, 0x0800, 0x2,
-       0x602A, 0x0F94, 0x2,
-       0x6F12, 0x0052, 0x2,
-       0x602A, 0x0F96, 0x2,
-       0x6F12, 0x0400, 0x2,
-       0x602A, 0x0F98, 0x2,
-       0x6F12, 0x004F, 0x2,
-       0x602A, 0x0F9A, 0x2,
-       0x6F12, 0x0600, 0x2,
-       0x602A, 0x0F9C, 0x2,
-       0x6F12, 0x004E, 0x2,
-       0x602A, 0x0F9E, 0x2,
-       0x6F12, 0x0C00, 0x2,
-       0x602A, 0x0FA0, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0FA2, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0EEC, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0EEE, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0EF0, 0x2,
-       0x6F12, 0x0014, 0x2,
-       0x602A, 0x0EF2, 0x2,
-       0x6F12, 0x1B00, 0x2,
-       0x602A, 0x0EF4, 0x2,
-       0x6F12, 0x0013, 0x2,
-       0x602A, 0x0EF6, 0x2,
-       0x6F12, 0x0600, 0x2,
-       0x602A, 0x0EF8, 0x2,
-       0x6F12, 0x004C, 0x2,
-       0x602A, 0x0EFA, 0x2,
-       0x6F12, 0x3300, 0x2,
-       0x602A, 0x0EFC, 0x2,
-       0x6F12, 0x0065, 0x2,
-       0x602A, 0x0EFE, 0x2,
-       0x6F12, 0x0800, 0x2,
-       0x602A, 0x0F00, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0F02, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0F04, 0x2,
-       0x6F12, 0x007A, 0x2,
-       0x602A, 0x0F06, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x0F08, 0x2,
-       0x6F12, 0x007B, 0x2,
-       0x602A, 0x0F0A, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x0F0C, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0F0E, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x0F10, 0x2,
-       0x6F12, 0x0071, 0x2,
-       0x602A, 0x0F12, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F14, 0x2,
-       0x6F12, 0x0072, 0x2,
-       0x602A, 0x0F16, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F18, 0x2,
-       0x6F12, 0x0073, 0x2,
-       0x602A, 0x0F1A, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F1C, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0F1E, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0F20, 0x2,
-       0x6F12, 0x0070, 0x2,
-       0x602A, 0x0F22, 0x2,
-       0x6F12, 0x0700, 0x2,
-       0x602A, 0x0FDC, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0FDE, 0x2,
-       0x6F12, 0x0200, 0x2,
-       0x602A, 0x0FE0, 0x2,
-       0x6F12, 0x0071, 0x2,
-       0x602A, 0x0FE2, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0FE4, 0x2,
-       0x6F12, 0x0072, 0x2,
-       0x602A, 0x0FE6, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0FE8, 0x2,
-       0x6F12, 0x0073, 0x2,
-       0x602A, 0x0FEA, 0x2,
-       0x6F12, 0x0100, 0x2,
-       0x602A, 0x0FEC, 0x2,
-       0x6F12, 0x0076, 0x2,
-       0x602A, 0x0FEE, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x0FF0, 0x2,
-       0x6F12, 0x004E, 0x2,
-       0x602A, 0x0FF2, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x102E, 0x2,
-       0x6F12, 0x0025, 0x2,
-       0x602A, 0x602E, 0x2,
-       0x6F12, 0x0000, 0x2,
-       0x602A, 0x6038, 0x2,
-       0x6F12, 0x0103, 0x2,
-       0x602A, 0x603A, 0x2,
-       0x6F12, 0x005F, 0x2,
-       0x602A, 0x603C, 0x2,
-       0x6F12, 0x0060, 0x2,
-       0x602A, 0x603E, 0x2,
-       0x6F12, 0x0061, 0x2,
-};
-
 /* for reduce mipi speed at thermal throttling state */
 const u32 sensor_gm1sp_setfile_B_4000x3000_15fps[] = {
        0x6028, 0x4000, 0x2,
@@ -3843,29 +2929,11 @@ const struct sensor_pll_info_compact sensor_gm1sp_pllinfo_B_1280x720_240fps = {
        0x0990, /* line_length_pck      (0x0342) */
 };
 
-const struct sensor_pll_info_compact sensor_gm1sp_pllinfo_B_4000x3000_30fps_gyro_test_1st = {
-       EXT_CLK_Mhz * 1000 * 1000, /* ext_clk */
-       1152670000, /* mipi_datarate */
-       483170000,      /* pclk  = VT pix CLK (this value is different by cis) */
-       0x0C86, /* frame_length_lines   (0x0340) */
-       0x13A0, /* line_length_pck      (0x0342) */
-};
-
-const struct sensor_pll_info_compact sensor_gm1sp_pllinfo_B_4000x3000_30fps_gyro_test_2nd = {
-       EXT_CLK_Mhz * 1000 * 1000, /* ext_clk */
-       1152670000, /* mipi_datarate */
-       483170000,      /* pclk  = VT pix CLK (this value is different by cis) */
-       0x0C86, /* frame_length_lines   (0x0340) */
-       0x13A0, /* line_length_pck      (0x0342) */
-};
-
 static const u32 *sensor_gm1sp_setfiles_B[] = {
        sensor_gm1sp_setfile_B_4000x3000_30fps,
        sensor_gm1sp_setfile_B_2000x1124_60fps,
        sensor_gm1sp_setfile_B_2000x1124_120fps,
        sensor_gm1sp_setfile_B_1280x720_240fps,
-       sensor_gm1sp_setfile_B_4000x3000_30fps_Gyro_test_1st,
-       sensor_gm1sp_setfile_B_4000x3000_30fps_Gyro_test_2nd,
 };
 
 static const u32 sensor_gm1sp_setfile_B_sizes[] = {
@@ -3873,8 +2941,6 @@ static const u32 sensor_gm1sp_setfile_B_sizes[] = {
        ARRAY_SIZE(sensor_gm1sp_setfile_B_2000x1124_60fps),
        ARRAY_SIZE(sensor_gm1sp_setfile_B_2000x1124_120fps),
        ARRAY_SIZE(sensor_gm1sp_setfile_B_1280x720_240fps),
-       ARRAY_SIZE(sensor_gm1sp_setfile_B_4000x3000_30fps_Gyro_test_1st),
-       ARRAY_SIZE(sensor_gm1sp_setfile_B_4000x3000_30fps_Gyro_test_2nd),
 };
 
 static const struct sensor_pll_info_compact *sensor_gm1sp_pllinfos_B[] = {
@@ -3882,7 +2948,5 @@ static const struct sensor_pll_info_compact *sensor_gm1sp_pllinfos_B[] = {
        &sensor_gm1sp_pllinfo_B_2000x1124_60fps,
        &sensor_gm1sp_pllinfo_B_2000x1124_120fps,
        &sensor_gm1sp_pllinfo_B_1280x720_240fps,
-       &sensor_gm1sp_pllinfo_B_4000x3000_30fps_gyro_test_1st,
-       &sensor_gm1sp_pllinfo_B_4000x3000_30fps_gyro_test_2nd,
 };
 #endif
index d7b6191a733cdab837385373a354d2a90a4ca9cc..14d3fc2639232ddaa028e181d8ee51eedf30399e 100644 (file)
@@ -189,12 +189,6 @@ int sensor_gm1sp_cis_init(struct v4l2_subdev *subdev)
        cis->cis_data->low_expo_start = 33000;
        cis->need_mode_change = false;
 
-       cis->gyro_test_val.x = 0;
-       cis->gyro_test_val.y = 0;
-       cis->gyro_test_val.z = 0;
-       cis->gyro_test_val.state = SENSOR_GYRO_INFO_STATE_BASE;
-       cis->gyro_self_test_step = 0;
-
        sensor_gm1sp_cis_data_calculation(sensor_gm1sp_pllinfos[setfile_index], cis->cis_data);
 
        setinfo.return_value = 0;
@@ -352,6 +346,7 @@ int sensor_gm1sp_cis_set_global_setting(struct v4l2_subdev *subdev)
        I2C_MUTEX_LOCK(cis->i2c_lock);
 
        ret = sensor_cis_set_registers(subdev, sensor_gm1sp_global, sensor_gm1sp_global_size);
+
        if (ret < 0) {
                err("sensor_gm1sp_set_registers fail!!");
                goto p_err;
@@ -381,14 +376,6 @@ int sensor_gm1sp_cis_mode_change(struct v4l2_subdev *subdev, u32 mode)
                return -EINVAL;
        }
 
-       if (cis->gyro_self_test_step == 1) {
-               mode = GYRO_SELF_TEST_STEP1_SET_NUM;
-               info("%d setfile will be set for gyro self test step1\n", mode);
-       } else if (cis->gyro_self_test_step == 2) {
-               mode = GYRO_SELF_TEST_STEP2_SET_NUM;
-               info("%d setfile will be set for gyro self test step2\n", mode);
-       }
-
        sensor_gm1sp_cis_data_calculation(sensor_gm1sp_pllinfos[mode], cis->cis_data);
 
        I2C_MUTEX_LOCK(cis->i2c_lock);
@@ -459,8 +446,6 @@ int sensor_gm1sp_cis_stream_on(struct v4l2_subdev *subdev)
        struct fimc_is_cis *cis;
        struct i2c_client *client;
        cis_shared_data *cis_data;
-       u32 err_check = 0;
-       u8 read_val;
 
 #ifdef DEBUG_SENSOR_TIME
        struct timeval st, end;
@@ -518,50 +503,11 @@ int sensor_gm1sp_cis_stream_on(struct v4l2_subdev *subdev)
        dbg_sensor(1, "______ line_length_pck(%x)\n", pll);
        }
 #endif
+
        /* Sensor stream on */
        fimc_is_sensor_write16(client, 0x6028, 0x4000);
        fimc_is_sensor_write8(client, 0x0100, 0x01);
 
-       /* In second test step, get x,y,z gyro val by i2c transfer */
-       if (cis->gyro_self_test_step == 2) {
-               fimc_is_sensor_write16(client, 0x602c, 0x2000);
-               fimc_is_sensor_write16(client, 0x602e, 0x604e);
-               ret = fimc_is_sensor_read8(client, 0x6f12, &(read_val));
-               if (ret) {
-                       err_check++;
-                       err("fail to get gyro test x value\n");
-               } else {
-                       cis->gyro_test_val.x = (u32)read_val;
-               }
-
-               fimc_is_sensor_write16(client, 0x602e, 0x604f);
-               ret = fimc_is_sensor_read8(client, 0x6f12, &(read_val));
-               if (ret) {
-                       err_check++;
-                       err("fail to get gyro test y value\n");
-               } else {
-                       cis->gyro_test_val.y = (u32)read_val;
-               }
-
-               fimc_is_sensor_write16(client, 0x602e, 0x6050);
-               ret = fimc_is_sensor_read8(client, 0x6f12, &(read_val));
-               if (ret) {
-                       err_check++;
-                       err("fail to get gyro test z value\n");
-               } else {
-                       cis->gyro_test_val.z = (u32)read_val;
-               }
-
-               if (!err_check) {
-                       cis->gyro_test_val.state = SENSOR_GYRO_INFO_STATE_SUCCESS;
-                       info("success to get gyro test x(%d), y(%d), z(%d) value\n",
-                               cis->gyro_test_val.x, cis->gyro_test_val.y, cis->gyro_test_val.z);
-               } else {
-                       cis->gyro_test_val.state = SENSOR_GYRO_INFO_STATE_FAIL;
-                       err("Fail to get gyro test value\n");
-               }
-       }
-
        /* WDR */
        if (fimc_is_vender_wdr_mode_on(cis_data))
                fimc_is_sensor_write8(client, 0x021E, 0x01);
@@ -627,6 +573,8 @@ int sensor_gm1sp_cis_stream_off(struct v4l2_subdev *subdev)
        dbg_sensor(1, "[%s] time %lu us\n", __func__, (end.tv_sec - st.tv_sec) * 1000000 + (end.tv_usec - st.tv_usec));
 #endif
 
+       I2C_MUTEX_UNLOCK(cis->i2c_lock);
+
        return ret;
 }
 
@@ -1778,7 +1726,7 @@ static int cis_gm1sp_probe(struct i2c_client *client,
 
        subdev_cis = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
        if (!subdev_cis) {
-               err("subdev_cis NULL");
+               probe_err("subdev_cis NULL");
                ret = -ENOMEM;
                goto p_err;
        }
index 76b6346bc18e4beb4789b56741782265c490d30a..13e957b9d2e584c92e281cc78bce84144d636117 100644 (file)
@@ -29,8 +29,5 @@
 
 #define USE_GROUP_PARAM_HOLD   (0)
 
-#define GYRO_SELF_TEST_STEP1_SET_NUM   (4)
-#define GYRO_SELF_TEST_STEP2_SET_NUM   (5)
-
 #endif
 
index d869bfb55eb2bcc3b160701be0c7c2b221b54894..950f2e857596e2c029c5a373836034a66622af5c 100644 (file)
@@ -1616,7 +1616,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_get_max_digital_gain = sensor_imx219_cis_get_max_digital_gain,
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_imx219_probe(struct i2c_client *client,
@@ -1735,9 +1734,6 @@ static int cis_imx219_probe(struct i2c_client *client,
                sensor_imx219_max_setfile_num = sizeof(sensor_imx219_setfiles_A) / sizeof(sensor_imx219_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index eaaba5bda2ffb24bd64c6686b71835770856e257..e61cffc48776025c73e86dd75599cb34cadbcf07 100644 (file)
@@ -1531,7 +1531,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_get_max_digital_gain = sensor_imx241_cis_get_max_digital_gain,
        .cis_compensate_gain_for_extremely_br = sensor_imx241_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_imx241_probe(struct i2c_client *client,
@@ -1670,9 +1669,6 @@ static int cis_imx241_probe(struct i2c_client *client,
                sensor_imx241_max_setfile_num = sizeof(sensor_imx241_setfiles_A) / sizeof(sensor_imx241_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index e1b8f75318831586c49a5b8f4766c6045607e453..82ca677c24208feb60f4bf9f96ec13e2bcd5d88f 100644 (file)
@@ -1549,7 +1549,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_get_max_digital_gain = sensor_imx258_cis_get_max_digital_gain,
        .cis_compensate_gain_for_extremely_br = sensor_imx258_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_imx258_probe(struct i2c_client *client,
@@ -1688,9 +1687,6 @@ static int cis_imx258_probe(struct i2c_client *client,
                sensor_imx258_max_setfile_num = sizeof(sensor_imx258_setfiles_A) / sizeof(sensor_imx258_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 0a86705b5896fadea470363925c9e1c547c25e98..6543aa2aad4bd3230f86e5c1e9b41204c78bf6bf 100644 (file)
@@ -2142,7 +2142,6 @@ static struct fimc_is_cis_ops cis_ops_imx260 = {
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
        .cis_data_calculation = sensor_imx260_cis_data_calc,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_imx260_probe(struct i2c_client *client,
@@ -2255,9 +2254,6 @@ static int cis_imx260_probe(struct i2c_client *client,
                snprintf(subdev_cis->name, V4L2_SUBDEV_NAME_SIZE, "cis-subdev.%d", cis->id);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        ret = of_property_read_string(dnode, "setfile", &setfile);
        if (ret) {
                err("setfile index read fail(%d), take default setfile!!", ret);
index a4bd79bbb8d6f06139d98fda7d349d53140336f1..7e7848b6245f00151245a118120b2c41fe70bde2 100644 (file)
@@ -1931,7 +1931,6 @@ static struct fimc_is_cis_ops cis_ops_imx320 = {
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
        .cis_data_calculation = sensor_imx320_cis_data_calc,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_imx320_probe(struct i2c_client *client,
@@ -2044,9 +2043,6 @@ static int cis_imx320_probe(struct i2c_client *client,
                snprintf(subdev_cis->name, V4L2_SUBDEV_NAME_SIZE, "cis-subdev.%d", cis->id);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        ret = of_property_read_string(dnode, "setfile", &setfile);
        if (ret) {
                err("setfile index read fail(%d), take default setfile!!", ret);
index 17fa5d6ec438cee756b3d1ed878088f91c31960e..588613e634a28b8a6cd1876612847ee235c703b6 100644 (file)
@@ -2079,7 +2079,6 @@ static struct fimc_is_cis_ops cis_ops_imx333 = {
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_data_calculation = sensor_imx333_cis_data_calc,
        .cis_set_long_term_exposure = sensor_imx333_cis_long_term_exposure,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_imx333_probe(struct i2c_client *client,
@@ -2192,9 +2191,6 @@ static int cis_imx333_probe(struct i2c_client *client,
                snprintf(subdev_cis->name, V4L2_SUBDEV_NAME_SIZE, "cis-subdev.%d", cis->id);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        ret = of_property_read_string(dnode, "setfile", &setfile);
        if (ret) {
                err("setfile index read fail(%d), take default setfile!!", ret);
index 9a6ac8950404ffdf8f2a9d8ddc6f1f49e2b506ed..0f576c5dcc7eb539e4754afa0567c97572e9ead2 100644 (file)
@@ -1662,7 +1662,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
        .cis_wait_streamon = sensor_cis_wait_streamon,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 int cis_rpb_probe(struct i2c_client *client,
@@ -1807,9 +1806,6 @@ int cis_rpb_probe(struct i2c_client *client,
                return -EINVAL;
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index bd70bffcf2b4e3174798ae34edc750272692fef2..efb76bb83b6f2889868e1a9e204beed227b949aa 100644 (file)
@@ -1692,7 +1692,6 @@ static struct fimc_is_cis_ops cis_ops = {
        .cis_get_max_digital_gain = sensor_sr259_cis_get_max_digital_gain,
        .cis_compensate_gain_for_extremely_br = sensor_cis_compensate_gain_for_extremely_br,
        .cis_wait_streamoff = sensor_cis_wait_streamoff,
-       .cis_set_initial_exposure = sensor_cis_set_initial_exposure,
 };
 
 static int cis_sr259_probe(struct i2c_client *client,
@@ -1824,9 +1823,6 @@ static int cis_sr259_probe(struct i2c_client *client,
                sensor_sr259_max_setfile_num = sizeof(sensor_sr259_setfiles_A) / sizeof(sensor_sr259_setfiles_A[0]);
        }
 
-       cis->use_initial_ae = of_property_read_bool(dnode, "use_initial_ae");
-       probe_info("%s use initial_ae(%d)\n", __func__, cis->use_initial_ae);
-
        v4l2_i2c_subdev_init(subdev_cis, client, &subdev_ops);
        v4l2_set_subdevdata(subdev_cis, cis);
        v4l2_set_subdev_hostdata(subdev_cis, device);
index 941d8dae78a9991dd8f6af3b7609c06dfc1cae4e..18cc783c1db8d37a6d760a037b0212b525ad0540 100644 (file)
@@ -707,7 +707,7 @@ void fimc_is_sensor_ctl_frame_evt(struct fimc_is_device_sensor *device)
                /* 3. set dynamic duration */
                ctrl.id = V4L2_CID_SENSOR_ADJUST_FRAME_DURATION;
                ctrl.value = 0;
-               ret = fimc_is_sensor_peri_adj_ctrl(device, expo.long_val, &ctrl);
+               ret = fimc_is_sensor_peri_adj_ctrl(device, MAX(expo.long_val,expo.short_val), &ctrl);
                if (ret < 0)
                        err("err!!! ret(%d)", ret);
 
index 23df049b39d114dc957a395a0317ca2896709ac8..e82dc63c793ddffa33652a392a5b3fefbe1065ab 100644 (file)
@@ -102,11 +102,6 @@ struct fimc_is_cis {
 
        struct work_struct              throttling_work;
        bool                            throttling_mode;
-
-       /* step1: get gyro stat data by VC3 */
-       /* step2: get gyro stat data by VC3 and x,y,z value by meta */
-       struct sensor_gyro_info         gyro_test_val;
-       u32                             gyro_self_test_step;
 };
 
 struct fimc_is_actuator_data {
index 8a9120ff95c90e7693ca3cf01580eadf355b4953..008b2d73e1f27e5037a3ec2256665fd813b4a06f 100644 (file)
@@ -119,12 +119,12 @@ static int sensor_module_2x5sp_power_setpin(struct device *dev,
 
        /* TODO */
        gpio_reset = of_get_named_gpio(dnode, "gpio_reset", 0);
-       if (gpio_is_valid(gpio_reset)) {
-               gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "CAM_GPIO_OUTPUT_LOW");
-               gpio_free(gpio_reset);
-       } else {
+       if (!gpio_is_valid(gpio_reset)) {
                dev_err(dev, "failed to get PIN_RESET\n");
                return -EINVAL;
+       } else {
+               gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "CAM_GPIO_OUTPUT_LOW");
+               gpio_free(gpio_reset);
        }
 
        gpio_avdd_en = of_get_named_gpio(dnode, "gpio_avdd_en", 0);
@@ -298,7 +298,7 @@ static int __init sensor_module_2x5sp_probe(struct platform_device *pdev)
 
        subdev_module = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
        if (!subdev_module) {
-               err("subdev_module is NULL");
+               probe_err("subdev_module is NULL");
                ret = -ENOMEM;
                goto p_err;
        }
@@ -357,7 +357,7 @@ static int __init sensor_module_2x5sp_probe(struct platform_device *pdev)
        /* Sensor peri */
        module->private_data = kzalloc(sizeof(struct fimc_is_device_sensor_peri), GFP_KERNEL);
        if (!module->private_data) {
-               err("fimc_is_device_sensor_peri is NULL");
+               probe_err("fimc_is_device_sensor_peri is NULL");
                ret = -ENOMEM;
                goto p_err;
        }
index 9525865d6b3e05d95d01eeae963e6884c3bd44de..aaeb85975a22e3cdbe05a10fb5e3de3f66e83ea0 100755 (executable)
@@ -309,7 +309,7 @@ static int sensor_module_5e9_power_setpin_1(struct device *dev,
        return 0;
 }
 
-static int (*sensor_module_5e9_power_setpin[MAX_5E9_SETPIN_CNT])(struct device *dev,
+static int (* sensor_module_5e9_power_setpin[MAX_5E9_SETPIN_CNT])(struct device *dev,
        struct exynos_platform_fimc_is_module *pdata) = {
        sensor_module_5e9_power_setpin_0,
        sensor_module_5e9_power_setpin_1
index e6b11e87bf3ac7bc92b6d0e1c03248f70c61244f..5987c5313c490a2907b61593c6884cee21a2b397 100644 (file)
@@ -817,15 +817,6 @@ int sensor_module_s_ctrl(struct v4l2_subdev *subdev, struct v4l2_control *ctrl)
                        goto p_err;
                }
                break;
-       case V4L2_CID_GYRO_SELF_TEST:
-               if (ctrl->value > 2) {
-                       err("Gyro self test step(%d) is over 2\n", ctrl->value);
-                       ret = -EINVAL;
-                       goto p_err;
-               }
-               sensor_peri->cis.gyro_self_test_step = ctrl->value;
-               info("Gyro self test step(%d) is enabled\n", sensor_peri->cis.gyro_self_test_step);
-               break;
        default:
                err("err!!! Unknown CID(%#x)", ctrl->id);
                ret = -EINVAL;
@@ -1157,7 +1148,7 @@ int sensor_module_s_format(struct v4l2_subdev *subdev,
        }
 
        if (cis->cis_data->sens_config_index_cur != device->cfg->mode
-               || sensor_peri->mode_change_first == true || cis->gyro_self_test_step != 0) {
+               || sensor_peri->mode_change_first == true) {
                dbg_sensor(1, "[%s] mode changed(%d->%d)\n", __func__,
                                cis->cis_data->sens_config_index_cur, device->cfg->mode);
 
index 141e70d915dd2989be20327b53fa992b171db475..34f7d72d880e3be0867d2e416f49b52bec986a3d 100644 (file)
@@ -114,12 +114,12 @@ static int sensor_module_gm1sp_power_setpin(struct device *dev,
 
        /* TODO */
        gpio_reset = of_get_named_gpio(dnode, "gpio_reset", 0);
-       if (gpio_is_valid(gpio_reset)) {
-               gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "CAM_GPIO_OUTPUT_LOW");
-               gpio_free(gpio_reset);
-       } else {
+       if (!gpio_is_valid(gpio_reset)) {
                dev_err(dev, "failed to get PIN_RESET\n");
                return -EINVAL;
+       } else {
+               gpio_request_one(gpio_reset, GPIOF_OUT_INIT_LOW, "CAM_GPIO_OUTPUT_LOW");
+               gpio_free(gpio_reset);
        }
 
        gpio_avdd_en = of_get_named_gpio(dnode, "gpio_avdd_en", 0);
@@ -295,7 +295,7 @@ static int __init sensor_module_gm1sp_probe(struct platform_device *pdev)
 
        subdev_module = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL);
        if (!subdev_module) {
-               err("subdev_module is NULL");
+               probe_err("subdev_module is NULL");
                ret = -ENOMEM;
                goto p_err;
        }
@@ -365,7 +365,7 @@ static int __init sensor_module_gm1sp_probe(struct platform_device *pdev)
        /* Sensor peri */
        module->private_data = kzalloc(sizeof(struct fimc_is_device_sensor_peri), GFP_KERNEL);
        if (!module->private_data) {
-               err("fimc_is_device_sensor_peri is NULL");
+               probe_err("fimc_is_device_sensor_peri is NULL");
                ret = -ENOMEM;
                goto p_err;
        }
index 8f67d88df356e731b15e6def0f3f0570be92d961..d97143c5bda061751ffb716b477f53dede0a164f 100644 (file)
@@ -453,10 +453,8 @@ void __nocfi pafstat_notify(struct v4l2_subdev *subdev, unsigned int type, void
        unsigned long flag;
 
        pafstat = (struct fimc_is_pafstat *)v4l2_get_subdevdata(subdev);
-       if (!pafstat) {
+       if (!pafstat)
                err("%s, failed to get PAFSTAT", __func__);
-               return;
-       }
 
        switch (type) {
        case CSIS_NOTIFY_DMA_END_VC_MIPISTAT:
@@ -725,6 +723,8 @@ int fimc_is_pafstat_reset_recovery(struct v4l2_subdev *subdev, u32 reset_mode, i
 {
        int ret = 0;
        struct fimc_is_pafstat *pafstat;
+       struct v4l2_subdev_pad_config *cfg = NULL;
+       struct v4l2_subdev_format *fmt = NULL;
 
        pafstat = v4l2_get_subdevdata(subdev);
        if (!pafstat) {
@@ -736,25 +736,7 @@ int fimc_is_pafstat_reset_recovery(struct v4l2_subdev *subdev, u32 reset_mode, i
                pafstat_hw_com_s_output_mask(pafstat->regs_com, 1);
                pafstat_hw_sw_reset(pafstat->regs);
        } else {
-               struct fimc_is_module_enum *module;
-               struct v4l2_subdev_pad_config *cfg = NULL;
-               struct v4l2_subdev_format fmt;
-
-               module = (struct fimc_is_module_enum *)v4l2_get_subdev_hostdata(subdev);
-               if (!module) {
-                       err("[PAFSTAT:%d] A host data of PAFSTAT is null", pafstat->id);
-                       return -ENODEV;
-               }
-
-               if (!module->cfg) {
-                       err("module->cfg is NULL");
-                       return -EINVAL;
-               }
-
-               fmt.format.width = module->cfg->width;
-               fmt.format.height = module->cfg->height;
-
-               pafstat_s_format(subdev, cfg, &fmt);
+               pafstat_s_format(subdev, cfg, fmt);
                pafstat_s_stream(subdev, 1);
                pafstat_hw_com_s_output_mask(pafstat->regs_com, 0);
        }
index cd2585f57764b5f4d86b13ed6ccca9c176e0e1d8..f3e6644e75da36c93bdaaab360b4b4d6d8efcaad 100644 (file)
@@ -63,7 +63,7 @@ int pdp_hw_g_stat0(void __iomem *base, void *buf, size_t len)
 
        if (len < stat0_len) {
                stat0_len = len;
-               warn("the size of STAT0 buffer is too small: %zd < %zd",
+               warn("the size of STAT0 buffer is too small: %d < %d",
                                                        len, stat0_len);
        }