[9610] fimc-is2: add otp data set function
authorDohyun Kim <dh5.kim@samsung.com>
Thu, 16 May 2019 08:53:29 +0000 (17:53 +0900)
committerlingsen1 <lingsen1@lenovo.com>
Mon, 10 Jun 2019 03:25:32 +0000 (11:25 +0800)
CRs-fixed: (CR)

Change-Id: I8ffc5d9d43ae7b07903284c67b64d1f96ede43b9
Signed-off-by: Dohyun Kim <dh5.kim@samsung.com>
Reviewed-on: https://gerrit.mot.com/1358069
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Biming Li <libm1@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.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h

index 63dbd8b7187444bcefae4a84715232c3bbb61324..63aa7be4289a0f2d45b712d78341c3a81640ddca 100644 (file)
@@ -605,6 +605,17 @@ int sensor_cis_factory_test(struct v4l2_subdev *subdev)
        return ret;
 }
 
+void sensor_cis_otp_data_set(char *data, char *name, u32 size, u32 value)
+{
+       int i;
+
+       /* value setting to (name) cal data section */
+       for (i = 0; i < size; i++)
+               data[i] = value;
+
+       info("%s() Done: %s calibration data is %d set\n", __func__, name, value);
+}
+
 u16 sensor_cis_otp_get_crc16(char *data, int count)
 {
        char *tmp = data;
index 905b628967965eaf75a9c28e6e5bca30e6e2e351..424d5d7aa702cf9f72e95377c8cc069f30d0d8ec 100644 (file)
@@ -80,6 +80,7 @@ int sensor_cis_set_initial_exposure(struct v4l2_subdev *subdev);
 int sensor_cis_factory_test(struct v4l2_subdev *subdev);
 
 /* OTP function */
+void sensor_cis_otp_data_set(char *data, char *name, u32 size, u32 value);
 u16 sensor_cis_otp_get_crc16(char *data, int count);
 int sensor_cis_otp_read_file(const char *file_name, const void *data, unsigned long size);
 int sensor_cis_otp_write_file(const char *file_name, const void *data, unsigned long size);