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.
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/irqreturn.hlinux/mutex.hlinux/reset.hlinux/spinlock.hmedia/v4l2-async.hmedia/v4l2-dev.hmedia/v4l2-device.hmedia/videobuf2-v4l2.h
Detected Declarations
struct rzg2l_cru_devstruct rzg2l_cru_csistruct rzg2l_cru_ipstruct rzg2l_cru_ip_formatstruct rzg2l_cru_infostruct rzg2l_cru_devenum rzg2l_csi2_pads
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
- Immediate include surface: `linux/irqreturn.h`, `linux/mutex.h`, `linux/reset.h`, `linux/spinlock.h`, `media/v4l2-async.h`, `media/v4l2-dev.h`, `media/v4l2-device.h`, `media/videobuf2-v4l2.h`.
- Detected declarations: `struct rzg2l_cru_dev`, `struct rzg2l_cru_csi`, `struct rzg2l_cru_ip`, `struct rzg2l_cru_ip_format`, `struct rzg2l_cru_info`, `struct rzg2l_cru_dev`, `enum rzg2l_csi2_pads`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.