From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Barry Song <21cnbao@gmail.com>
Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-media@vger.kernel.org, linux-sh@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org,
Magnus Damm <magnus.damm@gmail.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
"renwei.wu" <renwei.wu@csr.com>,
DL-SHA-WorkGroupLinux <workgroup.linux@csr.com>,
xiaomeng.hou@csr.com, zilong.wu@csr.com
Subject: Re: [PATCH 07/14] media: soc-camera: support deferred probing of clients
Date: Wed, 10 Apr 2013 14:06:14 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.1304101358490.13557@axis700.grange> (raw)
In-Reply-To: <CAGsJ_4yUY6PE0NWZ9yaOLFmRb3O-HL55=w7Y6muwL0YbkJtP0Q@mail.gmail.com>
Hi Barry
On Wed, 10 Apr 2013, Barry Song wrote:
> Hi Guennadia,
>
> 2012/9/27 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> > Currently soc-camera doesn't work with independently registered I2C client
> > devices, it has to register them itself. This patch adds support for such
> > configurations, in which case client drivers have to request deferred
> > probing until their host becomes available and enables the data interface.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
>
> it seems deferred probing for i2c camera sensors is a more workaround
> than a solution.
> currently, soc-camera-pdrv is the manager of the whole initilization
> flow. it all requires the host/client registerred and initilized
> synchronously. so that results in strange things like that we fill a
> i2c_board_info structure in arch/arm/mach-xxx but we never call
> anything like i2c_new_device() to add the i2c client in mach. because
> we need to do that in the soc-camera-pdrv driver to make all things
> happen orderly.
>
> but now after we move to DT, all i2c device will be registerred
> automatically by of_i2c_register_devices() in i2c_host 's probe, that
> makes the problem much worse and very urgent to get fixed.
>
> returning DEFERRED_PROBE error until getting the private data filled
> by the manager,
This hasn't been the case since several versions of these patches. We no
longer use private data to decide whether subdevices can probe
successfully or have to defer probing.
> indirectly, makes the things seem to be asynchronous,
> but essentially it is still synchronous because the overall timing
> line is still controller by soc-camera-pdrv.
It isn't. If your subdevice driver doesn't have any dependencies, like
e.g. sh_mobile_csi2.c, it will probe asynchronously whenever it's loaded.
It is the task of a bridge driver, in our case of the soc-camera core, to
register notifiers and a list of expected subdevices with the v4l2-async
subsystem. As subdevices complete their probing they signal that to the
v4l2-async too, which then calls bridge's notifiers, which then can build
the pipeline.
> what about another possible way:
> we let all host and i2c client driver probed in any order,
This cannot work, because some I2C devices, e.g. sensors, need a clock
signal from the camera interface to probe. Before the bridge driver has
completed its probing and registered a suitable clock source with the
v4l2-clk framework, sensors cannot be probed. And no, we don't want to
fake successful probing without actually being able to talk to the
hardware.
Thanks
Guennadi
> but let the
> final soc-camera-pdrv is the connection of all things. the situation
> of soc_camera is very similar with ALSA SoC. it turns out ASoC has
> done that very well.
>
> -barry
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2013-04-10 12:06 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1348754853-28619-1-git-send-email-g.liakhovetski@gmx.de>
2012-10-05 12:32 ` [PATCH 00/14] V4L2 DT support Sylwester Nawrocki
2012-10-05 14:41 ` Guennadi Liakhovetski
[not found] ` <1348754853-28619-11-git-send-email-g.liakhovetski@gmx.de>
2012-10-05 19:11 ` [PATCH 10/14] media: soc-camera: support OF cameras Sylwester Nawrocki
2012-10-08 8:37 ` Guennadi Liakhovetski
2012-10-08 9:28 ` Sylwester Nawrocki
2013-04-08 9:19 ` Barry Song
2013-04-08 11:21 ` Guennadi Liakhovetski
2013-04-08 11:49 ` Barry Song
[not found] ` <1348754853-28619-6-git-send-email-g.liakhovetski@gmx.de>
2012-10-01 21:37 ` [PATCH 05/14] media: add a V4L2 OF parser Sylwester Nawrocki
2012-10-02 9:49 ` Guennadi Liakhovetski
2012-10-02 10:13 ` Sylwester Nawrocki
2012-10-02 11:04 ` Guennadi Liakhovetski
2012-10-05 10:41 ` Hans Verkuil
2012-10-05 10:58 ` Guennadi Liakhovetski
2012-10-05 11:23 ` Hans Verkuil
2012-10-05 11:35 ` Guennadi Liakhovetski
2012-10-08 12:23 ` Guennadi Liakhovetski
2012-10-08 13:48 ` Hans Verkuil
2012-10-08 14:30 ` Guennadi Liakhovetski
2012-10-08 14:53 ` Hans Verkuil
2012-10-08 15:15 ` Guennadi Liakhovetski
2012-10-08 15:41 ` Hans Verkuil
2012-10-08 15:53 ` Guennadi Liakhovetski
2012-10-08 16:00 ` Guennadi Liakhovetski
2012-10-10 13:22 ` Laurent Pinchart
2012-10-10 13:18 ` Laurent Pinchart
2012-10-10 16:50 ` Stephen Warren
2012-10-10 22:51 ` Laurent Pinchart
2012-10-11 16:15 ` Stephen Warren
2012-10-10 13:12 ` Laurent Pinchart
2012-10-10 12:54 ` Laurent Pinchart
2012-10-10 13:45 ` Mauro Carvalho Chehab
2012-10-10 14:48 ` Laurent Pinchart
2012-10-10 14:57 ` Mauro Carvalho Chehab
2012-10-10 15:15 ` Laurent Pinchart
2012-10-11 19:48 ` Sakari Ailus
2012-10-13 0:16 ` Guennadi Liakhovetski
2012-10-05 18:30 ` Sylwester Nawrocki
2012-10-05 18:45 ` Mark Brown
2012-10-08 9:40 ` Guennadi Liakhovetski
2012-10-09 10:34 ` Sylwester Nawrocki
2012-10-09 11:00 ` Hans Verkuil
2012-10-10 13:25 ` Laurent Pinchart
2012-10-10 20:23 ` Sylwester Nawrocki
2012-10-10 20:32 ` Guennadi Liakhovetski
2012-10-10 21:12 ` Sylwester Nawrocki
2012-10-10 23:05 ` Laurent Pinchart
2012-10-10 22:58 ` Laurent Pinchart
2012-10-08 21:30 ` Laurent Pinchart
2012-10-08 10:03 ` Sylwester Nawrocki
[not found] ` <1348754853-28619-5-git-send-email-g.liakhovetski@gmx.de>
2012-10-01 20:45 ` [PATCH 04/14] media: add V4L2 DT binding documentation Sylwester Nawrocki
2012-10-02 14:15 ` Rob Herring
2012-10-02 14:33 ` Guennadi Liakhovetski
2012-10-03 20:54 ` Rob Herring
2012-10-05 9:43 ` Guennadi Liakhovetski
2012-10-05 11:31 ` Hans Verkuil
2012-10-05 11:37 ` Guennadi Liakhovetski
2012-10-08 20:00 ` Stephen Warren
2012-10-08 21:00 ` Laurent Pinchart
2012-10-08 21:14 ` Guennadi Liakhovetski
2012-10-09 9:21 ` Hans Verkuil
2012-10-09 9:29 ` Guennadi Liakhovetski
2012-10-05 15:10 ` Sascha Hauer
2012-10-05 15:41 ` Guennadi Liakhovetski
2012-10-05 16:02 ` Sascha Hauer
2012-10-08 7:58 ` Guennadi Liakhovetski
2012-10-10 8:40 ` Sascha Hauer
2012-10-10 8:51 ` Mark Brown
2012-10-10 9:21 ` Sascha Hauer
2012-10-10 10:46 ` Mark Brown
2012-10-08 20:12 ` Stephen Warren
[not found] ` <1348754853-28619-8-git-send-email-g.liakhovetski@gmx.de>
2013-04-10 10:38 ` [PATCH 07/14] media: soc-camera: support deferred probing of clients Barry Song
2013-04-10 12:06 ` Guennadi Liakhovetski [this message]
2013-04-10 13:53 ` Barry Song
2013-04-10 13:56 ` Mark Brown
2013-04-10 14:00 ` Barry Song
2013-04-10 14:03 ` Guennadi Liakhovetski
2013-04-10 14:30 ` Barry Song
2013-04-10 14:43 ` Guennadi Liakhovetski
2013-04-10 15:02 ` Barry Song
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=Pine.LNX.4.64.1304101358490.13557@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=21cnbao@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=renwei.wu@csr.com \
--cc=sylvester.nawrocki@gmail.com \
--cc=workgroup.linux@csr.com \
--cc=xiaomeng.hou@csr.com \
--cc=zilong.wu@csr.com \
/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