[COMMON] fimc-is2: Fix ois bu24218gwl not work
authorlibm1 <libm1@lenovo.com>
Tue, 19 Mar 2019 13:10:15 +0000 (21:10 +0800)
committerKim Gunho <gunho.kim@samsung.com>
Wed, 7 Aug 2019 13:00:19 +0000 (22:00 +0900)
Update the boot sequence
Delete debug log
Enable OIS init work option

Change-Id: I2035a0257440a90ef02cafec6ab391ef536361a2
Signed-off-by: libm1 <libm1@lenovo.com>
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/ois/fimc-is-ois-bu24218gwl.c

index 79aa1c4d533814f9e9d7447bdfbc11c103e74b09..71a18223b3259cf5ce342d6106712d606ba6a841 100644 (file)
@@ -37,7 +37,7 @@
 #define OIS_CAL_ACTUAL_DL_SIZE         0x28
 #define EEPROM_INFO_TABLE_REVISION     0x64
 
-#define OIS_DEBUG
+//#define OIS_DEBUG
 
 static u8 ois_fw_data[OIS_FW_NUM][OIS_FW_SIZE] = {{0},};
 static int ois_fw_data_size[OIS_FW_NUM] = {0,};
@@ -545,13 +545,8 @@ int fimc_is_ois_init(struct v4l2_subdev *subdev)
                ret = 0;
                goto p_err;
        }
-       I2C_MUTEX_UNLOCK(ois->i2c_lock);
-
-       /* wait 100ms */
-       usleep_range(100000, 100000);
-
-       I2C_MUTEX_LOCK(ois->i2c_lock);
        /* Gyro ON for OIS */
+       ret != fimc_is_ois_write(ois->client, 0x614F, 0x01);
        ret |= fimc_is_ois_write(ois->client, 0x6023, 0x02);
        ret |= fimc_is_ois_write(ois->client, 0x602C, 0x76);
        ret != fimc_is_ois_write(ois->client, 0x602D, 0x02);
@@ -560,10 +555,9 @@ int fimc_is_ois_init(struct v4l2_subdev *subdev)
        ret != fimc_is_ois_write(ois->client, 0x602C, 0x45);
        ret != fimc_is_ois_write(ois->client, 0x602D, 0x58);
        I2C_MUTEX_UNLOCK(ois->i2c_lock);
-       usleep_range(20000, 20000);
+       usleep_range(30000, 30000);
        I2C_MUTEX_LOCK(ois->i2c_lock);
        ret != fimc_is_ois_write(ois->client, 0x6023, 0x00);
-       ret != fimc_is_ois_write(ois->client, 0x614F, 0x01);
        ret != fimc_is_ois_write(ois->client, 0x6021, 0x7B);
        usleep_range(300, 300);
        ret != fimc_is_ois_read(ois->client, 0x6024, &ois_status);