summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorCharlie Huang <chahuang@nvidia.com>2012-04-27 17:04:09 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-05-14 05:57:37 -0700
commite363b1c03ff1fae6ca06ad7cb74b2840b200e8f3 (patch)
tree988ea27a4e9b14599e378ad3154bcaf24096d7bd /include/media
parent81bbcfffed65ce86dbe365ca7676bb0eb09ee4a1 (diff)
media: video: tegra: ov5640: add support
add ov5640 yuv sensor support - initial. bug 921322 Change-Id: I813afa8963e39afe475f9fdd43152cfaf1a16ae1 Signed-off-by: Charlie Huang <chahuang@nvidia.com> Reviewed-on: http://git-master/r/99506 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ov5640.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/include/media/ov5640.h b/include/media/ov5640.h
new file mode 100644
index 000000000000..edae5fe4b1a8
--- /dev/null
+++ b/include/media/ov5640.h
@@ -0,0 +1,64 @@
+/*
+ * ov5640.h - header for YUV camera sensor OV5640 driver.
+ *
+ * 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.
+ *
+ * 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 __OV5640_H__
+#define __OV5640_H__
+
+#include <linux/ioctl.h> /* For IOCTL macros */
+
+#define OV5640_IOCTL_SET_SENSOR_MODE _IOW('o', 1, struct ov5640_mode)
+#define OV5640_IOCTL_GET_SENSOR_STATUS _IOR('o', 2, __u8)
+#define OV5640_IOCTL_GET_CONFIG _IOR('o', 3, struct ov5640_config)
+#define OV5640_IOCTL_SET_FPOSITION _IOW('o', 4, __u32)
+#define OV5640_IOCTL_POWER_LEVEL _IOW('o', 5, __u32)
+#define OV5640_IOCTL_GET_AF_STATUS _IOR('o', 6, __u8)
+#define OV5640_IOCTL_SET_AF_MODE _IOR('o', 7, __u8)
+
+#define OV5640_POWER_LEVEL_OFF 0
+#define OV5640_POWER_LEVEL_ON 1
+#define OV5640_POWER_LEVEL_SUS 2
+
+struct ov5640_mode {
+ int xres;
+ int yres;
+};
+
+struct ov5640_config {
+ __u32 settle_time;
+ __u32 pos_low;
+ __u32 pos_high;
+ float focal_length;
+ float fnumber;
+};
+
+enum {
+ OV5640_AF_INIFINITY,
+ OV5640_AF_TRIGGER,
+};
+
+#ifdef __KERNEL__
+struct ov5640_platform_data {
+ int (*power_on)(void);
+ int (*power_off)(void);
+
+};
+#endif /* __KERNEL__ */
+
+#endif /* __OV5640_H__ */