[media] V4L2: support asynchronous subdevice registration
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 8 Jan 2013 10:06:31 +0000 (07:06 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 21 Jun 2013 19:30:00 +0000 (16:30 -0300)
commite9e310491bdbc8c0f33ea0e2ce65eff345a01f71
treec1ada792f3d31542ff8038d140de3232035d41a6
parent668773b84604926519e2baf444f382f88d799d41
[media] V4L2: support asynchronous subdevice registration

Currently bridge device drivers register devices for all subdevices
synchronously, typically, during their probing. E.g. if an I2C CMOS sensor
is attached to a video bridge device, the bridge driver will create an I2C
device and wait for the respective I2C driver to probe. This makes linking
of devices straight forward, but this approach cannot be used with
intrinsically asynchronous and unordered device registration systems like
the Flattened Device Tree. To support such systems this patch adds an
asynchronous subdevice registration framework to V4L2. To use it respective
(e.g. I2C) subdevice drivers must register themselves with the framework.
A bridge driver on the other hand must register notification callbacks,
that will be called upon various related events.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/Makefile
drivers/media/v4l2-core/v4l2-async.c [new file with mode: 0644]
include/media/v4l2-async.h [new file with mode: 0644]
include/media/v4l2-subdev.h