From 11e45bd28742d6d1c23f9e3493158da1a3e03c5a Mon Sep 17 00:00:00 2001 From: xff Date: Wed, 10 Apr 2019 20:28:36 +0800 Subject: [PATCH] [COMMON] fimc-is2: update max register value of again for ov sensor Change-Id: Ied7f8d30133c3393d1c31f679b65dfb129387f41 Signed-off-by: xff --- .../fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10.c | 3 +-- .../sensor/module_framework/cis/fimc-is-cis-12a10ff.c | 3 +-- .../sensor/module_framework/cis/fimc-is-cis-16885c.c | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10.c index 4568e5c2f541..3beb0596c5e0 100755 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10.c @@ -946,7 +946,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) { @@ -1092,7 +1092,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; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10ff.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10ff.c index 17eaed547be6..5c23043d4e48 100755 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10ff.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-12a10ff.c @@ -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_12a10ff_again_to_reg_value(u32 again) { @@ -1084,7 +1084,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; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-16885c.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-16885c.c index 681f91c3ba2c..36b27aee0a1d 100755 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-16885c.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-16885c.c @@ -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; -- 2.20.1