Lines Matching full:otp
11 * 1. fix otp info null issue.
13 * 1. add buf read optimize otp read speed.
14 * 2. add mutex for otp read.
132 /* OTP base information*/ in otp_read_data()
185 /* OTP WB calibration data */ in otp_read_data()
212 /* OTP LSC calibration data */ in otp_read_data()
236 /* OTP sfr calibration data */ in otp_read_data()
277 eeprom_dev->otp = otp_ptr; in otp_read_data()
278 dev_info(dev, "get otp successful\n"); in otp_read_data()
280 eeprom_dev->otp = NULL; in otp_read_data()
282 dev_warn(&client->dev, "otp is NULL!\n"); in otp_read_data()
287 eeprom_dev->otp = NULL; in otp_read_data()
289 dev_warn(&client->dev, "@%s read otp err!\n", __func__); in otp_read_data()
786 eeprom_dev->otp = otp_ptr; in rkotp_read_data()
789 eeprom_dev->otp = NULL; in rkotp_read_data()
791 dev_warn(&client->dev, "otp is NULL!\n"); in rkotp_read_data()
825 if (!eeprom_dev->otp) { in eeprom_ioctl()
829 if (arg && eeprom_dev->otp) in eeprom_ioctl()
830 memcpy(arg, eeprom_dev->otp, in eeprom_ioctl()
846 if (dev && dev->otp) { in otp_eeprom_show()
850 if (dev->otp->awb_data.flag) { in otp_eeprom_show()
852 seq_printf(p, "flag=%d;\n", dev->otp->awb_data.flag); in otp_eeprom_show()
853 seq_printf(p, "r_value=%d;\n", dev->otp->awb_data.r_ratio); in otp_eeprom_show()
854 seq_printf(p, "b_value=%d;\n", dev->otp->awb_data.b_ratio); in otp_eeprom_show()
855 seq_printf(p, "gr_value=%d;\n", dev->otp->awb_data.g_ratio); in otp_eeprom_show()
857 seq_printf(p, "golden_r_value=%d;\n", dev->otp->awb_data.r_golden); in otp_eeprom_show()
858 seq_printf(p, "golden_b_value=%d;\n", dev->otp->awb_data.b_golden); in otp_eeprom_show()
859 seq_printf(p, "golden_gr_value=%d;\n", dev->otp->awb_data.g_golden); in otp_eeprom_show()
863 seq_printf(p, "flag=%d;\n", dev->otp->lsc_data.flag); in otp_eeprom_show()
864 seq_printf(p, "width=%d;\n", dev->otp->basic_data.size.width); in otp_eeprom_show()
865 seq_printf(p, "height=%d;\n", dev->otp->basic_data.size.height); in otp_eeprom_show()
866 seq_printf(p, "tablesize=%d;\n\n", dev->otp->lsc_data.table_size); in otp_eeprom_show()
871 seq_printf(p, "%d", (dev->otp->lsc_data.data[(i * 17 + j) * 2] << 8) in otp_eeprom_show()
872 | dev->otp->lsc_data.data[(i * 17 + j) * 2 + 1]); in otp_eeprom_show()
882 if (dev->otp->lsc_data.flag) { in otp_eeprom_show()
886 seq_printf(p, "%d", (dev->otp->lsc_data.data[(i * 17 + j) * 2 + in otp_eeprom_show()
887 1734] << 8) | dev->otp->lsc_data.data[(i * 17 + j) * in otp_eeprom_show()
900 seq_printf(p, "%d", (dev->otp->lsc_data.data[(i * 17 + j) * 2 + in otp_eeprom_show()
901 578] << 8) | dev->otp->lsc_data.data[(i * 17 + j) * in otp_eeprom_show()
914 seq_printf(p, "%d", (dev->otp->lsc_data.data[(i * 17 + j) * 2 + in otp_eeprom_show()
915 1156] << 8) | dev->otp->lsc_data.data[(i * 17 + j) * in otp_eeprom_show()
925 if (dev->otp->pdaf_data.flag) { in otp_eeprom_show()
926 gainmap_w = dev->otp->pdaf_data.gainmap_width; in otp_eeprom_show()
927 gainmap_h = dev->otp->pdaf_data.gainmap_height; in otp_eeprom_show()
928 dccmap_w = dev->otp->pdaf_data.dccmap_width; in otp_eeprom_show()
929 dccmap_h = dev->otp->pdaf_data.dccmap_height; in otp_eeprom_show()
931 seq_printf(p, "flag=%d;\n", dev->otp->pdaf_data.flag); in otp_eeprom_show()
939 (dev->otp->pdaf_data.gainmap[(i * gainmap_w + j) * 2] << 8) | in otp_eeprom_show()
940 dev->otp->pdaf_data.gainmap[(i * gainmap_w + j) * 2 + 1]); in otp_eeprom_show()
948 seq_printf(p, "dcc_mode=%d\n", dev->otp->pdaf_data.dcc_mode); in otp_eeprom_show()
949 seq_printf(p, "dcc_dir=%d\n", dev->otp->pdaf_data.dcc_dir); in otp_eeprom_show()
950 seq_printf(p, "dccmap_width=%d\n", dev->otp->pdaf_data.dccmap_width); in otp_eeprom_show()
951 seq_printf(p, "dccmap_height=%d\n", dev->otp->pdaf_data.dccmap_height); in otp_eeprom_show()
955 (dev->otp->pdaf_data.dccmap[(i * dccmap_w + j) * 2] << 8) | in otp_eeprom_show()
956 dev->otp->pdaf_data.dccmap[(i * dccmap_w + j) * 2 + 1]); in otp_eeprom_show()
966 if (dev->otp->af_data.flag) { in otp_eeprom_show()
968 seq_printf(p, "flag=%d;\n", dev->otp->af_data.flag); in otp_eeprom_show()
969 seq_printf(p, "af_inf=%d;\n", dev->otp->af_data.af_inf); in otp_eeprom_show()
970 seq_printf(p, "af_macro=%d;\n", dev->otp->af_data.af_macro); in otp_eeprom_show()
973 seq_puts(p, "otp is null!\n"); in otp_eeprom_show()
1062 kfree(eeprom_dev->otp); in eeprom_remove()
1111 MODULE_DESCRIPTION("OTP driver");