drivers/gpib/cec/cec_gpib.c
Source file repositories/reference/linux-study-clean/drivers/gpib/cec/cec_gpib.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpib/cec/cec_gpib.c- Extension
.c- Size
- 10633 bytes
- Lines
- 395
- Domain
- Driver Families
- Bucket
- drivers/gpib
- 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
cec.hlinux/pci.hlinux/io.hlinux/bitops.hasm/dma.hlinux/module.hlinux/slab.h
Detected Declarations
function cec_interruptfunction cec_readfunction cec_writefunction cec_commandfunction cec_take_controlfunction cec_go_to_standbyfunction cec_request_system_controlfunction cec_interface_clearfunction cec_remote_enablefunction cec_enable_eosfunction cec_disable_eosfunction cec_update_statusfunction cec_primary_addressfunction cec_secondary_addressfunction cec_parallel_pollfunction cec_parallel_poll_configurefunction cec_parallel_poll_responsefunction cec_serial_poll_responsefunction cec_serial_poll_statusfunction cec_t1_delayfunction cec_return_to_localfunction cec_allocate_privatefunction cec_free_privatefunction cec_generic_attachfunction cec_initfunction cec_pci_attachfunction gpib_pci_get_devicefunction cec_pci_detachfunction cec_pci_probefunction cec_init_modulefunction cec_exit_modulemodule init cec_init_module
Annotated Snippet
static struct pci_driver cec_pci_driver = {
.name = DRV_NAME,
.id_table = cec_pci_table,
.probe = &cec_pci_probe
};
static int __init cec_init_module(void)
{
int result;
result = pci_register_driver(&cec_pci_driver);
if (result) {
pr_err("pci_register_driver failed: error = %d\n", result);
return result;
}
result = gpib_register_driver(&cec_pci_interface, THIS_MODULE);
if (result) {
pr_err("gpib_register_driver failed: error = %d\n", result);
return result;
}
return 0;
}
static void cec_exit_module(void)
{
gpib_unregister_driver(&cec_pci_interface);
pci_unregister_driver(&cec_pci_driver);
}
module_init(cec_init_module);
module_exit(cec_exit_module);
Annotation
- Immediate include surface: `cec.h`, `linux/pci.h`, `linux/io.h`, `linux/bitops.h`, `asm/dma.h`, `linux/module.h`, `linux/slab.h`.
- Detected declarations: `function cec_interrupt`, `function cec_read`, `function cec_write`, `function cec_command`, `function cec_take_control`, `function cec_go_to_standby`, `function cec_request_system_control`, `function cec_interface_clear`, `function cec_remote_enable`, `function cec_enable_eos`.
- Atlas domain: Driver Families / drivers/gpib.
- 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.