linux/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (C) 2013--2024 Intel Corporation */

#ifndef IPU6_ISYS_CSI2_H
#define IPU6_ISYS_CSI2_H

#include <linux/container_of.h>

#include "ipu6-isys-subdev.h"
#include "ipu6-isys-video.h"

struct media_entity;
struct v4l2_mbus_frame_desc_entry;

struct ipu6_isys_video;
struct ipu6_isys;
struct ipu6_isys_csi2_pdata;
struct ipu6_isys_stream;

#define NR_OF_CSI2_VC
#define INVALID_VC_ID
#define NR_OF_CSI2_SINK_PADS
#define CSI2_PAD_SINK
#define NR_OF_CSI2_SRC_PADS
#define CSI2_PAD_SRC
#define NR_OF_CSI2_PADS

#define CSI2_CSI_RX_DLY_CNT_TERMEN_CLANE_A
#define CSI2_CSI_RX_DLY_CNT_TERMEN_CLANE_B
#define CSI2_CSI_RX_DLY_CNT_SETTLE_CLANE_A
#define CSI2_CSI_RX_DLY_CNT_SETTLE_CLANE_B

#define CSI2_CSI_RX_DLY_CNT_TERMEN_DLANE_A
#define CSI2_CSI_RX_DLY_CNT_TERMEN_DLANE_B
#define CSI2_CSI_RX_DLY_CNT_SETTLE_DLANE_A
#define CSI2_CSI_RX_DLY_CNT_SETTLE_DLANE_B

struct ipu6_isys_csi2 {};

struct ipu6_isys_csi2_timing {};

struct ipu6_csi2_error {};

#define ipu6_isys_subdev_to_csi2(__sd)

#define to_ipu6_isys_csi2(__asd)

s64 ipu6_isys_csi2_get_link_freq(struct ipu6_isys_csi2 *csi2);
int ipu6_isys_csi2_init(struct ipu6_isys_csi2 *csi2, struct ipu6_isys *isys,
			void __iomem *base, unsigned int index);
void ipu6_isys_csi2_cleanup(struct ipu6_isys_csi2 *csi2);
void ipu6_isys_csi2_sof_event_by_stream(struct ipu6_isys_stream *stream);
void ipu6_isys_csi2_eof_event_by_stream(struct ipu6_isys_stream *stream);
void ipu6_isys_register_errors(struct ipu6_isys_csi2 *csi2);
void ipu6_isys_csi2_error(struct ipu6_isys_csi2 *csi2);
int ipu6_isys_csi2_get_remote_desc(u32 source_stream,
				   struct ipu6_isys_csi2 *csi2,
				   struct media_entity *source_entity,
				   struct v4l2_mbus_frame_desc_entry *entry);

#endif /* IPU6_ISYS_CSI2_H */