media: i2c: otp_eeprom: add pd_offset in pdaf part
Signed-off-by: Hu Kejun <william.hu@rock-chips.com> Change-Id: Ifa901449d7f7d5ffaeeec1498bbed4c4ee5a14f1
This commit is contained in:
@@ -1468,6 +1468,7 @@ static void gc8034_get_otp(struct otp_info *otp,
|
||||
inf->pdaf.flag = 1;
|
||||
inf->pdaf.gainmap_width = otp->pdaf_data.gainmap_width;
|
||||
inf->pdaf.gainmap_height = otp->pdaf_data.gainmap_height;
|
||||
inf->pdaf.pd_offset = otp->pdaf_data.pd_offset;
|
||||
inf->pdaf.dcc_mode = otp->pdaf_data.dcc_mode;
|
||||
inf->pdaf.dcc_dir = otp->pdaf_data.dcc_dir;
|
||||
inf->pdaf.dccmap_width = otp->pdaf_data.dccmap_width;
|
||||
|
||||
@@ -1206,6 +1206,7 @@ static void imx586_get_otp(struct otp_info *otp,
|
||||
inf->pdaf.flag = 1;
|
||||
inf->pdaf.gainmap_width = otp->pdaf_data.gainmap_width;
|
||||
inf->pdaf.gainmap_height = otp->pdaf_data.gainmap_height;
|
||||
inf->pdaf.pd_offset = otp->pdaf_data.pd_offset;
|
||||
inf->pdaf.dcc_mode = otp->pdaf_data.dcc_mode;
|
||||
inf->pdaf.dcc_dir = otp->pdaf_data.dcc_dir;
|
||||
inf->pdaf.dccmap_width = otp->pdaf_data.dccmap_width;
|
||||
|
||||
@@ -649,6 +649,11 @@ static void rkotp_read_pdaf(struct eeprom_device *eeprom_dev,
|
||||
checksum += otp_ptr->pdaf_data.dccmap_checksum;
|
||||
base_addr += 1;
|
||||
|
||||
ret |= read_reg_otp(client, base_addr,
|
||||
2, &otp_ptr->pdaf_data.pd_offset);
|
||||
checksum += otp_ptr->pdaf_data.pd_offset;
|
||||
base_addr += 2;
|
||||
|
||||
memset(pdaf_buf, 0, RK_PDAF_RESERVED_SIZE);
|
||||
ret |= read_reg_otp_buf(client, base_addr,
|
||||
RK_PDAF_RESERVED_SIZE, pdaf_buf);
|
||||
@@ -931,7 +936,7 @@ static int otp_eeprom_show(struct seq_file *p, void *v)
|
||||
seq_printf(p, "flag=%d;\n", dev->otp->pdaf_data.flag);
|
||||
seq_printf(p, "gainmap_width=%d;\n", gainmap_w);
|
||||
seq_printf(p, "gainmap_height=%d;\n", gainmap_h);
|
||||
|
||||
seq_printf(p, "pd_offset=%d\n", dev->otp->pdaf_data.pd_offset);
|
||||
seq_printf(p, "gainmap_table=\n");
|
||||
for (i = 0; i < gainmap_h; i++) {
|
||||
for (j = 0; j < gainmap_w; j++) {
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#define RK_LSC_RESERVED_SIZE 0x0020
|
||||
#define RK_GAINMAP_SIZE 0x0800
|
||||
#define RK_DCCMAP_SIZE 0x0200
|
||||
#define RK_PDAF_RESERVED_SIZE 0x0020
|
||||
#define RK_PDAF_RESERVED_SIZE 0x001e
|
||||
#define RK_AF_RESERVED_SIZE 0x0014
|
||||
#define RKOTP_MAX_MODULE 0x0008
|
||||
|
||||
@@ -151,6 +151,7 @@ struct pdaf_otp_info {
|
||||
u32 dccmap_height;
|
||||
u32 dccmap[RK_DCCMAP_SIZE];
|
||||
u32 dccmap_checksum;
|
||||
u32 pd_offset;
|
||||
u32 checksum;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
@@ -6203,6 +6203,7 @@ static void ov50c40_get_otp(struct otp_info *otp,
|
||||
inf->pdaf.flag = 1;
|
||||
inf->pdaf.gainmap_width = otp->pdaf_data.gainmap_width;
|
||||
inf->pdaf.gainmap_height = otp->pdaf_data.gainmap_height;
|
||||
inf->pdaf.pd_offset = otp->pdaf_data.pd_offset;
|
||||
inf->pdaf.dcc_mode = otp->pdaf_data.dcc_mode;
|
||||
inf->pdaf.dcc_dir = otp->pdaf_data.dcc_dir;
|
||||
inf->pdaf.dccmap_width = otp->pdaf_data.dccmap_width;
|
||||
|
||||
@@ -1265,6 +1265,7 @@ static void s5kjn1_get_otp(struct otp_info *otp,
|
||||
inf->pdaf.flag = 1;
|
||||
inf->pdaf.gainmap_width = otp->pdaf_data.gainmap_width;
|
||||
inf->pdaf.gainmap_height = otp->pdaf_data.gainmap_height;
|
||||
inf->pdaf.pd_offset = otp->pdaf_data.pd_offset;
|
||||
inf->pdaf.dcc_mode = otp->pdaf_data.dcc_mode;
|
||||
inf->pdaf.dcc_dir = otp->pdaf_data.dcc_dir;
|
||||
inf->pdaf.dccmap_width = otp->pdaf_data.dccmap_width;
|
||||
|
||||
@@ -326,6 +326,7 @@ struct rkmodule_pdaf_inf {
|
||||
__u32 dccmap_height;
|
||||
__u32 dcc_mode;
|
||||
__u32 dcc_dir;
|
||||
__u32 pd_offset;
|
||||
__u16 gainmap[RKMODULE_PADF_GAINMAP_LEN];
|
||||
__u16 dccmap[RKMODULE_PDAF_DCCMAP_LEN];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
Reference in New Issue
Block a user