upstream: smiapp: Add support for flash, lens and EEPROM devices
(3 patches merged together)
These types devices aren't directly related to the sensor, but are
nevertheless handled by the smiapp driver due to the relationship of
these component to the main part of the camera module --- the sensor.
Additionally, for the async sub-device registration to work, the
notifier containing matching fwnodes will need to be registered. This
is natural to perform in a sensor driver as well.
This does not yet address providing the user space with information on
how to associate the sensor, lens or EEPROM devices but the kernel now
has the necessary information to do that.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Add a check for v4l2_dev to v4l2_async_notifier_register() as to fail
as early as possible since this will fail later in
v4l2_async_test_notify().
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Acked-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
v4l: async: add subnotifier registration for subdevices
When the registered() callback of v4l2_subdev_internal_ops is called
the subdevice has access to the master devices v4l2_dev and it's
called with the async frameworks list_lock held. In this context the
subdevice can register its own notifiers to allow for incremental
discovery of subdevices.
The master device registers the subdevices closest to itself in its
notifier while the subdevice(s) register notifiers for their closest
neighboring devices when they are registered. Using this incremental
approach two problems can be solved:
1. The master device no longer has to care how many devices exist in
the pipeline. It only needs to care about its closest subdevice and
arbitrary long pipelines can be created without having to adapt the
master device for each case.
2. Subdevices which are represented as a single DT node but register
more than one subdevice can use this to improve the pipeline
discovery, since the subdevice driver is the only one who knows
which of its subdevices is linked with which subdevice of a
neighboring DT node.
To enable subdevices to register/unregister notifiers from the
registered()/unregistered() callback v4l2_async_subnotifier_register()
and v4l2_async_subnotifier_unregister() are added. These new notifier
register functions are similar to the master device equivalent
functions
but run without taking the v4l2-async list_lock which already is held
when the registered()/unregistered() callbacks are called.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
Acked-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
5 files changed