linux/include/media/ipu-bridge.h

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

#include <linux/mod_devicetable.h>
#include <linux/property.h>
#include <linux/types.h>
#include <media/v4l2-fwnode.h>

#define IPU_HID
#define IPU_MAX_LANES
#define IPU_MAX_PORTS
#define MAX_NUM_LINK_FREQS

/* Values are educated guesses as we don't have a spec */
#define IPU_SENSOR_ROTATION_NORMAL
#define IPU_SENSOR_ROTATION_INVERTED

#define IPU_SENSOR_CONFIG(_HID, _NR, ...)

#define NODE_SENSOR(_HID, _PROPS)

#define NODE_PORT(_PORT, _SENSOR_NODE)

#define NODE_ENDPOINT(_EP, _PORT, _PROPS)

#define NODE_VCM(_TYPE)

enum ipu_sensor_swnodes {};

/* Data representation as it is in ACPI SSDB buffer */
struct ipu_sensor_ssdb {} __packed;

struct ipu_property_names {};

struct ipu_node_names {};

struct ipu_sensor_config {};

struct ipu_sensor {};

ipu_parse_sensor_fwnode_t;

struct ipu_bridge {};

#if IS_ENABLED(CONFIG_IPU_BRIDGE)
int ipu_bridge_init(struct device *dev,
		    ipu_parse_sensor_fwnode_t parse_sensor_fwnode);
int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor);
int ipu_bridge_instantiate_vcm(struct device *sensor);
#else
/* Use a define to avoid the @parse_sensor_fwnode argument getting evaluated */
#define ipu_bridge_init
static inline int ipu_bridge_instantiate_vcm(struct device *s) { return 0; }
#endif

#endif