summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRiham Haidar <rhaidar@nvidia.com>2013-05-30 10:36:16 -0700
committerRiham Haidar <rhaidar@nvidia.com>2013-05-30 10:36:16 -0700
commitd4dc214982830cb5afa6f281bc00f30612ba454a (patch)
tree86d2163e4638778dd15ee9bc3d5d5ad50d412321 /include
parentc6ee9bbf8a901359881d40a6ad9902aae44f4044 (diff)
parent59f86ac32f66bfc9d7378db82c18fac621e61765 (diff)
Merge remote-tracking branch 'origin/dev/svenkatarama/AOHDR_Merge' into promotion_build
Diffstat (limited to 'include')
-rw-r--r--include/media/ar0833.h105
-rw-r--r--include/media/dw9718.h50
-rw-r--r--include/media/imx135.h70
-rw-r--r--include/media/nvc.h30
-rw-r--r--include/media/ov5693.h10
5 files changed, 251 insertions, 14 deletions
diff --git a/include/media/ar0833.h b/include/media/ar0833.h
new file mode 100644
index 000000000000..1e32c14c7990
--- /dev/null
+++ b/include/media/ar0833.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2010 Motorola, Inc.
+ * Copyright (C) 2012-2013, NVIDIA Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307, USA
+ */
+
+#ifndef __AR0833_H__
+#define __AR0833_H__
+
+#include <linux/ioctl.h> /* For IOCTL macros */
+
+#define AR0833_IOCTL_SET_MODE _IOW('o', 1, struct ar0833_mode)
+#define AR0833_IOCTL_SET_FRAME_LENGTH _IOW('o', 2, __u32)
+#define AR0833_IOCTL_SET_COARSE_TIME _IOW('o', 3, __u32)
+#define AR0833_IOCTL_SET_GAIN _IOW('o', 4, __u16)
+#define AR0833_IOCTL_GET_STATUS _IOR('o', 5, __u8)
+#define AR0833_IOCTL_GET_MODE _IOR('o', 6, struct ar0833_modeinfo)
+#define AR0833_IOCTL_SET_HDR_COARSE_TIME _IOW('o', 7, struct ar0833_hdr)
+#define AR0833_IOCTL_SET_GROUP_HOLD _IOW('o', 8, struct ar0833_ae)
+
+struct ar0833_mode {
+ int xres;
+ int yres;
+ __u32 frame_length;
+ __u32 coarse_time;
+ __u32 coarse_time_short;
+ __u16 gain;
+ __u8 hdr_en;
+};
+
+struct ar0833_modeinfo {
+ int xres;
+ int yres;
+ __u8 hdr;
+ __u8 lanes;
+ __u16 line_len;
+ __u16 frame_len;
+ __u16 coarse_time;
+ __u16 coarse_time_2nd;
+ __u16 xstart;
+ __u16 xend;
+ __u16 ystart;
+ __u16 yend;
+ __u16 xsize;
+ __u16 ysize;
+ __u16 gain;
+ __u8 x_flip;
+ __u8 y_flip;
+ __u8 x_bin;
+ __u8 y_bin;
+ __u16 vt_pix_clk_div;
+ __u16 vt_sys_clk_div;
+ __u16 pre_pll_clk_div;
+ __u16 pll_multi;
+ __u16 op_pix_clk_div;
+ __u16 op_sys_clk_div;
+};
+
+struct ar0833_hdr {
+ __u32 coarse_time_long;
+ __u32 coarse_time_short;
+};
+
+struct ar0833_ae {
+ __u32 frame_length;
+ __u8 frame_length_enable;
+ __u32 coarse_time;
+ __u32 coarse_time_short;
+ __u8 coarse_time_enable;
+ __s32 gain;
+ __u8 gain_enable;
+};
+
+struct ar0833_sensordata {
+ __u32 fuse_id_size;
+ __u8 fuse_id[16];
+};
+
+#ifdef __KERNEL__
+struct ar0833_power_rail {
+ struct regulator *dvdd;
+ struct regulator *avdd;
+ struct regulator *iovdd;
+};
+
+struct ar0833_platform_data {
+ int (*power_on)(struct ar0833_power_rail *pw);
+ int (*power_off)(struct ar0833_power_rail *pw);
+};
+#endif /* __KERNEL__ */
+
+#endif /* __AR0833_H__ */
diff --git a/include/media/dw9718.h b/include/media/dw9718.h
new file mode 100644
index 000000000000..7c88a8ee981b
--- /dev/null
+++ b/include/media/dw9718.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010-2013, NVIDIA Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __DW9718_H__
+#define __DW9718_H__
+
+#include <media/nvc_focus.h>
+#include <media/nvc.h>
+
+struct dw9718_power_rail {
+ struct regulator *vdd;
+ struct regulator *vdd_i2c;
+};
+
+struct dw9718_platform_data {
+ int cfg;
+ int num;
+ int sync;
+ const char *dev_name;
+ struct nvc_focus_nvc (*nvc);
+ struct nvc_focus_cap (*cap);
+ int gpio_count;
+ struct nvc_gpio_pdata *gpio;
+ int (*power_on)(struct dw9718_power_rail *pw);
+ int (*power_off)(struct dw9718_power_rail *pw);
+};
+
+/* Register Definitions */
+#define DW9718_POWER_DN 0x00
+#define DW9718_CONTROL 0x01
+#define DW9718_VCM_CODE_MSB 0x02
+#define DW9718_VCM_CODE_LSB 0x03
+#define DW9718_SWITCH_MODE 0x04
+#define DW9718_SACT 0x05
+#define DW9718_STATUS 0x06
+
+#endif /* __DW9718_H__ */
diff --git a/include/media/imx135.h b/include/media/imx135.h
new file mode 100644
index 000000000000..d7d01966a1ed
--- /dev/null
+++ b/include/media/imx135.h
@@ -0,0 +1,70 @@
+/**
+ * Copyright (c) 2012-2013, NVIDIA Corporation. All rights reserved.
+ *
+ * NVIDIA Corporation and its licensors retain all intellectual property
+ * and proprietary rights in and to this software and related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA Corporation is strictly prohibited.
+ */
+
+#ifndef __IMX135_H__
+#define __IMX135_H__
+
+#include <linux/ioctl.h> /* For IOCTL macros */
+#include <media/nvc.h>
+#include <media/nvc_image.h>
+
+#define IMX135_IOCTL_SET_MODE _IOW('o', 1, struct imx135_mode)
+#define IMX135_IOCTL_GET_STATUS _IOR('o', 2, __u8)
+#define IMX135_IOCTL_SET_FRAME_LENGTH _IOW('o', 3, __u32)
+#define IMX135_IOCTL_SET_COARSE_TIME _IOW('o', 4, __u32)
+#define IMX135_IOCTL_SET_GAIN _IOW('o', 5, __u16)
+#define IMX135_IOCTL_GET_SENSORDATA _IOR('o', 6, struct imx135_sensordata)
+#define IMX135_IOCTL_SET_GROUP_HOLD _IOW('o', 7, struct imx135_ae)
+#define IMX135_IOCTL_SET_HDR_COARSE_TIME _IOW('o', 8, struct imx135_hdr)
+
+struct imx135_mode {
+ int xres;
+ int yres;
+ __u32 frame_length;
+ __u32 coarse_time;
+ __u32 coarse_time_short;
+ __u16 gain;
+ __u8 hdr_en;
+};
+
+struct imx135_hdr {
+ __u32 coarse_time_long;
+ __u32 coarse_time_short;
+};
+
+struct imx135_ae {
+ __u32 frame_length;
+ __u8 frame_length_enable;
+ __u32 coarse_time;
+ __u32 coarse_time_short;
+ __u8 coarse_time_enable;
+ __s32 gain;
+ __u8 gain_enable;
+};
+
+struct imx135_sensordata {
+ __u32 fuse_id_size;
+ __u8 fuse_id[16];
+};
+
+#ifdef __KERNEL__
+struct imx135_power_rail {
+ struct regulator *dvdd;
+ struct regulator *avdd;
+ struct regulator *iovdd;
+};
+
+struct imx135_platform_data {
+ int (*power_on)(struct imx135_power_rail *pw);
+ int (*power_off)(struct imx135_power_rail *pw);
+};
+#endif /* __KERNEL__ */
+
+#endif /* __IMX135_H__ */
diff --git a/include/media/nvc.h b/include/media/nvc.h
index ec5d6aecc44d..4158469758bf 100644
--- a/include/media/nvc.h
+++ b/include/media/nvc.h
@@ -1,18 +1,16 @@
-/* Copyright (C) 2012 NVIDIA Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
+/* Copyright (c) 2012 - 2013, NVIDIA CORPORATION. All rights reserved.
+
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __NVC_H__
@@ -27,6 +25,7 @@
struct nvc_param {
int param;
__u32 sizeofvalue;
+ __u32 variant;
void *p_value;
} __packed;
@@ -80,6 +79,9 @@ enum nvc_params {
NVC_PARAM_DEV_ID,
NVC_PARAM_GROUP_HOLD,
NVC_PARAM_SET_SENSOR_FLASH_MODE,
+ NVC_PARAM_TORCH_QUERY,
+ NVC_PARAM_FLASH_EXT_CAPS,
+ NVC_PARAM_TORCH_EXT_CAPS,
NVC_PARAM_BEGIN_VENDOR_EXTENSIONS = 0x10000000,
NVC_PARAM_CALIBRATION_STATUS,
NVC_PARAM_TEST_PATTERN,
diff --git a/include/media/ov5693.h b/include/media/ov5693.h
index d81c36bbdcb6..a093919a45b4 100644
--- a/include/media/ov5693.h
+++ b/include/media/ov5693.h
@@ -34,7 +34,9 @@
#define OV5693_IOCTL_SET_CAMERA_MODE _IOW('o', 10, __u32)
#define OV5693_IOCTL_SYNC_SENSORS _IOW('o', 11, __u32)
#define OV5693_IOCTL_GET_FUSEID _IOR('o', 12, struct ov5693_fuseid)
+#define OV5693_IOCTL_SET_HDR_COARSE_TIME _IOW('o', 13, struct ov5693_hdr)
+#define OV5693_INVALID_COARSE_TIME -1
struct ov5693_mode {
int res_x;
@@ -42,6 +44,7 @@ struct ov5693_mode {
int fps;
__u32 frame_length;
__u32 coarse_time;
+ __u32 coarse_time_short;
__u16 gain;
};
@@ -49,6 +52,7 @@ struct ov5693_ae {
__u32 frame_length;
__u8 frame_length_enable;
__u32 coarse_time;
+ __u16 coarse_time_short;
__u8 coarse_time_enable;
__s32 gain;
__u8 gain_enable;
@@ -59,6 +63,12 @@ struct ov5693_fuseid {
__u8 id[16];
};
+struct ov5693_hdr {
+ __u32 coarse_time_long;
+ __u32 coarse_time_short;
+};
+
+
/* See notes in the nvc.h file on the GPIO usage */
enum ov5693_gpio_type {
OV5693_GPIO_TYPE_PWRDN = 0,