[media] s5p-fimc: Handle sub-device interdependencies using deferred probing
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 21 Mar 2012 12:58:09 +0000 (09:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 10 Apr 2012 18:25:25 +0000 (15:25 -0300)
commitecd9acbf545a0d7191478eea8a14331baf5ed121
tree7a42e6250a6cc78c98d58f1666a43a4256d3c7ec
parent6ec0163b7952ad087844338806402468fb06a32c
[media] s5p-fimc: Handle sub-device interdependencies using deferred probing

In this driver there are several entities associated with separate
platform or I2C client devices, which may get probed in random order.

When the platform device bound to the media device driver is probed
all other entity drivers need to be already in place and initialized.
If any of them is not, fail the media device probe and return an error
indicating we need to be retried once any new driver gets registered.
The media device driver probe will not succeed until there are available
all needed sub-drivers, as specified in the platform data.

While at it, make sure the s5p-csis module (MIPI-CSI receiver driver)
does not get unloaded when in use, by guarding its usage with
try_module_get/module_put.

This patch is a prerequisite for adding the device tree support.
It now also allows again to unbind/bind the driver at runtime from
user space via sysfs.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-fimc/fimc-core.c
drivers/media/video/s5p-fimc/fimc-mdevice.c
drivers/media/video/s5p-fimc/mipi-csis.c
This page took 0.048506 seconds and 5 git commands to generate.