media: ipu3-cio2: Defer probing until the PMIC is fully setup
authorHans de Goede <hdegoede@redhat.com>
Fri, 3 Dec 2021 10:28:55 +0000 (11:28 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 16 Dec 2021 19:57:21 +0000 (20:57 +0100)
commitae971ccae9de3c6ec6507a9ddc7fb10c03234b8b
tree5397dfe11c946ad2959fbac5fbaeb5c63ad93085
parent86790a4fdf4b3d1ad96cd0f8c4e10bad878243d8
media: ipu3-cio2: Defer probing until the PMIC is fully setup

On devices where things are not fully describe in devicetree (1)
and where the code thus falls back to calling cio2_bridge_init(),
the i2c-clients for any VCMs also need to be instantiated manually.

The VCM can be probed by its driver as soon as the code instantiates
the i2c-client and this probing must not happen before the PMIC is
fully setup.

Make cio2_bridge_init() return -EPROBE_DEFER when the PMIC is not
fully-setup, deferring the probe of the ipu3-cio2 driver.

This is a preparation patch for adding VCM enumeration support to
the ipu3-cio2-bridge code.

1) Through embedding of devicetree info in the ACPI tables

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/media/pci/intel/ipu3/cio2-bridge.c