drivers/comedi/drivers/das16.c
Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/das16.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/comedi/drivers/das16.c- Extension
.c- Size
- 30904 bytes
- Lines
- 1221
- Domain
- Driver Families
- Bucket
- drivers/comedi
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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/slab.hlinux/interrupt.hlinux/comedi/comedidev.hlinux/comedi/comedi_8255.hlinux/comedi/comedi_8254.hlinux/comedi/comedi_isadma.h
Detected Declarations
struct das16_boardstruct das16_private_structfunction timer_periodfunction das16_ai_setup_dmafunction das16_interruptfunction das16_timer_interruptfunction das16_ai_set_mux_rangefunction das16_ai_check_chanlistfunction das16_cmd_testfunction das16_set_pacerfunction das16_cmd_execfunction das16_cancelfunction das16_ai_mungefunction das16_ai_eocfunction das16_ai_insn_readfunction das16_ao_insn_writefunction das16_di_insn_bitsfunction das16_do_insn_bitsfunction das16_probefunction das16_resetfunction das16_alloc_dmafunction das16_free_dmafunction das16_attachfunction das16_detach
Annotated Snippet
struct das16_board {
const char *name;
unsigned int ai_maxdata;
unsigned int ai_speed; /* max conversion speed in nanosec */
unsigned int ai_pg;
unsigned int has_ao:1;
unsigned int has_8255:1;
unsigned int i8255_offset;
unsigned int size;
unsigned int id;
};
static const struct das16_board das16_boards[] = {
{
.name = "das-16",
.ai_maxdata = 0x0fff,
.ai_speed = 15000,
.ai_pg = das16_pg_none,
.has_ao = 1,
.has_8255 = 1,
.i8255_offset = 0x10,
.size = 0x14,
.id = 0x00,
}, {
.name = "das-16g",
.ai_maxdata = 0x0fff,
.ai_speed = 15000,
.ai_pg = das16_pg_none,
.has_ao = 1,
.has_8255 = 1,
.i8255_offset = 0x10,
.size = 0x14,
.id = 0x00,
}, {
.name = "das-16f",
.ai_maxdata = 0x0fff,
.ai_speed = 8500,
.ai_pg = das16_pg_none,
.has_ao = 1,
.has_8255 = 1,
.i8255_offset = 0x10,
.size = 0x14,
.id = 0x00,
}, {
.name = "cio-das16",
.ai_maxdata = 0x0fff,
.ai_speed = 20000,
.ai_pg = das16_pg_none,
.has_ao = 1,
.has_8255 = 1,
.i8255_offset = 0x10,
.size = 0x14,
.id = 0x80,
}, {
.name = "cio-das16/f",
.ai_maxdata = 0x0fff,
.ai_speed = 10000,
.ai_pg = das16_pg_none,
.has_ao = 1,
.has_8255 = 1,
.i8255_offset = 0x10,
.size = 0x14,
.id = 0x80,
}, {
.name = "cio-das16/jr",
.ai_maxdata = 0x0fff,
.ai_speed = 7692,
.ai_pg = das16_pg_16jr,
.size = 0x10,
.id = 0x00,
}, {
.name = "pc104-das16jr",
.ai_maxdata = 0x0fff,
.ai_speed = 3300,
.ai_pg = das16_pg_16jr,
.size = 0x10,
.id = 0x00,
}, {
.name = "cio-das16jr/16",
.ai_maxdata = 0xffff,
.ai_speed = 10000,
.ai_pg = das16_pg_16jr_16,
.size = 0x10,
.id = 0x00,
}, {
.name = "pc104-das16jr/16",
.ai_maxdata = 0xffff,
.ai_speed = 10000,
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `linux/interrupt.h`, `linux/comedi/comedidev.h`, `linux/comedi/comedi_8255.h`, `linux/comedi/comedi_8254.h`, `linux/comedi/comedi_isadma.h`.
- Detected declarations: `struct das16_board`, `struct das16_private_struct`, `function timer_period`, `function das16_ai_setup_dma`, `function das16_interrupt`, `function das16_timer_interrupt`, `function das16_ai_set_mux_range`, `function das16_ai_check_chanlist`, `function das16_cmd_test`, `function das16_set_pacer`.
- Atlas domain: Driver Families / drivers/comedi.
- Implementation status: source 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.