diff options
author | Manjunath Hadli <manjunath.hadli@ti.com> | 2011-11-12 10:06:02 -0500 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2011-12-02 14:03:50 -0500 |
commit | e13c692b1f97a6a4f753695b4f28b7f10e5d79ae (patch) | |
tree | 5a2a15b136772521203dbe515c84e04a97e7eea5 /include/media/davinci | |
parent | caca6a03d365883564885f2c1da3e88dcf65d139 (diff) |
ARM: davinci: vpif: move code to driver core header from platform
Move vpif related definitions for capture and display drivers
from dm646x platform header file to vpif_types.h inside
the driver as these definitions are related to driver code
rather than the platform or board.
This enables reusing this IP across platforms.
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'include/media/davinci')
-rw-r--r-- | include/media/davinci/vpif_types.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/include/media/davinci/vpif_types.h b/include/media/davinci/vpif_types.h new file mode 100644 index 000000000000..9929b05cff3a --- /dev/null +++ b/include/media/davinci/vpif_types.h | |||
@@ -0,0 +1,71 @@ | |||
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 | |||
20 | #define VPIF_CAPTURE_MAX_CHANNELS 2 | ||
21 | |||
22 | enum vpif_if_type { | ||
23 | VPIF_IF_BT656, | ||
24 | VPIF_IF_BT1120, | ||
25 | VPIF_IF_RAW_BAYER | ||
26 | }; | ||
27 | |||
28 | struct vpif_interface { | ||
29 | enum vpif_if_type if_type; | ||
30 | unsigned hd_pol:1; | ||
31 | unsigned vd_pol:1; | ||
32 | unsigned fid_pol:1; | ||
33 | }; | ||
34 | |||
35 | struct vpif_subdev_info { | ||
36 | const char *name; | ||
37 | struct i2c_board_info board_info; | ||
38 | u32 input; | ||
39 | u32 output; | ||
40 | unsigned can_route:1; | ||
41 | struct vpif_interface vpif_if; | ||
42 | }; | ||
43 | |||
44 | struct vpif_display_config { | ||
45 | int (*set_clock)(int, int); | ||
46 | struct vpif_subdev_info *subdevinfo; | ||
47 | int subdev_count; | ||
48 | const char **output; | ||
49 | int output_count; | ||
50 | const char *card_name; | ||
51 | }; | ||
52 | |||
53 | struct vpif_input { | ||
54 | struct v4l2_input input; | ||
55 | const char *subdev_name; | ||
56 | }; | ||
57 | |||
58 | struct vpif_capture_chan_config { | ||
59 | const struct vpif_input *inputs; | ||
60 | int input_count; | ||
61 | }; | ||
62 | |||
63 | struct vpif_capture_config { | ||
64 | int (*setup_input_channel_mode)(int); | ||
65 | int (*setup_input_path)(int, const char *); | ||
66 | struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; | ||
67 | struct vpif_subdev_info *subdev_info; | ||
68 | int subdev_count; | ||
69 | const char *card_name; | ||
70 | }; | ||
71 | #endif /* _VPIF_TYPES_H */ | ||