drivers/media/platform/raspberrypi/rp1-cfe/csi2.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/raspberrypi/rp1-cfe/csi2.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/raspberrypi/rp1-cfe/csi2.h- Extension
.h- Size
- 2283 bytes
- Lines
- 90
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.hlinux/io.hlinux/types.hmedia/v4l2-device.hmedia/v4l2-subdev.hdphy.h
Detected Declarations
struct csi2_deviceenum csi2_modeenum csi2_compression_modeenum discards_table_index
Annotated Snippet
struct csi2_device {
/* Parent V4l2 device */
struct v4l2_device *v4l2_dev;
void __iomem *base;
struct dphy_data dphy;
enum v4l2_mbus_type bus_type;
unsigned int bus_flags;
unsigned int num_lines[CSI2_NUM_CHANNELS];
struct media_pad pad[CSI2_NUM_PADS];
struct v4l2_subdev sd;
/* lock for csi2 errors counters */
spinlock_t errors_lock;
u32 overflows;
u32 discards_table[DISCARDS_TABLE_NUM_VCS][DISCARDS_TABLE_NUM_ENTRIES];
u32 discards_dt_table[DISCARDS_TABLE_NUM_ENTRIES];
};
void csi2_isr(struct csi2_device *csi2, bool *sof, bool *eof);
void csi2_set_buffer(struct csi2_device *csi2, unsigned int channel,
dma_addr_t dmaaddr, unsigned int stride,
unsigned int size);
void csi2_set_compression(struct csi2_device *csi2, unsigned int channel,
enum csi2_compression_mode mode, unsigned int shift,
unsigned int offset);
void csi2_start_channel(struct csi2_device *csi2, unsigned int channel,
enum csi2_mode mode, bool auto_arm,
bool pack_bytes, unsigned int width,
unsigned int height, u8 vc, u8 dt);
void csi2_stop_channel(struct csi2_device *csi2, unsigned int channel);
void csi2_open_rx(struct csi2_device *csi2);
void csi2_close_rx(struct csi2_device *csi2);
int csi2_init(struct csi2_device *csi2, struct dentry *debugfs);
void csi2_uninit(struct csi2_device *csi2);
#endif
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/io.h`, `linux/types.h`, `media/v4l2-device.h`, `media/v4l2-subdev.h`, `dphy.h`.
- Detected declarations: `struct csi2_device`, `enum csi2_mode`, `enum csi2_compression_mode`, `enum discards_table_index`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.