summaryrefslogtreecommitdiff
path: root/include/media/ov9772.h
diff options
context:
space:
mode:
authorShantanu Nath <snath@nvidia.com>2012-09-08 11:50:16 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 01:04:45 -0700
commit7f29b7dcf176638478f3662c3ac824b61bf91a84 (patch)
tree19b4a9b2d608abec6d53bf43378fa321a96f420c /include/media/ov9772.h
parent69213ac853a1fab0c7c3190d3d2f260f37bbf0bc (diff)
media: video: tegra: Add OV9772 Camera sensor support.
Support for OV9772 Camera sensor driver. Bug 1011174 Change-Id: Ib978646dbbec9db4e9c4622c949b5d75be2aad8c Signed-off-by: Shantanu Nath <snath@nvidia.com> Reviewed-on: http://git-master/r/132959 (cherry picked from commit fbae204b284cb115e8a0066a6277900d331bc50c) Reviewed-on: http://git-master/r/130864 Tested-by: Rakesh Sharma <rasharma@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Rebase-Id: R579d9a096be8416abb717783a5686a89976e267a
Diffstat (limited to 'include/media/ov9772.h')
-rw-r--r--include/media/ov9772.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/include/media/ov9772.h b/include/media/ov9772.h
new file mode 100644
index 000000000000..40baeadf4241
--- /dev/null
+++ b/include/media/ov9772.h
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) 2012 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 __OV9772_H__
+#define __OV9772_H__
+
+#include <linux/ioctl.h>
+
+#define OV9772_IOCTL_SET_MODE _IOW('o', 1, struct ov9772_mode)
+#define OV9772_IOCTL_GET_STATUS _IOR('o', 2, __u8)
+#define OV9772_IOCTL_SET_FRAME_LENGTH _IOW('o', 3, __u32)
+#define OV9772_IOCTL_SET_COARSE_TIME _IOW('o', 4, __u32)
+#define OV9772_IOCTL_SET_GAIN _IOW('o', 5, __u16)
+#define OV9772_IOCTL_GET_SENSORDATA _IOR('o', 6, struct ov9772_sensordata)
+#define OV9772_IOCTL_SET_GROUP_HOLD _IOW('o', 7, struct ov9772_ae)
+
+struct ov9772_mode {
+ int xres;
+ int yres;
+ __u32 frame_length;
+ __u32 coarse_time;
+ __u16 gain;
+};
+
+struct ov9772_ae {
+ __u32 frame_length;
+ __u8 frame_length_enable;
+ __u32 coarse_time;
+ __u8 coarse_time_enable;
+ __s32 gain;
+ __u8 gain_enable;
+};
+
+struct ov9772_sensordata {
+ __u32 fuse_id_size;
+ __u8 fuse_id[16];
+};
+
+#ifdef __KERNEL__
+
+#define OV9772_REG_FRAME_LENGTH_HI 0x340
+#define OV9772_REG_FRAME_LENGTH_LO 0x341
+#define OV9772_REG_COARSE_TIME_HI 0x202
+#define OV9772_REG_COARSE_TIME_LO 0x203
+#define OV9772_REG_GAIN_HI 0x204
+#define OV9772_REG_GAIN_LO 0x205
+
+struct ov9772_platform_data {
+ int (*power_on)(void);
+ int (*power_off)(void);
+};
+#endif /* __KERNEL__ */
+
+#endif /* __OV9772_H__ */
+