]>
Commit | Line | Data |
---|---|---|
e13c692b MH |
1 | /* |
2 | * Copyright (C) 2011 Texas Instruments Inc | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation version 2. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
e13c692b MH |
12 | */ |
13 | #ifndef _VPIF_TYPES_H | |
14 | #define _VPIF_TYPES_H | |
15 | ||
db38951c MH |
16 | #include <linux/i2c.h> |
17 | ||
e13c692b | 18 | #define VPIF_CAPTURE_MAX_CHANNELS 2 |
2bd4e58c | 19 | #define VPIF_DISPLAY_MAX_CHANNELS 2 |
e13c692b MH |
20 | |
21 | enum vpif_if_type { | |
22 | VPIF_IF_BT656, | |
23 | VPIF_IF_BT1120, | |
24 | VPIF_IF_RAW_BAYER | |
25 | }; | |
26 | ||
27 | struct vpif_interface { | |
28 | enum vpif_if_type if_type; | |
29 | unsigned hd_pol:1; | |
30 | unsigned vd_pol:1; | |
31 | unsigned fid_pol:1; | |
32 | }; | |
33 | ||
34 | struct vpif_subdev_info { | |
35 | const char *name; | |
36 | struct i2c_board_info board_info; | |
e13c692b MH |
37 | }; |
38 | ||
2bd4e58c LP |
39 | struct vpif_output { |
40 | struct v4l2_output output; | |
41 | const char *subdev_name; | |
42 | u32 input_route; | |
43 | u32 output_route; | |
44 | }; | |
45 | ||
46 | struct vpif_display_chan_config { | |
47 | const struct vpif_output *outputs; | |
48 | int output_count; | |
49 | bool clip_en; | |
50 | }; | |
51 | ||
e13c692b MH |
52 | struct vpif_display_config { |
53 | int (*set_clock)(int, int); | |
54 | struct vpif_subdev_info *subdevinfo; | |
55 | int subdev_count; | |
a16cb91a | 56 | int i2c_adapter_id; |
2bd4e58c | 57 | struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS]; |
e13c692b | 58 | const char *card_name; |
4b8a531e LP |
59 | struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */ |
60 | int *asd_sizes; /* 0-terminated array of asd group sizes */ | |
e13c692b MH |
61 | }; |
62 | ||
63 | struct vpif_input { | |
64 | struct v4l2_input input; | |
4a5f8ae5 | 65 | char *subdev_name; |
7aaad131 HV |
66 | u32 input_route; |
67 | u32 output_route; | |
e13c692b MH |
68 | }; |
69 | ||
70 | struct vpif_capture_chan_config { | |
0d4f35f3 | 71 | struct vpif_interface vpif_if; |
4a5f8ae5 | 72 | struct vpif_input *inputs; |
e13c692b MH |
73 | int input_count; |
74 | }; | |
75 | ||
76 | struct vpif_capture_config { | |
77 | int (*setup_input_channel_mode)(int); | |
78 | int (*setup_input_path)(int, const char *); | |
79 | struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; | |
80 | struct vpif_subdev_info *subdev_info; | |
81 | int subdev_count; | |
2d40cb3f | 82 | int i2c_adapter_id; |
e13c692b | 83 | const char *card_name; |
4a5f8ae5 KH |
84 | |
85 | struct v4l2_async_subdev *asd[VPIF_CAPTURE_MAX_CHANNELS]; | |
86 | int asd_sizes[VPIF_CAPTURE_MAX_CHANNELS]; | |
e13c692b MH |
87 | }; |
88 | #endif /* _VPIF_TYPES_H */ |