media: ipu-bridge: Add a ipu_bridge_parse_ssdb() helper function
authorHans de Goede <hdegoede@redhat.com>
Wed, 5 Jul 2023 21:30:00 +0000 (23:30 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 10 Aug 2023 05:58:40 +0000 (07:58 +0200)
commitdd671ed0c580f9970db21c58a7cc4fef699e7973
treed3c409f7fc7da5f67c642d87c51525d523e13f42
parent77c45766409a29624eff9f7a000e9255aaccedc9
media: ipu-bridge: Add a ipu_bridge_parse_ssdb() helper function

The code to go from ACPI sensor info to a fwnode-tree with connector
nodes and endpoint properties is 99% the same for the atomisp2 and
the IPU3.

The main difference is that atomisp2 devices do not have a SSDB table
with various info.

Abstract out the parsing of the sensor's ACPI fwnode into a helper
function and store the parsed results, rather then the raw SSDB
in struct ipu_sensor.

This is a preparation patch for making the ipu-bridge code more generic
so that it can be shared with the atomisp driver.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
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/ipu-bridge.c
drivers/media/pci/intel/ipu-bridge.h