aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/ar0832_main.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/ar0832_main.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'include/media/ar0832_main.h')
-rw-r--r--include/media/ar0832_main.h106
1 files changed, 106 insertions, 0 deletions
diff --git a/include/media/ar0832_main.h b/include/media/ar0832_main.h
new file mode 100644
index 00000000000..f5e3713b46f
--- /dev/null
+++ b/include/media/ar0832_main.h
@@ -0,0 +1,106 @@
1/*
2* ar0832_main.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 __AR0832_MAIN_H__
12#define __AR0832_MAIN_H__
13
14#include <linux/ioctl.h> /* For IOCTL macros */
15
16#define AR0832_IOCTL_SET_MODE _IOW('o', 0x01, struct ar0832_mode)
17#define AR0832_IOCTL_SET_FRAME_LENGTH _IOW('o', 0x02, __u32)
18#define AR0832_IOCTL_SET_COARSE_TIME _IOW('o', 0x03, __u32)
19#define AR0832_IOCTL_SET_GAIN _IOW('o', 0x04, __u16)
20#define AR0832_IOCTL_GET_STATUS _IOR('o', 0x05, __u8)
21#define AR0832_IOCTL_GET_OTP _IOR('o', 0x06, struct ar0832_otp_data)
22#define AR0832_IOCTL_TEST_PATTERN _IOW('o', 0x07, enum ar0832_test_pattern)
23#define AR0832_IOCTL_SET_POWER_ON _IOW('o', 0x08, struct ar0832_mode)
24#define AR0832_IOCTL_SET_SENSOR_REGION _IOW('o', 0x09, struct ar0832_stereo_region)
25
26#define AR0832_FOCUSER_IOCTL_GET_CONFIG _IOR('o', 0x10, struct ar0832_focuser_config)
27#define AR0832_FOCUSER_IOCTL_SET_POSITION _IOW('o', 0x11, __u32)
28
29#define AR0832_IOCTL_GET_SENSOR_ID _IOR('o', 0x12, __u16)
30
31#define AR0832_SENSOR_ID_8141 0x1006
32#define AR0832_SENSOR_ID_8140 0x3006
33
34enum ar0832_test_pattern {
35 TEST_PATTERN_NONE,
36 TEST_PATTERN_COLORBARS,
37 TEST_PATTERN_CHECKERBOARD
38};
39
40struct ar0832_otp_data {
41 /* Only the first 5 bytes are actually used. */
42 __u8 sensor_serial_num[6];
43 __u8 part_num[8];
44 __u8 lens_id[1];
45 __u8 manufacture_id[2];
46 __u8 factory_id[2];
47 __u8 manufacture_date[9];
48 __u8 manufacture_line[2];
49
50 __u32 module_serial_num;
51 __u8 focuser_liftoff[2];
52 __u8 focuser_macro[2];
53 __u8 reserved1[12];
54 __u8 shutter_cal[16];
55 __u8 reserved2[183];
56
57 /* Big-endian. CRC16 over 0x00-0x41 (inclusive) */
58 __u16 crc;
59 __u8 reserved3[3];
60 __u8 auto_load[2];
61} __attribute__ ((packed));
62
63struct ar0832_mode {
64 int xres;
65 int yres;
66 __u32 frame_length;
67 __u32 coarse_time;
68 __u16 gain;
69 int stereo;
70};
71
72struct ar0832_point{
73 int x;
74 int y;
75};
76
77struct ar0832_reg {
78 __u16 addr;
79 __u16 val;
80};
81
82struct ar0832_stereo_region {
83 int camera_index;
84 struct ar0832_point image_start;
85 struct ar0832_point image_end;
86};
87
88struct ar0832_focuser_config {
89 __u32 settle_time;
90 __u32 actuator_range;
91 __u32 pos_low;
92 __u32 pos_high;
93 __u32 focal_length;
94 __u32 fnumber;
95 __u32 max_aperture;
96};
97
98#ifdef __KERNEL__
99struct ar0832_platform_data {
100 int (*power_on)(int is_stereo);
101 int (*power_off)(int is_stereo);
102 char *id;
103};
104#endif /* __KERNEL__ */
105
106#endif