linux/drivers/media/pci/intel/ipu-bridge.c

// SPDX-License-Identifier: GPL-2.0
/* Author: Dan Scally <[email protected]> */

#include <linux/acpi.h>
#include <linux/cleanup.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/mei_cl_bus.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/string.h>
#include <linux/workqueue.h>

#include <media/ipu-bridge.h>
#include <media/v4l2-fwnode.h>

#define ADEV_DEV(adev)

/*
 * 92335fcf-3203-4472-af93-7b4453ac29da
 *
 * Used to build MEI CSI device name to lookup MEI CSI device by
 * device_find_child_by_name().
 */
#define MEI_CSI_UUID

/*
 * IVSC device name
 *
 * Used to match IVSC device by ipu_bridge_match_ivsc_dev()
 */
#define IVSC_DEV_NAME

/*
 * Extend this array with ACPI Hardware IDs of devices known to be working
 * plus the number of link-frequencies expected by their drivers, along with
 * the frequency values in hertz. This is somewhat opportunistic way of adding
 * support for this for now in the hopes of a better source for the information
 * (possibly some encoded value in the SSDB buffer that we're unaware of)
 * becoming apparent in the future.
 *
 * Do not add an entry for a sensor that is not actually supported.
 *
 * Please keep the list sorted by ACPI HID.
 */
static const struct ipu_sensor_config ipu_supported_sensors[] =;

static const struct ipu_property_names prop_names =;

static const char * const ipu_vcm_types[] =;

#if IS_ENABLED(CONFIG_ACPI)
/*
 * Used to figure out IVSC acpi device by ipu_bridge_get_ivsc_acpi_dev()
 * instead of device and driver match to probe IVSC device.
 */
static const struct acpi_device_id ivsc_acpi_ids[] =;

static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev)
{}
#else
static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev)
{
	return NULL;
}
#endif

static int ipu_bridge_match_ivsc_dev(struct device *dev, const void *adev)
{}

static struct device *ipu_bridge_get_ivsc_csi_dev(struct acpi_device *adev)
{}

static int ipu_bridge_check_ivsc_dev(struct ipu_sensor *sensor,
				     struct acpi_device *sensor_adev)
{}

static int ipu_bridge_read_acpi_buffer(struct acpi_device *adev, char *id,
				       void *data, u32 size)
{}

static u32 ipu_bridge_parse_rotation(struct acpi_device *adev,
				     struct ipu_sensor_ssdb *ssdb)
{}

static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_device *adev)
{}

int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor)
{}
EXPORT_SYMBOL_NS_GPL();

static void ipu_bridge_create_fwnode_properties(
	struct ipu_sensor *sensor,
	struct ipu_bridge *bridge,
	const struct ipu_sensor_config *cfg)
{}

static void ipu_bridge_init_swnode_names(struct ipu_sensor *sensor)
{}

static void ipu_bridge_init_swnode_group(struct ipu_sensor *sensor)
{}

static void ipu_bridge_create_connection_swnodes(struct ipu_bridge *bridge,
						 struct ipu_sensor *sensor)
{}

/*
 * The actual instantiation must be done from a workqueue to avoid
 * a deadlock on taking list_lock from v4l2-async twice.
 */
struct ipu_bridge_instantiate_vcm_work_data {};

static void ipu_bridge_instantiate_vcm_work(struct work_struct *work)
{}

int ipu_bridge_instantiate_vcm(struct device *sensor)
{}
EXPORT_SYMBOL_NS_GPL();

static int ipu_bridge_instantiate_ivsc(struct ipu_sensor *sensor)
{}

static void ipu_bridge_unregister_sensors(struct ipu_bridge *bridge)
{}

static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg,
				     struct ipu_bridge *bridge)
{}

static int ipu_bridge_connect_sensors(struct ipu_bridge *bridge)
{}

static int ipu_bridge_ivsc_is_ready(void)
{}

static int ipu_bridge_check_fwnode_graph(struct fwnode_handle *fwnode)
{}

static DEFINE_MUTEX(ipu_bridge_mutex);

int ipu_bridge_init(struct device *dev,
		    ipu_parse_sensor_fwnode_t parse_sensor_fwnode)
{}
EXPORT_SYMBOL_NS_GPL();

MODULE_LICENSE();
MODULE_DESCRIPTION();