summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCharlie Huang <chahuang@nvidia.com>2011-06-29 10:44:58 -0700
committerJeremy Wyman <jwyman@nvidia.com>2011-06-30 17:17:27 -0700
commitbcad42d1a0aadaebaaf56fbe4b480cad63fadb3a (patch)
tree94bc85ae3f35e401440aa7636cb44b32b088e143 /include
parentcc44260f85612ff49db0738a5b7c46e8e5193fa9 (diff)
media: video: tegra: enable ov9726 sensor
bug 829399 - add front sensor ov9726 for enterprise board Change-Id: Id775f8d529206c326dbe8c552e049eb49f76fa55 Reviewed-on: http://git-master/r/39005 Reviewed-by: Jihoon Bang <jbang@nvidia.com> Tested-by: Jihoon Bang <jbang@nvidia.com> Reviewed-by: Chonglei Huang <chahuang@nvidia.com> Reviewed-by: Jeremy Wyman <jwyman@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/ov9726.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/include/media/ov9726.h b/include/media/ov9726.h
new file mode 100644
index 000000000000..75672393e860
--- /dev/null
+++ b/include/media/ov9726.h
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2011 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 __OV9726_H__
+#define __OV9726_H__
+
+#include <linux/ioctl.h>
+
+#define OV9726_I2C_ADDR 0x20
+
+#define OV9726_IOCTL_SET_MODE _IOW('o', 1, struct ov9726_mode)
+#define OV9726_IOCTL_SET_FRAME_LENGTH _IOW('o', 2, __u32)
+#define OV9726_IOCTL_SET_COARSE_TIME _IOW('o', 3, __u32)
+#define OV9726_IOCTL_SET_GAIN _IOW('o', 4, __u16)
+#define OV9726_IOCTL_GET_STATUS _IOR('o', 5, __u8)
+
+struct ov9726_mode {
+ int mode_id;
+ int xres;
+ int yres;
+ __u32 frame_length;
+ __u32 coarse_time;
+ __u16 gain;
+};
+
+struct ov9726_reg {
+ __u16 addr;
+ __u16 val;
+};
+
+struct ov9726_cust_mode {
+ struct ov9726_mode mode;
+ __u16 reg_num;
+ struct ov9726_reg *reg_seq;
+};
+
+#define OV9726_TABLE_WAIT_MS 0
+#define OV9726_TABLE_END 1
+
+#ifdef __KERNEL__
+#define OV9726_REG_FRAME_LENGTH_HI 0x340
+#define OV9726_REG_FRAME_LENGTH_LO 0x341
+#define OV9726_REG_COARSE_TIME_HI 0x202
+#define OV9726_REG_COARSE_TIME_LO 0x203
+#define OV9726_REG_GAIN_HI 0x204
+#define OV9726_REG_GAIN_LO 0x205
+
+#define OV9726_MAX_RETRIES 3
+
+struct ov9726_platform_data {
+ int (*power_on)(void);
+ int (*power_off)(void);
+};
+#endif /* __KERNEL__ */
+
+#endif /* __OV9726_H__ */
+