From 4a5f8ae50b66a40cd9cec8f72f5f64611504ddc1 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Tue, 6 Jun 2017 20:37:39 -0300 Subject: [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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/davinci/vpif_types.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/media') diff --git a/include/media/davinci/vpif_types.h b/include/media/davinci/vpif_types.h index 385597d..eae23e4 100644 --- a/include/media/davinci/vpif_types.h +++ b/include/media/davinci/vpif_types.h @@ -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 */ -- cgit v1.1