drivers/comedi/drivers/pcl812.c
Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/pcl812.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/comedi/drivers/pcl812.c- Extension
.c- Size
- 33042 bytes
- Lines
- 1356
- 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.
- 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/gfp.hlinux/delay.hlinux/io.hlinux/comedi/comedidev.hlinux/comedi/comedi_8254.hlinux/comedi/comedi_isadma.h
Detected Declarations
struct pcl812_boardstruct pcl812_privateenum pcl812_boardtypefunction pcl812_ai_setup_dmafunction pcl812_ai_set_chan_rangefunction pcl812_ai_clear_eocfunction pcl812_ai_soft_trigfunction pcl812_ai_get_samplefunction pcl812_ai_eocfunction pcl812_ai_cmdtestfunction pcl812_ai_cmdfunction pcl812_ai_next_chanfunction pcl812_handle_eocfunction transfer_from_dma_buffunction pcl812_handle_dmafunction pcl812_interruptfunction pcl812_ai_pollfunction pcl812_ai_cancelfunction pcl812_ai_insn_readfunction pcl812_ao_insn_writefunction pcl812_di_insn_bitsfunction pcl812_do_insn_bitsfunction pcl812_resetfunction pcl812_set_ai_range_tablefunction pcl812_alloc_dmafunction pcl812_free_dmafunction pcl812_attachfunction pcl812_detach
Annotated Snippet
struct pcl812_board {
const char *name;
enum pcl812_boardtype board_type;
unsigned short min_io_start;
int n_aichan;
int n_aochan;
unsigned int ai_ns_min;
const struct comedi_lrange *rangelist_ai;
unsigned int irq_bits;
unsigned int has_dma:1;
unsigned int has_16bit_ai:1;
unsigned int has_mpc508_mux:1;
unsigned int has_dio:1;
};
static const struct pcl812_board boardtypes[] = {
{
.name = "pcl812",
.board_type = BOARD_PCL812,
.min_io_start = 0,
.n_aichan = 16,
.n_aochan = 2,
.ai_ns_min = 33000,
.rangelist_ai = &range_bipolar10,
.irq_bits = 0xdcfc,
.has_dma = 1,
.has_dio = 1,
}, {
.name = "pcl812pg",
.min_io_start = 0,
.board_type = BOARD_PCL812PG,
.n_aichan = 16,
.n_aochan = 2,
.ai_ns_min = 33000,
.rangelist_ai = &range_pcl812pg_ai,
.irq_bits = 0xdcfc,
.has_dma = 1,
.has_dio = 1,
}, {
.name = "acl8112pg",
.board_type = BOARD_PCL812PG,
.min_io_start = 0x200,
.n_aichan = 16,
.n_aochan = 2,
.ai_ns_min = 10000,
.rangelist_ai = &range_pcl812pg_ai,
.irq_bits = 0xdcfc,
.has_dma = 1,
.has_dio = 1,
}, {
.name = "acl8112dg",
.board_type = BOARD_ACL8112,
.min_io_start = 0x200,
.n_aichan = 16, /* 8 differential */
.n_aochan = 2,
.ai_ns_min = 10000,
.rangelist_ai = &range_acl8112dg_ai,
.irq_bits = 0xdcfc,
.has_dma = 1,
.has_mpc508_mux = 1,
.has_dio = 1,
}, {
.name = "acl8112hg",
.board_type = BOARD_ACL8112,
.min_io_start = 0x200,
.n_aichan = 16, /* 8 differential */
.n_aochan = 2,
.ai_ns_min = 10000,
.rangelist_ai = &range_acl8112hg_ai,
.irq_bits = 0xdcfc,
.has_dma = 1,
.has_mpc508_mux = 1,
.has_dio = 1,
}, {
.name = "a821pgl",
.board_type = BOARD_A821,
.min_io_start = 0,
.n_aichan = 16, /* 8 differential */
.n_aochan = 1,
.ai_ns_min = 10000,
.rangelist_ai = &range_pcl813b_ai,
.irq_bits = 0x000c,
.has_dio = 1,
}, {
.name = "a821pglnda",
.board_type = BOARD_A821,
.min_io_start = 0,
.n_aichan = 16, /* 8 differential */
.ai_ns_min = 10000,
.rangelist_ai = &range_pcl813b_ai,
Annotation
- Immediate include surface: `linux/module.h`, `linux/interrupt.h`, `linux/gfp.h`, `linux/delay.h`, `linux/io.h`, `linux/comedi/comedidev.h`, `linux/comedi/comedi_8254.h`, `linux/comedi/comedi_isadma.h`.
- Detected declarations: `struct pcl812_board`, `struct pcl812_private`, `enum pcl812_boardtype`, `function pcl812_ai_setup_dma`, `function pcl812_ai_set_chan_range`, `function pcl812_ai_clear_eoc`, `function pcl812_ai_soft_trig`, `function pcl812_ai_get_sample`, `function pcl812_ai_eoc`, `function pcl812_ai_cmdtest`.
- 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.
- 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.