drivers/media/pci/saa7164/saa7164-core.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/saa7164/saa7164-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/saa7164/saa7164-core.c- Extension
.c- Size
- 42358 bytes
- Lines
- 1577
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 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/init.hlinux/list.hlinux/module.hlinux/moduleparam.hlinux/kmod.hlinux/kernel.hlinux/slab.hlinux/interrupt.hlinux/debugfs.hlinux/delay.hasm/div64.hsaa7164.h
Detected Declarations
function saa7164_pack_verifierfunction saa7164_ts_verifierfunction saa7164_histogram_resetfunction saa7164_histogram_updatefunction saa7164_histogram_printfunction saa7164_work_enchandler_helperfunction saa7164_work_enchandlerfunction saa7164_work_vbihandlerfunction saa7164_work_cmdhandlerfunction saa7164_buffer_deliverfunction saa7164_irq_vbifunction saa7164_irq_encoderfunction saa7164_irq_tsfunction saa7164_irqfunction saa7164_getfirmwarestatusfunction saa7164_getcurrentfirmwareversionfunction saa7164_dumpregsfunction saa7164_dump_hwdescfunction saa7164_dump_intfdescfunction saa7164_dump_busdescfunction saa7164_get_descriptorsfunction saa7164_pci_quirksfunction get_resourcesfunction release_resourcesfunction saa7164_port_initfunction saa7164_dev_setupfunction scoped_guardfunction scoped_guardfunction saa7164_dev_unregisterfunction saa7164_seq_stopfunction saa7164_debugfs_createfunction saa7164_debugfs_removefunction saa7164_debugfs_createfunction saa7164_enable_msifunction saa7164_initdevfunction saa7164_shutdownfunction saa7164_finidevfunction saa7164_initfunction saa7164_finimodule init saa7164_init
Annotated Snippet
static struct pci_driver saa7164_pci_driver = {
.name = "saa7164",
.id_table = saa7164_pci_tbl,
.probe = saa7164_initdev,
.remove = saa7164_finidev,
};
static int __init saa7164_init(void)
{
int ret = pci_register_driver(&saa7164_pci_driver);
if (ret)
return ret;
saa7164_debugfs_create();
pr_info("saa7164 driver loaded\n");
return 0;
}
static void __exit saa7164_fini(void)
{
saa7164_debugfs_remove();
pci_unregister_driver(&saa7164_pci_driver);
}
module_init(saa7164_init);
module_exit(saa7164_fini);
Annotation
- Immediate include surface: `linux/init.h`, `linux/list.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/kmod.h`, `linux/kernel.h`, `linux/slab.h`, `linux/interrupt.h`.
- Detected declarations: `function saa7164_pack_verifier`, `function saa7164_ts_verifier`, `function saa7164_histogram_reset`, `function saa7164_histogram_update`, `function saa7164_histogram_print`, `function saa7164_work_enchandler_helper`, `function saa7164_work_enchandler`, `function saa7164_work_vbihandler`, `function saa7164_work_cmdhandler`, `function saa7164_buffer_deliver`.
- Atlas domain: Driver Families / drivers/media.
- 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.