summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ff5783b)
CRs-fixed: (CR)
Change-Id: I45c71a809efb2cb65955977b0194a89e13771d0e
Signed-off-by: Dohyun Kim <dh5.kim@samsung.com>
Reviewed-on: https://gerrit.mot.com/
1358072
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
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
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_ADDR_CRC_START],
OTP_GRP_ADDR_CRC_SIZE);
if (crc_value != crc16) {
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_ADDR_CRC_START],
OTP_GRP_ADDR_CRC_SIZE);
if (crc_value != crc16) {
+ sensor_cis_otp_data_set(&check_buf[grp_offset + OTP_GRP_ADDR_CRC_START], "addr",
+ OTP_GRP_ADDR_CRC_SIZE, 0xff);
err("GR%d: Error to ADDR CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
err("GR%d: Error to ADDR CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_INFO_CRC_START],
OTP_GRP_INFO_CRC_SIZE);
if (crc_value != crc16) {
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_INFO_CRC_START],
OTP_GRP_INFO_CRC_SIZE);
if (crc_value != crc16) {
+ sensor_cis_otp_data_set(&check_buf[grp_offset + OTP_GRP_INFO_CRC_START], "info",
+ OTP_GRP_INFO_CRC_SIZE, 0xff);
err("GR%d: Error to INFO CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
err("GR%d: Error to INFO CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_AWB_CRC_START],
OTP_GRP_AWB_CRC_SIZE);
if (crc_value != crc16) {
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_AWB_CRC_START],
OTP_GRP_AWB_CRC_SIZE);
if (crc_value != crc16) {
+ sensor_cis_otp_data_set(&check_buf[grp_offset + OTP_GRP_AWB_CRC_START], "awb",
+ OTP_GRP_AWB_CRC_SIZE, 0xff);
err("GR%d: Error to AWB CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
err("GR%d: Error to AWB CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_LSC_XTC_CRC_START],
OTP_GRP_LSC_XTC_CRC_SIZE);
if (crc_value != crc16) {
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_LSC_XTC_CRC_START],
OTP_GRP_LSC_XTC_CRC_SIZE);
if (crc_value != crc16) {
+ sensor_cis_otp_data_set(&check_buf[grp_offset + OTP_GRP_LSC_XTC_CRC_START], "lsc_xtc",
+ OTP_GRP_LSC_XTC_CRC_SIZE, 0xff);
err("GR%d: Error to LSC_XTC CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
err("GR%d: Error to LSC_XTC CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_AE_SYNC_CRC_START],
OTP_GRP_AE_SYNC_CRC_SIZE);
if (crc_value != crc16) {
crc16 = sensor_cis_otp_get_crc16(&check_buf[grp_offset + OTP_GRP_AE_SYNC_CRC_START],
OTP_GRP_AE_SYNC_CRC_SIZE);
if (crc_value != crc16) {
+ sensor_cis_otp_data_set(&check_buf[grp_offset + OTP_GRP_AE_SYNC_CRC_START], "ae_sync",
+ OTP_GRP_AE_SYNC_CRC_SIZE, 0xff);
err("GR%d: Error to AE_SYNC CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
err("GR%d: Error to AE_SYNC CRC16 : 0x%x, cal buffer CRC: 0x%x", group, crc16, crc_value);
ret = -EINVAL;
} else
OTP_PAGE_START, OTP_PAGE_END,
OTP_PAGE_BASE, OTP_PAGE_START, OTP_PAGE_SIZE);
if (ret < 0) {
OTP_PAGE_START, OTP_PAGE_END,
OTP_PAGE_BASE, OTP_PAGE_START, OTP_PAGE_SIZE);
if (ret < 0) {
+ sensor_cis_otp_data_set(&otp_buf[0], "all", OTP_PAGE_SIZE * 64, 0xff);
err("Don't read to 5E9 OTP data");
goto p_err;
}
otp_group = sensor_5e9_cis_otp_group_check(device);
if (!otp_group) {
err("Don't read to 5E9 OTP data");
goto p_err;
}
otp_group = sensor_5e9_cis_otp_group_check(device);
if (!otp_group) {
+ sensor_cis_otp_data_set(&otp_buf[0], "all", OTP_PAGE_SIZE * 64, 0xff);
ret = -EINVAL;
goto p_err;
}
offset = sensor_5e9_cis_otp_offset_check(otp_group);
ret = sensor_5e9_cis_otp_check_crc(subdev, device, offset);
ret = -EINVAL;
goto p_err;
}
offset = sensor_5e9_cis_otp_offset_check(otp_group);
ret = sensor_5e9_cis_otp_check_crc(subdev, device, offset);
err("OTP data CRC check fail, check module");
err("OTP data CRC check fail, check module");
snprintf(file_str, sizeof(file_str), "%s%s", OTP_DATA_PATH, device->otp_filename);
/* Write to OTP data at file */
snprintf(file_str, sizeof(file_str), "%s%s", OTP_DATA_PATH, device->otp_filename);
/* Write to OTP data at file */
OTP_PAGE_START, OTP_PAGE_END,
OTP_PAGE_BASE, OTP_PAGE_START, OTP_PAGE_SIZE);
if (ret < 0) {
OTP_PAGE_START, OTP_PAGE_END,
OTP_PAGE_BASE, OTP_PAGE_START, OTP_PAGE_SIZE);
if (ret < 0) {
+ sensor_cis_otp_data_set(&otp_buf[0], "all", OTP_PAGE_SIZE * 64, 0xff);
err("Don't read to 5E9 OTP data");
goto p_err;
}
otp_group = sensor_5e9_cis_otp_group_check(device);
if (!otp_group) {
err("Don't read to 5E9 OTP data");
goto p_err;
}
otp_group = sensor_5e9_cis_otp_group_check(device);
if (!otp_group) {
+ sensor_cis_otp_data_set(&otp_buf[0], "all", OTP_PAGE_SIZE * 64, 0xff);
ret = -EINVAL;
goto p_err;
}
ret = -EINVAL;
goto p_err;
}