]>
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. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
16 | */ | |
17 | #ifndef _VPIF_TYPES_H | |
18 | #define _VPIF_TYPES_H | |
19 | ||
db38951c MH |
20 | #include <linux/i2c.h> |
21 | ||
e13c692b | 22 | #define VPIF_CAPTURE_MAX_CHANNELS 2 |
2bd4e58c | 23 | #define VPIF_DISPLAY_MAX_CHANNELS 2 |
e13c692b MH |
24 | |
25 | enum vpif_if_type { | |
26 | VPIF_IF_BT656, | |
27 | VPIF_IF_BT1120, | |
28 | VPIF_IF_RAW_BAYER | |
29 | }; | |
30 | ||
31 | struct vpif_interface { | |
32 | enum vpif_if_type if_type; | |
33 | unsigned hd_pol:1; | |
34 | unsigned vd_pol:1; | |
35 | unsigned fid_pol:1; | |
36 | }; | |
37 | ||
38 | struct vpif_subdev_info { | |
39 | const char *name; | |
40 | struct i2c_board_info board_info; | |
e13c692b MH |
41 | }; |
42 | ||
2bd4e58c LP |
43 | struct vpif_output { |
44 | struct v4l2_output output; | |
45 | const char *subdev_name; | |
46 | u32 input_route; | |
47 | u32 output_route; | |
48 | }; | |
49 | ||
50 | struct vpif_display_chan_config { | |
51 | const struct vpif_output *outputs; | |
52 | int output_count; | |
53 | bool clip_en; | |
54 | }; | |
55 | ||
e13c692b MH |
56 | struct vpif_display_config { |
57 | int (*set_clock)(int, int); | |
58 | struct vpif_subdev_info *subdevinfo; | |
59 | int subdev_count; | |
2bd4e58c | 60 | struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS]; |
e13c692b | 61 | const char *card_name; |
4b8a531e LP |
62 | struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */ |
63 | int *asd_sizes; /* 0-terminated array of asd group sizes */ | |
e13c692b MH |
64 | }; |
65 | ||
66 | struct vpif_input { | |
67 | struct v4l2_input input; | |
68 | const char *subdev_name; | |
7aaad131 HV |
69 | u32 input_route; |
70 | u32 output_route; | |
e13c692b MH |
71 | }; |
72 | ||
73 | struct vpif_capture_chan_config { | |
0d4f35f3 | 74 | struct vpif_interface vpif_if; |
e13c692b MH |
75 | const struct vpif_input *inputs; |
76 | int input_count; | |
77 | }; | |
78 | ||
79 | struct vpif_capture_config { | |
80 | int (*setup_input_channel_mode)(int); | |
81 | int (*setup_input_path)(int, const char *); | |
82 | struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; | |
83 | struct vpif_subdev_info *subdev_info; | |
84 | int subdev_count; | |
85 | const char *card_name; | |
873229e4 LP |
86 | struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */ |
87 | int *asd_sizes; /* 0-terminated array of asd group sizes */ | |
e13c692b MH |
88 | }; |
89 | #endif /* _VPIF_TYPES_H */ |