// SPDX-License-Identifier: GPL-2.0+ /* * Comedi driver for NI AT-MIO E series cards * * COMEDI - Linux Control and Measurement Device Interface * Copyright (C) 1997-2001 David A. Schleef <[email protected]> */ /* * Driver: ni_atmio * Description: National Instruments AT-MIO-E series * Author: ds * Devices: [National Instruments] AT-MIO-16E-1 (ni_atmio), * AT-MIO-16E-2, AT-MIO-16E-10, AT-MIO-16DE-10, AT-MIO-64E-3, * AT-MIO-16XE-50, AT-MIO-16XE-10, AT-AI-16XE-10 * Status: works * Updated: Thu May 1 20:03:02 CDT 2003 * * The driver has 2.6 kernel isapnp support, and will automatically probe for * a supported board if the I/O base is left unspecified with comedi_config. * However, many of the isapnp id numbers are unknown. If your board is not * recognized, please send the output of 'cat /proc/isapnp' (you may need to * modprobe the isa-pnp module for /proc/isapnp to exist) so the id numbers * for your board can be added to the driver. * * Otherwise, you can use the isapnptools package to configure your board. * Use isapnp to configure the I/O base and IRQ for the board, and then pass * the same values as parameters in comedi_config. A sample isapnp.conf file * is included in the etc/ directory of Comedilib. * * Comedilib includes a utility to autocalibrate these boards. The boards * seem to boot into a state where the all calibration DACs are at one * extreme of their range, thus the default calibration is terrible. * Calibration at boot is strongly encouraged. * * To use the extended digital I/O on some of the boards, enable the * 8255 driver when configuring the Comedi source tree. * * External triggering is supported for some events. The channel index * (scan_begin_arg, etc.) maps to PFI0 - PFI9. * * Some of the more esoteric triggering possibilities of these boards are * not supported. */ /* * The real guts of the driver is in ni_mio_common.c, which is included * both here and in ni_pcimio.c * * Interrupt support added by Truxton Fulton <[email protected]> * * References for specifications: * 340747b.pdf Register Level Programmer Manual (obsolete) * 340747c.pdf Register Level Programmer Manual (new) * DAQ-STC reference manual * * Other possibly relevant info: * 320517c.pdf User manual (obsolete) * 320517f.pdf User manual (new) * 320889a.pdf delete * 320906c.pdf maximum signal ratings * 321066a.pdf about 16x * 321791a.pdf discontinuation of at-mio-16e-10 rev. c * 321808a.pdf about at-mio-16e-10 rev P * 321837a.pdf discontinuation of at-mio-16de-10 rev d * 321838a.pdf about at-mio-16de-10 rev N * * ISSUES: * - need to deal with external reference for DAC, and other DAC * properties in board properties * - deal with at-mio-16de-10 revision D to N changes, etc. */ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/comedi/comedidev.h> #include <linux/isapnp.h> #include <linux/comedi/comedi_8255.h> #include "ni_stc.h" static const struct comedi_lrange range_ni_E_ao_ext = …; /* AT specific setup */ static const struct ni_board_struct ni_boards[] = …; static const int ni_irqpin[] = …; #include "ni_mio_common.c" static const struct pnp_device_id device_ids[] = …; MODULE_DEVICE_TABLE(pnp, device_ids); static int ni_isapnp_find_board(struct pnp_dev **dev) { … } static const struct ni_board_struct *ni_atmio_probe(struct comedi_device *dev) { … } static int ni_atmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) { … } static void ni_atmio_detach(struct comedi_device *dev) { … } static struct comedi_driver ni_atmio_driver = …; module_comedi_driver(…); MODULE_AUTHOR(…) …; MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …;