@@ -19,6 +19,7 @@
#include <linux/sched.h>
#include <linux/dma/ipu-dma.h>
+#include <media/v4l2-async.h>
#include <media/v4l2-common.h>
#include <media/v4l2-dev.h>
#include <media/videobuf2-dma-contig.h>
@@ -1224,6 +1225,11 @@ static int mx3_camera_probe(struct platform_device *pdev)
goto eallocctx;
}
+ if (pdata->asd_sizes) {
+ soc_host->asd = pdata->asd;
+ soc_host->asd_sizes = pdata->asd_sizes;
+ }
+
err = soc_camera_host_register(soc_host);
if (err)
goto ecamhostreg;
@@ -33,6 +33,7 @@
#define MX3_CAMERA_DATAWIDTH_MASK (MX3_CAMERA_DATAWIDTH_4 | MX3_CAMERA_DATAWIDTH_8 | \
MX3_CAMERA_DATAWIDTH_10 | MX3_CAMERA_DATAWIDTH_15)
+struct v4l2_async_subdev;
/**
* struct mx3_camera_pdata - i.MX3x camera platform data
* @flags: MX3_CAMERA_* flags
@@ -43,6 +44,8 @@ struct mx3_camera_pdata {
unsigned long flags;
unsigned long mclk_10khz;
struct device *dma_dev;
+ struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
+ int *asd_sizes; /* 0-terminated array pf asd group sizes */
};
#endif
To support asynchronous subdevice registration we only have to pass a subdevice descriptor array from driver platform data to soc-camera for camera host driver registration. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/platform/soc_camera/mx3_camera.c | 6 ++++++ include/linux/platform_data/camera-mx3.h | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-)