summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-09-08 10:05:40 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-19 16:20:02 -0300
commit6dca6cf072038ecd591789cfd94accc6fc053300 (patch)
tree3a8312f6db582266cc675c48794091fad28e2d6f /drivers/media
parent22511cfa7d98d5fec6086b3bae130caaf6b661fa (diff)
downloadop-kernel-dev-6dca6cf072038ecd591789cfd94accc6fc053300.zip
op-kernel-dev-6dca6cf072038ecd591789cfd94accc6fc053300.tar.gz
[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@osg.samsung.com> Tested-by: H . Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/ov9650.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c
index be5a7fd..502c722 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);
OpenPOWER on IntegriCloud