// SPDX-License-Identifier: GPL-2.0+ /* * COMEDI driver for generic PCI based 8255 digital i/o boards * Copyright (C) 2012 H Hartley Sweeten <[email protected]> * * Based on the tested adl_pci7296 driver written by: * Jon Grierson <[email protected]> * and the experimental cb_pcidio driver written by: * Yoshiya Matsuzaka * * COMEDI - Linux Control and Measurement Device Interface * Copyright (C) 2000 David A. Schleef <[email protected]> */ /* * Driver: 8255_pci * Description: Generic PCI based 8255 Digital I/O boards * Devices: [ADLink] PCI-7224 (adl_pci-7224), PCI-7248 (adl_pci-7248), * PCI-7296 (adl_pci-7296), * [Measurement Computing] PCI-DIO24 (cb_pci-dio24), * PCI-DIO24H (cb_pci-dio24h), PCI-DIO48H (cb_pci-dio48h), * PCI-DIO96H (cb_pci-dio96h), * [National Instruments] PCI-DIO-96 (ni_pci-dio-96), * PCI-DIO-96B (ni_pci-dio-96b), PXI-6508 (ni_pxi-6508), * PCI-6503 (ni_pci-6503), PCI-6503B (ni_pci-6503b), * PCI-6503X (ni_pci-6503x), PXI-6503 (ni_pxi-6503) * Author: H Hartley Sweeten <[email protected]> * Updated: Wed, 12 Sep 2012 11:52:01 -0700 * Status: untested * * These boards have one or more 8255 digital I/O chips, each of which * is supported as a separate 24-channel DIO subdevice. * * Boards with 24 DIO channels (1 DIO subdevice): * * PCI-7224, PCI-DIO24, PCI-DIO24H, PCI-6503, PCI-6503B, PCI-6503X, * PXI-6503 * * Boards with 48 DIO channels (2 DIO subdevices): * * PCI-7248, PCI-DIO48H * * Boards with 96 DIO channels (4 DIO subdevices): * * PCI-7296, PCI-DIO96H, PCI-DIO-96, PCI-DIO-96B, PXI-6508 * * Some of these boards also have an 8254 programmable timer/counter * chip. This chip is not currently supported by this driver. * * Interrupt support for these boards is also not currently supported. * * Configuration Options: not applicable, uses PCI auto config. */ #include <linux/module.h> #include <linux/comedi/comedi_pci.h> #include <linux/comedi/comedi_8255.h> enum pci_8255_boardid { … }; struct pci_8255_boardinfo { … }; static const struct pci_8255_boardinfo pci_8255_boards[] = …; /* ripped from mite.h and mite_setup2() to avoid mite dependency */ #define MITE_IODWBSR … #define WENAB … static int pci_8255_mite_init(struct pci_dev *pcidev) { … } static int pci_8255_auto_attach(struct comedi_device *dev, unsigned long context) { … } static struct comedi_driver pci_8255_driver = …; static int pci_8255_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { … } static const struct pci_device_id pci_8255_pci_table[] = …; MODULE_DEVICE_TABLE(pci, pci_8255_pci_table); static struct pci_driver pci_8255_pci_driver = …; module_comedi_pci_driver(…); MODULE_DESCRIPTION(…) …; MODULE_AUTHOR(…) …; MODULE_LICENSE(…) …;