drivers/comedi/drivers/ni_mio_cs.c
Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/ni_mio_cs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/comedi/drivers/ni_mio_cs.c- Extension
.c- Size
- 5295 bytes
- Lines
- 219
- 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.
- 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/delay.hlinux/comedi/comedi_pcmcia.hlinux/comedi/comedi_8255.hni_stc.hni_mio_common.c
Detected Declarations
function mio_pcmcia_config_loopfunction mio_cs_auto_attachfunction mio_cs_detachfunction cs_attach
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0+
/*
* Comedi driver for NI PCMCIA MIO E series cards
*
* COMEDI - Linux Control and Measurement Device Interface
* Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org>
*/
/*
* Driver: ni_mio_cs
* Description: National Instruments DAQCard E series
* Author: ds
* Status: works
* Devices: [National Instruments] DAQCard-AI-16XE-50 (ni_mio_cs),
* DAQCard-AI-16E-4, DAQCard-6062E, DAQCard-6024E, DAQCard-6036E
* Updated: Thu Oct 23 19:43:17 CDT 2003
*
* See the notes in the ni_atmio.o driver.
*/
/*
* The real guts of the driver is in ni_mio_common.c, which is
* included by all the E series drivers.
*
* References for specifications:
* 341080a.pdf DAQCard E Series Register Level Programmer Manual
*/
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/comedi/comedi_pcmcia.h>
#include <linux/comedi/comedi_8255.h>
#include "ni_stc.h"
/*
* AT specific setup
*/
static const struct ni_board_struct ni_boards[] = {
{
.name = "DAQCard-ai-16xe-50",
.device_id = 0x010d,
.n_adchan = 16,
.ai_maxdata = 0xffff,
.ai_fifo_depth = 1024,
.gainlkup = ai_gain_8,
.ai_speed = 5000,
.caldac = { dac8800, dac8043 },
}, {
.name = "DAQCard-ai-16e-4",
.device_id = 0x010c,
.n_adchan = 16,
.ai_maxdata = 0x0fff,
.ai_fifo_depth = 1024,
.gainlkup = ai_gain_16,
.ai_speed = 4000,
.caldac = { mb88341 }, /* verified */
}, {
.name = "DAQCard-6062E",
.device_id = 0x02c4,
.n_adchan = 16,
.ai_maxdata = 0x0fff,
.ai_fifo_depth = 8192,
.gainlkup = ai_gain_16,
.ai_speed = 2000,
.n_aochan = 2,
.ao_maxdata = 0x0fff,
.ao_fifo_depth = 2048,
.ao_range_table = &range_bipolar10,
.ao_speed = 1176,
.caldac = { ad8804_debug }, /* verified */
}, {
/* specs incorrect! */
.name = "DAQCard-6024E",
.device_id = 0x075e,
.n_adchan = 16,
.ai_maxdata = 0x0fff,
.ai_fifo_depth = 1024,
.gainlkup = ai_gain_4,
.ai_speed = 5000,
.n_aochan = 2,
.ao_maxdata = 0x0fff,
.ao_range_table = &range_bipolar10,
.ao_speed = 1000000,
.caldac = { ad8804_debug },
}, {
/* specs incorrect! */
.name = "DAQCard-6036E",
.device_id = 0x0245,
Annotation
- Immediate include surface: `linux/module.h`, `linux/delay.h`, `linux/comedi/comedi_pcmcia.h`, `linux/comedi/comedi_8255.h`, `ni_stc.h`, `ni_mio_common.c`.
- Detected declarations: `function mio_pcmcia_config_loop`, `function mio_cs_auto_attach`, `function mio_cs_detach`, `function cs_attach`.
- Atlas domain: Driver Families / drivers/comedi.
- Implementation status: source implementation candidate.
- 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.