[Letux-kernel] omap3 isp -- media-ctl

Javier Martinez Canillas javier at osg.samsung.com
Thu Sep 8 00:20:26 CEST 2016


On 09/07/2016 06:04 PM, Javier Martinez Canillas wrote:

[snip]

>>
>>> Does the omap3isp driver
>>> probes? and does probe the driver for your attached camera sensor?
>>
>> Yes, both. Here an excerpt of the boot log and lsmod
>>
> 
> Yes, both are probed but your camera driver (drivers/media/i2c/ov9650.c) is
> missing a call to v4l2_async_register_subdev() in its probe function to be
> registered async with the bridge driver (omap3isp). You need something like
> 
> commit c7d97499cc8a ("[media] tvp5150: add support for asynchronous probing")
>

In fact, I went and wrote the patch since is pretty trivial. Could you please
test it and if that's the fixes your problem then I can post it to the list?

>From 386901b19ab17a0eb03c868cbfb7bc5507307fa4 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javier at osg.samsung.com>
Date: Wed, 7 Sep 2016 18:10:58 -0400
Subject: [PATCH 1/1] [media] ov9650: add support for asynchronous probing

Allow the sub-device to be probed asynchronously so a bridge driver that's
waiting for the device can be notified and its .bound callback executed.

Signed-off-by: Javier Martinez Canillas <javier at osg.samsung.com>
---
 drivers/media/i2c/ov9650.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c
index be5a7fd4f076..502c72238a4a 100644
--- a/drivers/media/i2c/ov9650.c
+++ b/drivers/media/i2c/ov9650.c
@@ -23,6 +23,7 @@
 #include <linux/videodev2.h>
 
 #include <media/media-entity.h>
+#include <media/v4l2-async.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-event.h>
@@ -1520,6 +1521,10 @@ static int ov965x_probe(struct i2c_client *client,
 	/* Update exposure time min/max to match frame format */
 	ov965x_update_exposure_ctrl(ov965x);
 
+	ret = v4l2_async_register_subdev(sd);
+	if (ret < 0)
+		goto err_ctrls;
+
 	return 0;
 err_ctrls:
 	v4l2_ctrl_handler_free(sd->ctrl_handler);
@@ -1532,7 +1537,7 @@ static int ov965x_remove(struct i2c_client *client)
 {
 	struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
-	v4l2_device_unregister_subdev(sd);
+	v4l2_async_unregister_subdev(sd);
 	v4l2_ctrl_handler_free(sd->ctrl_handler);
 	media_entity_cleanup(&sd->entity);
 
-- 
2.7.4


More information about the Letux-kernel mailing list