drivers/media/pci/mgb4/mgb4_vin.h
Source file repositories/reference/linux-study-clean/drivers/media/pci/mgb4/mgb4_vin.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/mgb4/mgb4_vin.h- Extension
.h- Size
- 1371 bytes
- Lines
- 70
- 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
media/v4l2-device.hmedia/v4l2-dev.hmedia/v4l2-ctrls.hmedia/videobuf2-core.hlinux/debugfs.hmgb4_i2c.h
Detected Declarations
struct mgb4_vin_regsstruct mgb4_vin_configstruct mgb4_vin_dev
Annotated Snippet
struct mgb4_vin_regs {
u32 address;
u32 config;
u32 status;
u32 resolution;
u32 frame_period;
u32 sync;
u32 pclk;
u32 hsync;
u32 vsync;
u32 padding;
u32 timer;
};
struct mgb4_vin_config {
int id;
int dma_channel;
int vin_irq;
int err_irq;
struct mgb4_vin_regs regs;
};
struct mgb4_vin_dev {
struct mgb4_dev *mgbdev;
struct v4l2_device v4l2dev;
struct video_device vdev;
struct vb2_queue queue;
struct mutex lock; /* vdev lock */
spinlock_t qlock; /* video buffer queue lock */
struct list_head buf_list;
struct work_struct dma_work, err_work;
unsigned int sequence;
struct v4l2_dv_timings timings;
u32 freq_range;
u32 padding;
struct mgb4_i2c_client deser;
const struct mgb4_vin_config *config;
#ifdef CONFIG_DEBUG_FS
struct debugfs_regset32 regset;
struct debugfs_reg32 regs[sizeof(struct mgb4_vin_regs) / 4];
#endif
};
struct mgb4_vin_dev *mgb4_vin_create(struct mgb4_dev *mgbdev, int id);
void mgb4_vin_free(struct mgb4_vin_dev *vindev);
#endif
Annotation
- Immediate include surface: `media/v4l2-device.h`, `media/v4l2-dev.h`, `media/v4l2-ctrls.h`, `media/videobuf2-core.h`, `linux/debugfs.h`, `mgb4_i2c.h`.
- Detected declarations: `struct mgb4_vin_regs`, `struct mgb4_vin_config`, `struct mgb4_vin_dev`.
- 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.