include: uapi/linux/rk-camera-module.h modify otp struct

1. modify af inf
2. add module info

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I455e649c1ffe471e1b5239d95ae929ad85113248
This commit is contained in:
Zefa Chen
2021-10-19 15:34:30 +08:00
committed by Tao Huang
parent 11f9c06cc3
commit 295c091894
4 changed files with 60 additions and 16 deletions

View File

@@ -1599,9 +1599,10 @@ static void gc8034_get_otp(struct gc8034_otp_info *otp,
/* af */
if (otp->flag & 0x20) {
inf->af.flag = 1;
inf->af.vcm_start = otp->vcm_start;
inf->af.vcm_end = otp->vcm_end;
inf->af.vcm_dir = otp->vcm_dir;
inf->af.dir_cnt = 1;
inf->af.af_otp[0].vcm_start = otp->vcm_start;
inf->af.af_otp[0].vcm_end = otp->vcm_end;
inf->af.af_otp[0].vcm_dir = otp->vcm_dir;
}
}

View File

@@ -1016,9 +1016,10 @@ static void imx258_get_otp(struct imx258_otp_info *otp,
/* af */
if (otp->flag & 0x20) {
inf->af.flag = 1;
inf->af.vcm_start = otp->vcm_start;
inf->af.vcm_end = otp->vcm_end;
inf->af.vcm_dir = otp->vcm_dir;
inf->af.dir_cnt = 1;
inf->af.af_otp[0].vcm_start = otp->vcm_start;
inf->af.af_otp[0].vcm_end = otp->vcm_end;
inf->af.af_otp[0].vcm_dir = otp->vcm_dir;
}
/* lsc */
if (otp->flag & 0x10) {

View File

@@ -2195,9 +2195,10 @@ static void ov8858_get_r1a_otp(struct ov8858_otp_info_r1a *otp_r1a,
/* af */
if (otp_r1a->flag & 0x20) {
inf->af.flag = 1;
inf->af.vcm_start = otp_r1a->vcm_start;
inf->af.vcm_end = otp_r1a->vcm_end;
inf->af.vcm_dir = otp_r1a->vcm_dir;
inf->af.dir_cnt = 1;
inf->af.af_otp[0].vcm_start = otp_r1a->vcm_start;
inf->af.af_otp[0].vcm_end = otp_r1a->vcm_end;
inf->af.af_otp[0].vcm_dir = otp_r1a->vcm_dir;
}
/* lsc */
@@ -2264,9 +2265,10 @@ static void ov8858_get_r2a_otp(struct ov8858_otp_info_r2a *otp_r2a,
/* af */
if (otp_r2a->flag & 0x20) {
inf->af.flag = 1;
inf->af.vcm_start = otp_r2a->vcm_start;
inf->af.vcm_end = otp_r2a->vcm_end;
inf->af.vcm_dir = otp_r2a->vcm_dir;
inf->af.dir_cnt = 1;
inf->af.af_otp[0].vcm_start = otp_r2a->vcm_start;
inf->af.af_otp[0].vcm_end = otp_r2a->vcm_end;
inf->af.af_otp[0].vcm_dir = otp_r2a->vcm_dir;
}
/* lsc */

View File

@@ -21,6 +21,7 @@
#define RKMODULE_PADF_GAINMAP_LEN 1024
#define RKMODULE_PDAF_DCCMAP_LEN 256
#define RKMODULE_AF_OTP_MAX_LEN 3
#define RKMODULE_CAMERA_MODULE_INDEX "rockchip,camera-module-index"
#define RKMODULE_CAMERA_MODULE_FACING "rockchip,camera-module-facing"
@@ -169,16 +170,32 @@ struct rkmodule_lsc_inf {
__u16 table_size;
} __attribute__ ((packed));
/**
* enum rkmodule_af_dir - enum of module af otp direction
*/
enum rkmodele_af_otp_dir {
AF_OTP_DIR_HORIZONTAL = 0,
AF_OTP_DIR_UP = 1,
AF_OTP_DIR_DOWN = 2,
};
/**
* struct rkmodule_af_otp - module af otp in one direction
*/
struct rkmodule_af_otp {
__u32 vcm_start;
__u32 vcm_end;
__u32 vcm_dir;
};
/**
* struct rkmodule_af_inf - module af information
*
*/
struct rkmodule_af_inf {
__u32 flag;
__u32 vcm_start;
__u32 vcm_end;
__u32 vcm_dir;
__u32 dir_cnt;
struct rkmodule_af_otp af_otp[RKMODULE_AF_OTP_MAX_LEN];
} __attribute__ ((packed));
/**
@@ -198,6 +215,28 @@ struct rkmodule_pdaf_inf {
__u16 dccmap[RKMODULE_PDAF_DCCMAP_LEN];
} __attribute__ ((packed));
/**
* struct rkmodule_otp_module_inf - otp module info
*
*/
struct rkmodule_otp_module_inf {
__u32 flag;
__u8 vendor[8];
__u32 module_id;
__u16 version;
__u16 full_width;
__u16 full_height;
__u8 supplier_id;
__u8 year;
__u8 mouth;
__u8 day;
__u8 sensor_id;
__u8 lens_id;
__u8 vcm_id;
__u8 drv_id;
__u8 flip;
} __attribute__ ((packed));
/**
* struct rkmodule_inf - module information
*
@@ -209,6 +248,7 @@ struct rkmodule_inf {
struct rkmodule_lsc_inf lsc;
struct rkmodule_af_inf af;
struct rkmodule_pdaf_inf pdaf;
struct rkmodule_otp_module_inf module_inf;
} __attribute__ ((packed));
/**