summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHu Kejun <william.hu@rock-chips.com>2019-01-08 18:33:51 +0800
committerTao Huang <huangtao@rock-chips.com>2019-02-26 14:12:57 +0800
commitdcd128bc3ae0a01ee45aa7df54f013d234c3f667 (patch)
tree4f61894958fc679f3a20777d429fc8e24fce40f9 /include
parente30195cc6eca30b5e815f4380f8091a47f54653a (diff)
media: camera: add header for otp information
Change-Id: I903df1fb2ee26b5d771a3cfe2876e7afd837d1de Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/rk-camera-module.h135
1 files changed, 135 insertions, 0 deletions
diff --git a/include/uapi/linux/rk-camera-module.h b/include/uapi/linux/rk-camera-module.h
new file mode 100644
index 000000000000..3cb1df9a361d
--- /dev/null
+++ b/include/uapi/linux/rk-camera-module.h
@@ -0,0 +1,135 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR MIT) */
+/*
+ * Rockchip module information
+ * Copyright (C) 2018-2019 Rockchip Electronics Co., Ltd.
+ */
+
+#ifndef _UAPI_RKMODULE_CAMERA_H
+#define _UAPI_RKMODULE_CAMERA_H
+
+#include <linux/types.h>
+
+#define RKMODULE_NAME_LEN 32
+#define RKMODULE_LSCDATA_LEN 441
+
+#define RKMODULE_CAMERA_MODULE_INDEX "rockchip,camera-module-index"
+#define RKMODULE_CAMERA_MODULE_FACING "rockchip,camera-module-facing"
+#define RKMODULE_CAMERA_MODULE_NAME "rockchip,camera-module-name"
+#define RKMODULE_CAMERA_LENS_NAME "rockchip,camera-module-lens-name"
+
+#define RKMODULE_GET_MODULE_INFO \
+ _IOR('V', BASE_VIDIOC_PRIVATE + 0, struct rkmodule_inf)
+
+#define RKMODULE_AWB_CFG \
+ _IOW('V', BASE_VIDIOC_PRIVATE + 1, struct rkmodule_awb_cfg)
+
+#define RKMODULE_AF_CFG \
+ _IOW('V', BASE_VIDIOC_PRIVATE + 2, struct rkmodule_af_cfg)
+
+/**
+ * struct rkmodule_base_inf - module base information
+ *
+ */
+struct rkmodule_base_inf {
+ char sensor[RKMODULE_NAME_LEN];
+ char module[RKMODULE_NAME_LEN];
+ char lens[RKMODULE_NAME_LEN];
+} __attribute__ ((packed));
+
+/**
+ * struct rkmodule_fac_inf - module factory information
+ *
+ */
+struct rkmodule_fac_inf {
+ __u32 flag;
+
+ char module[RKMODULE_NAME_LEN];
+ char lens[RKMODULE_NAME_LEN];
+ __u32 year;
+ __u32 month;
+ __u32 day;
+} __attribute__ ((packed));
+
+/**
+ * struct rkmodule_awb_inf - module awb information
+ *
+ */
+struct rkmodule_awb_inf {
+ __u32 flag;
+
+ __u32 r_value;
+ __u32 b_value;
+ __u32 gr_value;
+ __u32 gb_value;
+
+ __u32 golden_r_value;
+ __u32 golden_b_value;
+ __u32 golden_gr_value;
+ __u32 golden_gb_value;
+} __attribute__ ((packed));
+
+/**
+ * struct rkmodule_lsc_inf - module lsc information
+ *
+ */
+struct rkmodule_lsc_inf {
+ __u32 flag;
+
+ __u16 lsc_w;
+ __u16 lsc_h;
+ __u16 decimal_bits;
+
+ __u16 lsc_r[RKMODULE_LSCDATA_LEN];
+ __u16 lsc_b[RKMODULE_LSCDATA_LEN];
+ __u16 lsc_gr[RKMODULE_LSCDATA_LEN];
+ __u16 lsc_gb[RKMODULE_LSCDATA_LEN];
+} __attribute__ ((packed));
+
+/**
+ * struct rkmodule_af_inf - module af information
+ *
+ */
+struct rkmodule_af_inf {
+ __u32 flag;
+
+ __u32 vcm_start;
+ __u32 vcm_end;
+ __u32 vcm_dir;
+} __attribute__ ((packed));
+
+/**
+ * struct rkmodule_inf - module information
+ *
+ */
+struct rkmodule_inf {
+ struct rkmodule_base_inf base;
+ struct rkmodule_fac_inf fac;
+ struct rkmodule_awb_inf awb;
+ struct rkmodule_lsc_inf lsc;
+ struct rkmodule_af_inf af;
+} __attribute__ ((packed));
+
+/**
+ * struct rkmodule_awb_inf - module awb information
+ *
+ */
+struct rkmodule_awb_cfg {
+ __u32 enable;
+ __u32 golden_r_value;
+ __u32 golden_b_value;
+ __u32 golden_gr_value;
+ __u32 golden_gb_value;
+} __attribute__ ((packed));
+
+/**
+ * struct rkmodule_af_cfg
+ *
+ */
+struct rkmodule_af_cfg {
+ __u32 enable;
+ __u32 vcm_start;
+ __u32 vcm_end;
+ __u32 vcm_dir;
+} __attribute__ ((packed));
+
+#endif /* _UAPI_RKMODULE_CAMERA_H */