[COMMON]fimc-is2: update max register value of again for ov sensor
authorxff <fangfang.xu@samsung.com>
Wed, 10 Apr 2019 12:28:36 +0000 (20:28 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Mon, 10 Jun 2019 03:24:59 +0000 (11:24 +0800)
CRs-fixed: (CR)

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

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

index b6384cfe2ef15e9677aa690293848463a8c5d90d..b7943adbdf73511d1f0649ab8baf149987d6da00 100755 (executable)
@@ -977,7 +977,7 @@ p_err:
 #define REG_1X_MAX_VALUE       0x00F8
 #define REG_2X_MAX_VALUE       0x01F0
 #define REG_4X_MAX_VALUE       0x03E0
-#define REG_8X_MAX_VALUE       0x07F0
+#define REG_8X_MAX_VALUE       0x07C0
 
 static u32 sensor_12a10_again_to_reg_value(u32 again)
 {
@@ -1123,7 +1123,6 @@ int sensor_12a10_cis_set_analog_gain(struct v4l2_subdev *subdev, struct ae_param
        analog_val[0] = (analog_gain & 0xFF00) >> 8;
        analog_val[1] = (analog_gain & 0x00FF);
        ret = fimc_is_sensor_write8_array(client, 0x3508, analog_val, 2);
-       ret = fimc_is_sensor_write8_array(client, 0x350c, analog_val, 2);
        if (ret < 0)
                goto p_err;
 
index 88dfe753d7a9931dae0667178c0ced137a2b2fa0..aa654795a22eb8edbfe4321f31a34d205ab3678b 100755 (executable)
@@ -970,7 +970,7 @@ p_err:
 #define REG_1X_MAX_VALUE       0x00F8
 #define REG_2X_MAX_VALUE       0x01F0
 #define REG_4X_MAX_VALUE       0x03E0
-#define REG_8X_MAX_VALUE       0x07F0
+#define REG_8X_MAX_VALUE       0x07C0
 
 static u32 sensor_12a10ff_again_to_reg_value(u32 again)
 {
@@ -1116,7 +1116,6 @@ int sensor_12a10ff_cis_set_analog_gain(struct v4l2_subdev *subdev, struct ae_par
        analog_val[0] = (analog_gain & 0xFF00) >> 8;
        analog_val[1] = (analog_gain & 0x00FF);
        ret = fimc_is_sensor_write8_array(client, 0x3508, analog_val, 2);
-       ret = fimc_is_sensor_write8_array(client, 0x350c, analog_val, 2);
        if (ret < 0)
                goto p_err;
 
index 0dcd4613baab38c9c210deb758d80238920ab075..87bfb4b782792d342d49456c2e9bc31b509550d9 100755 (executable)
@@ -938,7 +938,7 @@ p_err:
 #define REG_1X_MAX_VALUE       0x00F8
 #define REG_2X_MAX_VALUE       0x01F0
 #define REG_4X_MAX_VALUE       0x03E0
-#define REG_8X_MAX_VALUE       0x07F0
+#define REG_8X_MAX_VALUE       0x07C0
 
 static u32 sensor_16885c_again_to_reg_value(u32 again)
 {
@@ -1082,7 +1082,6 @@ int sensor_16885c_cis_set_analog_gain(struct v4l2_subdev *subdev, struct ae_para
 
        analog_val[0] = (analog_gain & 0xFF00) >> 8;
        analog_val[1] = (analog_gain & 0x00FF);
-       ret = fimc_is_sensor_write8_array(client, 0x3508, analog_val, 2);
        ret = fimc_is_sensor_write8_array(client, 0x350c, analog_val, 2);
        if (ret < 0)
                goto p_err;
@@ -1140,7 +1139,7 @@ int sensor_16885c_cis_get_analog_gain(struct v4l2_subdev *subdev, u32 *again)
                goto p_err;
        }
 
-       ret = fimc_is_sensor_read16(client, 0x3508, &analog_gain);
+       ret = fimc_is_sensor_read16(client, 0x350C, &analog_gain);
        if (ret < 0)
                goto p_err;