linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] [media] ov9650: add support for asynchronous probing
Date: Thu, 8 Sep 2016 19:08:38 +0200	[thread overview]
Message-ID: <28493A99-C0CF-4662-B4EF-6D8A3576593D@goldelico.com> (raw)
In-Reply-To: <1473339940-24572-1-git-send-email-javier@osg.samsung.com>


> Am 08.09.2016 um 15:05 schrieb Javier Martinez Canillas <javier@osg.samsung.com>:
> 
> 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: hns@goldelico.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
> 

      reply	other threads:[~2016-09-08 17:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 13:05 [PATCH] [media] ov9650: add support for asynchronous probing Javier Martinez Canillas
2016-09-08 17:08 ` H. Nikolaus Schaller [this message]

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=28493A99-C0CF-4662-B4EF-6D8A3576593D@goldelico.com \
    --to=hns@goldelico.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=javier@osg.samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).