2 * Copyright (C) 2012 Texas Instruments Inc
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by 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.
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
18 * Manjunath Hadli <manjunath.hadli@ti.com>
19 * Prabhakar Lad <prabhakar.lad@ti.com>
26 #include <linux/v4l2-subdev.h>
27 #include <linux/clk.h>
28 #include <linux/i2c.h>
30 #include <media/davinci/vpfe_types.h>
32 #define CAPTURE_DRV_NAME "vpfe-capture"
40 VPFE_SUBDEV_TVP5146 = 1,
41 VPFE_SUBDEV_MT9T031 = 2,
42 VPFE_SUBDEV_TVP7002 = 3,
43 VPFE_SUBDEV_MT9P031 = 4,
46 struct vpfe_ext_subdev_info {
48 struct v4l2_subdev *subdev;
49 /* Sub device module name */
51 /* Sub device group id */
53 /* Number of inputs supported */
55 /* inputs available at the sub device */
56 struct v4l2_input *inputs;
57 /* Sub dev routing information for each input */
58 struct vpfe_route *routes;
59 /* ccdc bus/interface configuration */
60 struct vpfe_hw_if_param ccdc_if_params;
61 /* i2c subdevice board info */
62 struct i2c_board_info board_info;
63 /* Is this a camera sub device ? */
65 /* check if sub dev supports routing */
68 unsigned registered:1;
72 /* Number of sub devices connected to vpfe */
74 /* information about each subdev */
75 struct vpfe_ext_subdev_info *sub_devs;
78 /* setup function for the input path */
79 int (*setup_input)(enum vpfe_subdev_id id);
80 /* number of clocks */
82 /* clocks used for vpfe capture */