drivers/media/pci/bt8xx/bt878.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/bt8xx/bt878.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/bt8xx/bt878.c- Extension
.c- Size
- 14580 bytes
- Lines
- 568
- 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/module.hlinux/kernel.hlinux/pci.hlinux/pgtable.hasm/io.hlinux/ioport.hasm/page.hlinux/types.hlinux/interrupt.hlinux/kmod.hlinux/vmalloc.hlinux/init.hmedia/dmxdev.hmedia/dvbdev.hbt878.hdst_priv.h
Detected Declarations
function bt878_mem_freefunction bt878_mem_allocfunction bt878_make_riscfunction bt878_risc_programfunction bt878_startfunction bt878_stopfunction bt878_irqfunction bt878_device_controlfunction card_namefunction bt878_probefunction pci_resource_lenfunction bt878_removefunction bt878_init_modulefunction bt878_cleanup_modulemodule init bt878_init_moduleexport bt878_numexport bt878export bt878_startexport bt878_stopexport bt878_device_control
Annotated Snippet
static struct pci_driver bt878_pci_driver = {
.name = "bt878",
.id_table = bt878_pci_tbl,
.probe = bt878_probe,
.remove = bt878_remove,
};
/*******************************/
/* Module management functions */
/*******************************/
static int __init bt878_init_module(void)
{
bt878_num = 0;
printk(KERN_INFO "bt878: AUDIO driver version %d.%d.%d loaded\n",
(BT878_VERSION_CODE >> 16) & 0xff,
(BT878_VERSION_CODE >> 8) & 0xff,
BT878_VERSION_CODE & 0xff);
return pci_register_driver(&bt878_pci_driver);
}
static void __exit bt878_cleanup_module(void)
{
pci_unregister_driver(&bt878_pci_driver);
}
module_init(bt878_init_module);
module_exit(bt878_cleanup_module);
MODULE_DESCRIPTION("DVB/ATSC Support for bt878 based TV cards");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/pci.h`, `linux/pgtable.h`, `asm/io.h`, `linux/ioport.h`, `asm/page.h`, `linux/types.h`.
- Detected declarations: `function bt878_mem_free`, `function bt878_mem_alloc`, `function bt878_make_risc`, `function bt878_risc_program`, `function bt878_start`, `function bt878_stop`, `function bt878_irq`, `function bt878_device_control`, `function card_name`, `function bt878_probe`.
- 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.