aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/ov9726.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /include/media/ov9726.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'include/media/ov9726.h')
-rw-r--r--include/media/ov9726.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/include/media/ov9726.h b/include/media/ov9726.h
new file mode 100644
index 00000000000..b1e759ba583
--- /dev/null
+++ b/include/media/ov9726.h
@@ -0,0 +1,62 @@
1/*
2* ov9726.h
3*
4* Copyright (c) 2011, NVIDIA, All Rights Reserved.
5*
6* This file is licensed under the terms of the GNU General Public License
7* version 2. This program is licensed "as is" without any warranty of any
8* kind, whether express or implied.
9*/
10
11#ifndef __OV9726_H__
12#define __OV9726_H__
13
14#include <linux/ioctl.h>
15
16#define OV9726_I2C_ADDR 0x20
17
18#define OV9726_IOCTL_SET_MODE _IOW('o', 1, struct ov9726_mode)
19#define OV9726_IOCTL_SET_FRAME_LENGTH _IOW('o', 2, __u32)
20#define OV9726_IOCTL_SET_COARSE_TIME _IOW('o', 3, __u32)
21#define OV9726_IOCTL_SET_GAIN _IOW('o', 4, __u16)
22#define OV9726_IOCTL_GET_STATUS _IOR('o', 5, __u8)
23
24struct ov9726_mode {
25 int mode_id;
26 int xres;
27 int yres;
28 __u32 frame_length;
29 __u32 coarse_time;
30 __u16 gain;
31};
32
33struct ov9726_reg {
34 __u16 addr;
35 __u16 val;
36};
37
38#ifdef __KERNEL__
39#define OV9726_REG_FRAME_LENGTH_HI 0x340
40#define OV9726_REG_FRAME_LENGTH_LO 0x341
41#define OV9726_REG_COARSE_TIME_HI 0x202
42#define OV9726_REG_COARSE_TIME_LO 0x203
43#define OV9726_REG_GAIN_HI 0x204
44#define OV9726_REG_GAIN_LO 0x205
45
46#define OV9726_MAX_RETRIES 3
47
48#define OV9726_TABLE_WAIT_MS 0
49#define OV9726_TABLE_END 1
50
51struct ov9726_platform_data {
52 int (*power_on)(void);
53 int (*power_off)(void);
54 unsigned gpio_rst;
55 bool rst_low_active;
56 unsigned gpio_pwdn;
57 bool pwdn_low_active;
58};
59#endif /* __KERNEL__ */
60
61#endif /* __OV9726_H__ */
62