[media] davinci: vpif_capture: get subdevs from DT when available

Enable  getting of subdevs from DT ports and endpoints.

The _get_pdata() function was larely inspired by (i.e. stolen from)
am437x-vpfe.c

Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Kevin Hilman
2017-06-06 20:37:39 -03:00
committed by Mauro Carvalho Chehab
parent 6e3520f2e2
commit 4a5f8ae50b
3 changed files with 134 additions and 6 deletions

View File

@@ -62,14 +62,14 @@ struct vpif_display_config {
struct vpif_input {
struct v4l2_input input;
const char *subdev_name;
char *subdev_name;
u32 input_route;
u32 output_route;
};
struct vpif_capture_chan_config {
struct vpif_interface vpif_if;
const struct vpif_input *inputs;
struct vpif_input *inputs;
int input_count;
};
@@ -81,7 +81,8 @@ struct vpif_capture_config {
int subdev_count;
int i2c_adapter_id;
const char *card_name;
struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
int *asd_sizes; /* 0-terminated array of asd group sizes */
struct v4l2_async_subdev *asd[VPIF_CAPTURE_MAX_CHANNELS];
int asd_sizes[VPIF_CAPTURE_MAX_CHANNELS];
};
#endif /* _VPIF_TYPES_H */