diff options
Diffstat (limited to 'include/media/nvc_focus.h')
-rw-r--r-- | include/media/nvc_focus.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/include/media/nvc_focus.h b/include/media/nvc_focus.h new file mode 100644 index 00000000000..bed9df11a34 --- /dev/null +++ b/include/media/nvc_focus.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* Copyright (C) 2012 NVIDIA Corporation. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 as | ||
5 | * published by the Free Software Foundation. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
15 | * 02111-1307, USA | ||
16 | */ | ||
17 | |||
18 | #ifndef __NVC_FOCUS_H__ | ||
19 | #define __NVC_FOCUS_H__ | ||
20 | |||
21 | /* NVC_FOCUS_CAP_VER0: invalid */ | ||
22 | /* NVC_FOCUS_CAP_VER1: | ||
23 | * __u32 version | ||
24 | * __u32 actuator_range | ||
25 | * __u32 settle_time | ||
26 | */ | ||
27 | #define NVC_FOCUS_CAP_VER1 1 | ||
28 | /* NVC_FOCUS_CAP_VER2 adds: | ||
29 | * __u32 focus_macro; | ||
30 | * __u32 focus_hyper; | ||
31 | * __u32 focus_infinity; | ||
32 | */ | ||
33 | #define NVC_FOCUS_CAP_VER2 2 | ||
34 | #define NVC_FOCUS_CAP_VER 2 /* latest version */ | ||
35 | |||
36 | enum nvc_focus_sts { | ||
37 | NVC_FOCUS_STS_UNKNOWN = 1, | ||
38 | NVC_FOCUS_STS_NO_DEVICE, | ||
39 | NVC_FOCUS_STS_INITIALIZING, | ||
40 | NVC_FOCUS_STS_INIT_ERR, | ||
41 | NVC_FOCUS_STS_WAIT_FOR_MOVE_END, | ||
42 | NVC_FOCUS_STS_WAIT_FOR_SETTLE, | ||
43 | NVC_FOCUS_STS_LENS_SETTLED, | ||
44 | NVC_FOCUS_STS_FORCE32 = 0x7FFFFFFF | ||
45 | }; | ||
46 | |||
47 | struct nvc_focus_nvc { | ||
48 | __u32 focal_length; | ||
49 | __u32 fnumber; | ||
50 | __u32 max_aperature; | ||
51 | } __packed; | ||
52 | |||
53 | struct nvc_focus_cap { | ||
54 | __u32 version; | ||
55 | __u32 actuator_range; | ||
56 | __u32 settle_time; | ||
57 | __u32 focus_macro; | ||
58 | __u32 focus_hyper; | ||
59 | __u32 focus_infinity; | ||
60 | } __packed; | ||
61 | |||
62 | #endif /* __NVC_FOCUS_H__ */ | ||
63 | |||