diff mbox

[v2,1/2] media: i2c: tvp7002: add support for asynchronous probing

Message ID 1371923055-29623-2-git-send-email-prabhakar.csengg@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lad, Prabhakar June 22, 2013, 5:44 p.m. UTC
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>

Both synchronous and asynchronous tvp7002 subdevice probing
is supported by this patch.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-kernel@vger.kernel.org
Cc: davinci-linux-open-source@linux.davincidsp.com
---
 drivers/media/i2c/tvp7002.c |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Hans Verkuil June 24, 2013, 7:14 a.m. UTC | #1
On Sat June 22 2013 19:44:14 Prabhakar Lad wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> 
> Both synchronous and asynchronous tvp7002 subdevice probing
> is supported by this patch.

Can I merge this patch without patch 2/2? Or should I wait with both until
the video sync properties have been approved?

	Hans

> 
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> Cc: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Sakari Ailus <sakari.ailus@iki.fi>
> Cc: linux-kernel@vger.kernel.org
> Cc: davinci-linux-open-source@linux.davincidsp.com
> ---
>  drivers/media/i2c/tvp7002.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
> index 36ad565..b577548 100644
> --- a/drivers/media/i2c/tvp7002.c
> +++ b/drivers/media/i2c/tvp7002.c
> @@ -31,6 +31,7 @@
>  #include <linux/module.h>
>  #include <linux/v4l2-dv-timings.h>
>  #include <media/tvp7002.h>
> +#include <media/v4l2-async.h>
>  #include <media/v4l2-device.h>
>  #include <media/v4l2-common.h>
>  #include <media/v4l2-ctrls.h>
> @@ -1040,6 +1041,10 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
>  	}
>  	v4l2_ctrl_handler_setup(&device->hdl);
>  
> +	error = v4l2_async_register_subdev(&device->sd);
> +	if (error)
> +		goto error;
> +
>  	return 0;
>  
>  error:
> @@ -1064,6 +1069,7 @@ static int tvp7002_remove(struct i2c_client *c)
>  
>  	v4l2_dbg(1, debug, sd, "Removing tvp7002 adapter"
>  				"on address 0x%x\n", c->addr);
> +	v4l2_async_unregister_subdev(&device->sd);
>  #if defined(CONFIG_MEDIA_CONTROLLER)
>  	media_entity_cleanup(&device->sd.entity);
>  #endif
>
Lad, Prabhakar June 24, 2013, 8:16 a.m. UTC | #2
Hi Hans,

On Mon, Jun 24, 2013 at 12:44 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> On Sat June 22 2013 19:44:14 Prabhakar Lad wrote:
>> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>>
>> Both synchronous and asynchronous tvp7002 subdevice probing
>> is supported by this patch.
>
> Can I merge this patch without patch 2/2? Or should I wait with both until
> the video sync properties have been approved?
>
You can go ahead and merge this one no need to wait for 2/2, I know
the video sync will take more time :)

Regards,
--Prabhakar Lad
diff mbox

Patch

diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
index 36ad565..b577548 100644
--- a/drivers/media/i2c/tvp7002.c
+++ b/drivers/media/i2c/tvp7002.c
@@ -31,6 +31,7 @@ 
 #include <linux/module.h>
 #include <linux/v4l2-dv-timings.h>
 #include <media/tvp7002.h>
+#include <media/v4l2-async.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ctrls.h>
@@ -1040,6 +1041,10 @@  static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
 	}
 	v4l2_ctrl_handler_setup(&device->hdl);
 
+	error = v4l2_async_register_subdev(&device->sd);
+	if (error)
+		goto error;
+
 	return 0;
 
 error:
@@ -1064,6 +1069,7 @@  static int tvp7002_remove(struct i2c_client *c)
 
 	v4l2_dbg(1, debug, sd, "Removing tvp7002 adapter"
 				"on address 0x%x\n", c->addr);
+	v4l2_async_unregister_subdev(&device->sd);
 #if defined(CONFIG_MEDIA_CONTROLLER)
 	media_entity_cleanup(&device->sd.entity);
 #endif