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-QSAS30.62-33-3~774 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=10d0fc085d71594fe53c40f19e13e217b1fd89e9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [9610] fimc-is2: add otp data set function Change-Id: I8ffc5d9d43ae7b07903284c67b64d1f96ede43b9 Signed-off-by: Dohyun Kim --- 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);