2 * Copyright (C) 2011 Texas Instruments Inc
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.
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.
16 #include <linux/i2c.h>
18 #define VPIF_CAPTURE_MAX_CHANNELS 2
19 #define VPIF_DISPLAY_MAX_CHANNELS 2
27 struct vpif_interface {
28 enum vpif_if_type if_type;
34 struct vpif_subdev_info {
36 struct i2c_board_info board_info;
40 struct v4l2_output output;
41 const char *subdev_name;
46 struct vpif_display_chan_config {
47 const struct vpif_output *outputs;
52 struct vpif_display_config {
53 int (*set_clock)(int, int);
54 struct vpif_subdev_info *subdevinfo;
57 struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS];
58 const char *card_name;
59 struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
60 int *asd_sizes; /* 0-terminated array of asd group sizes */
64 struct v4l2_input input;
70 struct vpif_capture_chan_config {
71 struct vpif_interface vpif_if;
72 struct vpif_input *inputs;
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;
83 const char *card_name;
85 struct v4l2_async_subdev *asd[VPIF_CAPTURE_MAX_CHANNELS];
86 int asd_sizes[VPIF_CAPTURE_MAX_CHANNELS];
88 #endif /* _VPIF_TYPES_H */