// SPDX-License-Identifier: GPL-2.0+ /* * comedi/drivers/amplc_pci236.c * Driver for Amplicon PCI236 DIO boards. * * Copyright (C) 2002-2014 MEV Ltd. <https://www.mev.co.uk/> * * COMEDI - Linux Control and Measurement Device Interface * Copyright (C) 2000 David A. Schleef <[email protected]> */ /* * Driver: amplc_pci236 * Description: Amplicon PCI236 * Author: Ian Abbott <[email protected]> * Devices: [Amplicon] PCI236 (amplc_pci236) * Updated: Fri, 25 Jul 2014 15:32:40 +0000 * Status: works * * Configuration options: * none * * Manual configuration of PCI board (PCI236) is not supported; it is * configured automatically. * * The PCI236 board has a single 8255 appearing as subdevice 0. * * Subdevice 1 pretends to be a digital input device, but it always * returns 0 when read. However, if you run a command with * scan_begin_src=TRIG_EXT, a rising edge on port C bit 3 acts as an * external trigger, which can be used to wake up tasks. This is like * the comedi_parport device. If no interrupt is connected, then * subdevice 1 is unused. */ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/comedi/comedi_pci.h> #include "amplc_pc236.h" #include "plx9052.h" /* Disable, and clear, interrupts */ #define PCI236_INTR_DISABLE … /* Enable, and clear, interrupts */ #define PCI236_INTR_ENABLE … static void pci236_intr_update_cb(struct comedi_device *dev, bool enable) { … } static bool pci236_intr_chk_clr_cb(struct comedi_device *dev) { … } static const struct pc236_board pc236_pci_board = …; static int pci236_auto_attach(struct comedi_device *dev, unsigned long context_unused) { … } static struct comedi_driver amplc_pci236_driver = …; static const struct pci_device_id pci236_pci_table[] = …; MODULE_DEVICE_TABLE(pci, pci236_pci_table); static int amplc_pci236_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { … } static struct pci_driver amplc_pci236_pci_driver = …; module_comedi_pci_driver(…); MODULE_AUTHOR(…) …; MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …;