drivers/comedi/drivers/comedi_test.c
Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/comedi_test.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/comedi/drivers/comedi_test.c- Extension
.c- Size
- 26469 bytes
- Lines
- 920
- Domain
- Driver Families
- Bucket
- drivers/comedi
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/comedi/comedidev.hasm/div64.hlinux/timer.hlinux/ktime.hlinux/jiffies.hlinux/device.hlinux/kdev_t.h
Detected Declarations
struct waveform_privatefunction fake_sawtoothfunction fake_squarewavefunction fake_flatlinefunction fake_waveformfunction waveform_ai_timerfunction waveform_ai_cmdtestfunction waveform_ai_cmdfunction waveform_ai_cancelfunction waveform_ai_insn_readfunction waveform_ao_timerfunction waveform_ao_inttrig_startfunction waveform_ao_cmdtestfunction waveform_ao_cmdfunction waveform_ao_cancelfunction waveform_ao_insn_writefunction waveform_ai_insn_configfunction waveform_ao_insn_configfunction waveform_dio_insn_bitsfunction waveform_dio_insn_configfunction waveform_common_attachfunction waveform_attachfunction waveform_auto_attachfunction waveform_detachfunction comedi_test_initfunction comedi_test_exitmodule init comedi_test_init
Annotated Snippet
module_init(comedi_test_init);
static void __exit comedi_test_exit(void)
{
if (ctdev)
comedi_auto_unconfig(ctdev);
if (class_is_registered(&ctcls)) {
device_destroy(&ctcls, MKDEV(0, 0));
class_unregister(&ctcls);
}
comedi_driver_unregister(&waveform_driver);
}
module_exit(comedi_test_exit);
MODULE_AUTHOR("Comedi https://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/comedi/comedidev.h`, `asm/div64.h`, `linux/timer.h`, `linux/ktime.h`, `linux/jiffies.h`, `linux/device.h`, `linux/kdev_t.h`.
- Detected declarations: `struct waveform_private`, `function fake_sawtooth`, `function fake_squarewave`, `function fake_flatline`, `function fake_waveform`, `function waveform_ai_timer`, `function waveform_ai_cmdtest`, `function waveform_ai_cmd`, `function waveform_ai_cancel`, `function waveform_ai_insn_read`.
- Atlas domain: Driver Families / drivers/comedi.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.