drivers/comedi/drivers/ni_660x.c
Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/ni_660x.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/comedi/drivers/ni_660x.c- Extension
.c- Size
- 36845 bytes
- Lines
- 1255
- Domain
- Driver Families
- Bucket
- drivers/comedi
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/interrupt.hlinux/comedi/comedi_pci.hmite.hni_tio.hni_routes.h
Detected Declarations
struct ni_660x_register_datastruct ni_660x_boardstruct ni_660x_privateenum ni_660x_registerenum ni_660x_boardidfunction ni_660x_writefunction ni_660x_readfunction ni_660x_gpct_writefunction ni_660x_gpct_readfunction ni_660x_set_dma_channelfunction ni_660x_unset_dma_channelfunction ni_660x_request_mite_channelfunction ni_660x_release_mite_channelfunction ni_660x_cmdfunction ni_660x_cancelfunction set_tio_counterswapfunction ni_660x_handle_gpct_interruptfunction ni_660x_interruptfunction ni_660x_input_pollfunction ni_660x_buf_changefunction ni_660x_allocate_privatefunction ni_660x_alloc_mite_ringsfunction ni_660x_free_mite_ringsfunction ni_660x_dio_insn_bitsfunction ni_660x_select_pfi_outputfunction ni_660x_set_pfi_directionfunction ni_660x_get_pfi_directionfunction ni_660x_set_pfi_routingfunction ni_660x_get_pfi_routingfunction ni_660x_set_pfi_filterfunction ni_660x_dio_insn_configfunction _ni_get_valid_routesfunction get_output_select_sourcefunction determinedfunction test_routefunction connect_routefunction determinedfunction disconnect_routefunction determinedfunction ni_global_insn_configfunction ni_660x_init_tio_chipsfunction ni_660x_auto_attachfunction ni_660x_detachfunction ni_660x_pci_probe
Annotated Snippet
static struct pci_driver ni_660x_pci_driver = {
.name = "ni_660x",
.id_table = ni_660x_pci_table,
.probe = ni_660x_pci_probe,
.remove = comedi_pci_auto_unconfig,
};
module_comedi_pci_driver(ni_660x_driver, ni_660x_pci_driver);
MODULE_AUTHOR("Comedi https://www.comedi.org");
MODULE_DESCRIPTION("Comedi driver for NI 660x counter/timer boards");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/interrupt.h`, `linux/comedi/comedi_pci.h`, `mite.h`, `ni_tio.h`, `ni_routes.h`.
- Detected declarations: `struct ni_660x_register_data`, `struct ni_660x_board`, `struct ni_660x_private`, `enum ni_660x_register`, `enum ni_660x_boardid`, `function ni_660x_write`, `function ni_660x_read`, `function ni_660x_gpct_write`, `function ni_660x_gpct_read`, `function ni_660x_set_dma_channel`.
- Atlas domain: Driver Families / drivers/comedi.
- 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.