samples/v4l/v4l2-pci-skeleton.c
Source file repositories/reference/linux-study-clean/samples/v4l/v4l2-pci-skeleton.c
File Facts
- System
- Linux kernel
- Corpus path
samples/v4l/v4l2-pci-skeleton.c- Extension
.c- Size
- 25184 bytes
- Lines
- 901
- Domain
- Support Tooling And Documentation
- Bucket
- samples
- Inferred role
- Support Tooling And Documentation: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/kernel.hlinux/module.hlinux/init.hlinux/kmod.hlinux/mutex.hlinux/pci.hlinux/interrupt.hlinux/videodev2.hlinux/v4l2-dv-timings.hmedia/v4l2-device.hmedia/v4l2-dev.hmedia/v4l2-ioctl.hmedia/v4l2-dv-timings.hmedia/v4l2-ctrls.hmedia/v4l2-event.hmedia/videobuf2-v4l2.hmedia/videobuf2-dma-contig.h
Detected Declarations
struct skeletonstruct skel_bufferfunction skeleton_irqfunction queue_setupfunction buffer_preparefunction buffer_queuefunction return_all_buffersfunction start_streamingfunction stop_streamingfunction skeleton_querycapfunction skeleton_fill_pix_formatfunction skeleton_try_fmt_vid_capfunction skeleton_s_fmt_vid_capfunction skeleton_g_fmt_vid_capfunction skeleton_enum_fmt_vid_capfunction skeleton_s_stdfunction skeleton_g_stdfunction tvnormsfunction skeleton_s_dv_timingsfunction skeleton_g_dv_timingsfunction skeleton_enum_dv_timingsfunction systemfunction skeleton_dv_timings_capfunction skeleton_enum_inputfunction skeleton_s_inputfunction skeleton_g_inputfunction skeleton_s_ctrlfunction skeleton_probefunction skeleton_remove
Annotated Snippet
static struct pci_driver skeleton_driver = {
.name = KBUILD_MODNAME,
.probe = skeleton_probe,
.remove = skeleton_remove,
.id_table = skeleton_pci_tbl,
};
module_pci_driver(skeleton_driver);
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/module.h`, `linux/init.h`, `linux/kmod.h`, `linux/mutex.h`, `linux/pci.h`, `linux/interrupt.h`.
- Detected declarations: `struct skeleton`, `struct skel_buffer`, `function skeleton_irq`, `function queue_setup`, `function buffer_prepare`, `function buffer_queue`, `function return_all_buffers`, `function start_streaming`, `function stop_streaming`, `function skeleton_querycap`.
- Atlas domain: Support Tooling And Documentation / samples.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.