drivers/media/pci/hws/hws_pci.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/hws/hws_pci.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/hws/hws_pci.c- Extension
.c- Size
- 23962 bytes
- Lines
- 866
- 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.
- 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/pci.hlinux/types.hlinux/iopoll.hlinux/bitfield.hlinux/module.hlinux/init.hlinux/kthread.hlinux/interrupt.hlinux/dma-mapping.hlinux/err.hlinux/ktime.hlinux/math64.hlinux/pm.hlinux/freezer.hlinux/pci_regs.hmedia/v4l2-ctrls.hhws.hhws_reg.hhws_video.hhws_irq.hhws_v4l2_ioctl.h
Detected Declarations
function hws_elapsed_usfunction enable_pcie_relaxed_orderingfunction hws_configure_hardware_capabilitiesfunction hws_log_lifecycle_snapshotfunction read_chip_idfunction main_ks_thread_handlefunction hws_stop_kthread_actionfunction hws_alloc_seed_buffersfunction hws_free_seed_buffersfunction hws_seed_channelfunction hws_seed_all_channelsfunction hws_irq_mask_gatefunction hws_irq_unmask_gatefunction hws_irq_clear_pendingfunction hws_block_hotpathsfunction hws_probefunction hws_check_busyfunction hws_stop_dspfunction hws_publish_stop_flagsfunction hws_drain_after_stopfunction hws_stop_devicefunction hws_quiesce_for_transitionfunction hws_removefunction hws_pm_suspendfunction hws_pm_resumefunction hws_shutdownfunction pcie_hws_initfunction pcie_hws_exitmodule init pcie_hws_init
Annotated Snippet
static struct pci_driver hws_pci_driver = {
.name = KBUILD_MODNAME,
.id_table = hws_pci_table,
.probe = hws_probe,
.remove = hws_remove,
.shutdown = hws_shutdown,
.driver = {
.pm = HWS_PM_OPS,
},
};
MODULE_DEVICE_TABLE(pci, hws_pci_table);
static int __init pcie_hws_init(void)
{
return pci_register_driver(&hws_pci_driver);
}
static void __exit pcie_hws_exit(void)
{
pci_unregister_driver(&hws_pci_driver);
}
module_init(pcie_hws_init);
module_exit(pcie_hws_exit);
MODULE_DESCRIPTION(DRV_NAME);
MODULE_AUTHOR("Ben Hoff <hoff.benjamin.k@gmail.com>");
MODULE_AUTHOR("Sales <sales@avmatrix.com>");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("DMA_BUF");
Annotation
- Immediate include surface: `linux/pci.h`, `linux/types.h`, `linux/iopoll.h`, `linux/bitfield.h`, `linux/module.h`, `linux/init.h`, `linux/kthread.h`, `linux/interrupt.h`.
- Detected declarations: `function hws_elapsed_us`, `function enable_pcie_relaxed_ordering`, `function hws_configure_hardware_capabilities`, `function hws_log_lifecycle_snapshot`, `function read_chip_id`, `function main_ks_thread_handle`, `function hws_stop_kthread_action`, `function hws_alloc_seed_buffers`, `function hws_free_seed_buffers`, `function hws_seed_channel`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: pattern implementation candidate.
- 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.