Root/
1 | /* |
2 | * ov772x Camera |
3 | * |
4 | * Copyright (C) 2008 Renesas Solutions Corp. |
5 | * Kuninori Morimoto <morimoto.kuninori@renesas.com> |
6 | * |
7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License version 2 as |
9 | * published by the Free Software Foundation. |
10 | */ |
11 | |
12 | #ifndef __OV772X_H__ |
13 | #define __OV772X_H__ |
14 | |
15 | #include <media/soc_camera.h> |
16 | |
17 | /* for flags */ |
18 | #define OV772X_FLAG_VFLIP (1 << 0) /* Vertical flip image */ |
19 | #define OV772X_FLAG_HFLIP (1 << 1) /* Horizontal flip image */ |
20 | #define OV772X_FLAG_8BIT (1 << 2) /* default 10 bit */ |
21 | |
22 | /* |
23 | * for Edge ctrl |
24 | * |
25 | * strength also control Auto or Manual Edge Control Mode |
26 | * see also OV772X_MANUAL_EDGE_CTRL |
27 | */ |
28 | struct ov772x_edge_ctrl { |
29 | unsigned char strength; |
30 | unsigned char threshold; |
31 | unsigned char upper; |
32 | unsigned char lower; |
33 | }; |
34 | |
35 | #define OV772X_MANUAL_EDGE_CTRL 0x80 /* un-used bit of strength */ |
36 | #define EDGE_STRENGTH_MASK 0x1F |
37 | #define EDGE_THRESHOLD_MASK 0x0F |
38 | #define EDGE_UPPER_MASK 0xFF |
39 | #define EDGE_LOWER_MASK 0xFF |
40 | |
41 | #define OV772X_AUTO_EDGECTRL(u, l) \ |
42 | { \ |
43 | .upper = (u & EDGE_UPPER_MASK), \ |
44 | .lower = (l & EDGE_LOWER_MASK), \ |
45 | } |
46 | |
47 | #define OV772X_MANUAL_EDGECTRL(s, t) \ |
48 | { \ |
49 | .strength = (s & EDGE_STRENGTH_MASK) | OV772X_MANUAL_EDGE_CTRL,\ |
50 | .threshold = (t & EDGE_THRESHOLD_MASK), \ |
51 | } |
52 | |
53 | /* |
54 | * ov772x camera info |
55 | */ |
56 | struct ov772x_camera_info { |
57 | unsigned long flags; |
58 | struct ov772x_edge_ctrl edgectrl; |
59 | }; |
60 | |
61 | #endif /* __OV772X_H__ */ |
62 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9