media: atomisp: csi2-bridge: Add support for VCM I2C-client instantiation
authorHans de Goede <hdegoede@redhat.com>
Wed, 5 Jul 2023 21:30:10 +0000 (23:30 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 10 Aug 2023 05:58:41 +0000 (07:58 +0200)
commitf663fb4967b0e428f80f7850090ed3ba3bff0e3b
tree02e2aac6394b6b53b42f539d598409ad43158724
parentfc0f5b59adf5170f0f4c2dc20c13f558e2baf64a
media: atomisp: csi2-bridge: Add support for VCM I2C-client instantiation

Fill sensor->vcm_type and call intel_cio2_bridge_instantiate_vcm() from
the v4l2-async bound op so that an I2C-client will be instatiated for
the VCM.

Note unfortunately on atomisp the _DSM to get the VCM type sometimes
returns a VCM even though there is none. Since VCMs are typically only
used together with certain sensors, work around this by adding a vcm
field to atomisp_sensor_config and only check for a VCM when that is set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c