From: Dohyun Kim Date: Thu, 16 May 2019 08:53:29 +0000 (+0900) Subject: [9610] fimc-is2: add otp data set function X-Git-Tag: MMI-PSB29.39-49-7~60 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cb470004e7b4d7469306211de0d5bcc59c3d113e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [9610] fimc-is2: add otp data set function CRs-fixed: (CR) Change-Id: I8ffc5d9d43ae7b07903284c67b64d1f96ede43b9 Signed-off-by: Dohyun Kim Reviewed-on: https://gerrit.mot.com/1358069 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Dawei Wang Reviewed-by: Biming Li Reviewed-by: Zhichao Chen Submit-Approved: Jira Key --- diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.c index 63dbd8b71874..63aa7be4289a 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.c @@ -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; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h index 905b62896796..424d5d7aa702 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h @@ -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);