1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2012 Texas Instruments Inc
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation version 2.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 * Manjunath Hadli <manjunath.hadli@ti.com>
16 * Prabhakar Lad <prabhakar.lad@ti.com>
23 #include <linux/v4l2-subdev.h>
24 #include <linux/clk.h>
25 #include <linux/i2c.h>
27 #include <media/davinci/vpfe_types.h>
29 #define CAPTURE_DRV_NAME "vpfe-capture"
37 VPFE_SUBDEV_TVP5146 = 1,
38 VPFE_SUBDEV_MT9T031 = 2,
39 VPFE_SUBDEV_TVP7002 = 3,
40 VPFE_SUBDEV_MT9P031 = 4,
43 struct vpfe_ext_subdev_info {
45 struct v4l2_subdev *subdev;
46 /* Sub device module name */
48 /* Sub device group id */
50 /* Number of inputs supported */
52 /* inputs available at the sub device */
53 struct v4l2_input *inputs;
54 /* Sub dev routing information for each input */
55 struct vpfe_route *routes;
56 /* ccdc bus/interface configuration */
57 struct vpfe_hw_if_param ccdc_if_params;
58 /* i2c subdevice board info */
59 struct i2c_board_info board_info;
60 /* Is this a camera sub device ? */
62 /* check if sub dev supports routing */
65 unsigned registered:1;
69 /* Number of sub devices connected to vpfe */
71 /* information about each subdev */
72 struct vpfe_ext_subdev_info *sub_devs;
75 /* setup function for the input path */
76 int (*setup_input)(enum vpfe_subdev_id id);
77 /* number of clocks */
79 /* clocks used for vpfe capture */