drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h
Extension
.h
Size
5544 bytes
Lines
199
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct rzg2l_cru_csi {
	struct v4l2_async_connection *asd;
	struct v4l2_subdev *subdev;
};

struct rzg2l_cru_ip {
	struct v4l2_subdev subdev;
	struct media_pad pads[2];
	struct v4l2_async_notifier notifier;
	struct v4l2_subdev *remote;
};

/**
 * struct rzg2l_cru_ip_format - CRU IP format
 * @codes: Array of up to four media bus codes
 * @datatype: MIPI CSI2 data type
 * @format: 4CC format identifier (V4L2_PIX_FMT_*)
 * @icndmr: ICnDMR register value
 * @yuv: Flag to indicate whether the format is YUV-based.
 */
struct rzg2l_cru_ip_format {
	/*
	 * RAW output formats might be produced by RAW media codes with any one
	 * of the 4 common bayer patterns.
	 */
	u32 codes[4];
	u32 datatype;
	u32 format;
	u32 icndmr;
	bool yuv;
};

struct rzg2l_cru_info {
	unsigned int max_width;
	unsigned int max_height;
	u16 image_conv;
	const u16 *regs;
	bool has_stride;
	irqreturn_t (*irq_handler)(int irq, void *data);
	void (*enable_interrupts)(struct rzg2l_cru_dev *cru);
	void (*disable_interrupts)(struct rzg2l_cru_dev *cru);
	bool (*fifo_empty)(struct rzg2l_cru_dev *cru);
};

/**
 * struct rzg2l_cru_dev - Renesas CRU device structure
 * @dev:		(OF) device
 * @base:		device I/O register space remapped to virtual memory
 * @info:		info about CRU instance
 *
 * @presetn:		CRU_PRESETN reset line
 * @aresetn:		CRU_ARESETN reset line
 *
 * @vclk:		CRU Main clock
 *
 * @vdev:		V4L2 video device associated with CRU
 * @v4l2_dev:		V4L2 device
 * @num_buf:		Holds the current number of buffers enabled
 * @svc_channel:	SVC0/1/2/3 to use for RZ/G3E
 * @notifier:		V4L2 asynchronous subdevs notifier
 *
 * @ip:			Image processing subdev info
 * @csi:		CSI info
 * @mdev:		media device
 * @mdev_lock:		protects the count, notifier and csi members
 * @pad:		media pad for the video device entity
 *
 * @hw_lock:		protects the @active_slot counter, hardware programming
 *			of slot addresses and the @buf_addr[] list
 * @buf_addr:		Memory addresses where current video data is written
 * @active_slot:	The slot in use
 *
 * @lock:		protects @queue
 * @queue:		vb2 buffers queue
 * @scratch:		cpu address for scratch buffer
 * @scratch_phys:	physical address of the scratch buffer
 *
 * @qlock:		protects @queue_buf, @buf_list, @sequence
 *			@state
 * @queue_buf:		Keeps track of buffers given to HW slot
 * @buf_list:		list of queued buffers
 * @sequence:		V4L2 buffers sequence number
 * @state:		keeps track of operation state
 *
 * @format:		active V4L2 pixel format
 */
struct rzg2l_cru_dev {
	struct device *dev;
	void __iomem *base;
	const struct rzg2l_cru_info *info;

Annotation

Implementation Notes