From: Lad Prabhakar <prabhakar.csengg@gmail.com>
To: LMML <linux-media@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
DLOS <davinci-linux-open-source@linux.davincidsp.com>,
"Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Hans Verkuil <hans.verkuil@cisco.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Sakari Ailus <sakari.ailus@iki.fi>
Subject: [PATCH 5/6] media: i2c: ths7303: add support for asynchronous probing
Date: Wed, 15 May 2013 17:27:21 +0530 [thread overview]
Message-ID: <1368619042-28252-6-git-send-email-prabhakar.csengg@gmail.com> (raw)
In-Reply-To: <1368619042-28252-1-git-send-email-prabhakar.csengg@gmail.com>
From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Both synchronous and asynchronous ths7303 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/ths7303.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
index b954195..4f772a2 100644
--- a/drivers/media/i2c/ths7303.c
+++ b/drivers/media/i2c/ths7303.c
@@ -26,6 +26,7 @@
#include <linux/slab.h>
#include <media/ths7303.h>
+#include <media/v4l2-async.h>
#include <media/v4l2-chip-ident.h>
#include <media/v4l2-device.h>
@@ -355,6 +356,7 @@ static int ths7303_probe(struct i2c_client *client,
struct ths7303_platform_data *pdata = client->dev.platform_data;
struct ths7303_state *state;
struct v4l2_subdev *sd;
+ int ret;
if (pdata == NULL) {
dev_err(&client->dev, "No platform data\n");
@@ -385,13 +387,20 @@ static int ths7303_probe(struct i2c_client *client,
return -EINVAL;
}
+ state->sd.dev = &client->dev;
+ ret = v4l2_async_register_subdev(&state->sd);
+ if (ret)
+ return ret;
+
return 0;
}
static int ths7303_remove(struct i2c_client *client)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
+ struct ths7303_state *ths7303 = to_state(sd);
+ v4l2_async_unregister_subdev(&ths7303->sd);
v4l2_device_unregister_subdev(sd);
return 0;
--
1.7.4.1
next prev parent reply other threads:[~2013-05-15 12:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 11:57 [PATCH 0/6] media: i2c: ths7303 feature enhancement and cleanup Lad Prabhakar
2013-05-15 11:57 ` [PATCH 1/6] media: i2c: ths7303: remove init_enable option from pdata Lad Prabhakar
2013-05-16 22:37 ` Sakari Ailus
2013-05-17 4:56 ` Prabhakar Lad
2013-05-15 11:57 ` [PATCH 2/6] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata Lad Prabhakar
2013-05-15 12:05 ` Laurent Pinchart
2013-05-15 12:11 ` Prabhakar Lad
2013-05-16 11:48 ` Prabhakar Lad
2013-05-16 11:54 ` Laurent Pinchart
2013-05-23 9:10 ` Prabhakar Lad
2013-05-15 11:57 ` [PATCH 3/6] media: i2c: ths7303: remove unnecessary function ths7303_setup() Lad Prabhakar
2013-05-15 11:57 ` [PATCH 4/6] media: i2c: ths7303: make the pdata as a constant pointer Lad Prabhakar
2013-05-15 11:57 ` Lad Prabhakar [this message]
2013-05-15 11:57 ` [PATCH 6/6] media: i2c: ths7303: add OF support Lad Prabhakar
2013-05-23 8:51 ` [PATCH 0/6] media: i2c: ths7303 feature enhancement and cleanup Hans Verkuil
2013-05-23 9:07 ` Prabhakar Lad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368619042-28252-6-git-send-email-prabhakar.csengg@gmail.com \
--to=prabhakar.csengg@gmail.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=g.liakhovetski@gmx.de \
--cc=hans.verkuil@cisco.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox