linux/drivers/comedi/drivers/adv_pci_dio.c

// SPDX-License-Identifier: GPL-2.0
/*
 * comedi/drivers/adv_pci_dio.c
 *
 * Author: Michal Dobes <[email protected]>
 *
 *  Hardware driver for Advantech PCI DIO cards.
 */

/*
 * Driver: adv_pci_dio
 * Description: Advantech Digital I/O Cards
 * Devices: [Advantech] PCI-1730 (adv_pci_dio), PCI-1733,
 *   PCI-1734, PCI-1735U, PCI-1736UP, PCI-1739U, PCI-1750,
 *   PCI-1751, PCI-1752, PCI-1753, PCI-1753+PCI-1753E,
 *   PCI-1754, PCI-1756, PCI-1761, PCI-1762
 * Author: Michal Dobes <[email protected]>
 * Updated: Fri, 25 Aug 2017 07:23:06 +0300
 * Status: untested
 *
 * Configuration Options: not applicable, uses PCI auto config
 */

#include <linux/module.h>
#include <linux/delay.h>
#include <linux/comedi/comedi_pci.h>
#include <linux/comedi/comedi_8255.h>
#include <linux/comedi/comedi_8254.h>

/*
 * Register offset definitions
 */

/* PCI-1730, PCI-1733, PCI-1736 interrupt control registers */
#define PCI173X_INT_EN_REG
#define PCI173X_INT_RF_REG
#define PCI173X_INT_FLAG_REG
#define PCI173X_INT_CLR_REG

#define PCI173X_INT_IDI0
#define PCI173X_INT_IDI1
#define PCI173X_INT_DI0
#define PCI173X_INT_DI1

/* PCI-1739U, PCI-1750, PCI1751 interrupt control registers */
#define PCI1750_INT_REG

/* PCI-1753, PCI-1753E interrupt control registers */
#define PCI1753_INT_REG(x)
#define PCI1753E_INT_REG(x)

/* PCI-1754, PCI-1756 interrupt control registers */
#define PCI1754_INT_REG(x)

/* PCI-1752, PCI-1756 special registers */
#define PCI1752_CFC_REG

/* PCI-1761 interrupt control registers */
#define PCI1761_INT_EN_REG
#define PCI1761_INT_RF_REG
#define PCI1761_INT_CLR_REG

/* PCI-1762 interrupt control registers */
#define PCI1762_INT_REG

/* maximum number of subdevice descriptions in the boardinfo */
#define PCI_DIO_MAX_DI_SUBDEVS
#define PCI_DIO_MAX_DO_SUBDEVS
#define PCI_DIO_MAX_DIO_SUBDEVG
#define PCI_DIO_MAX_IRQ_SUBDEVS

enum pci_dio_boardid {};

struct diosubd_data {};

struct dio_irq_subd_data {};

struct dio_boardtype {};

static const struct dio_boardtype boardtypes[] =;

struct pci_dio_dev_private_data {};

struct pci_dio_sd_private_data {};

static void process_irq(struct comedi_device *dev, unsigned int subdev,
			unsigned char irqflags)
{}

static irqreturn_t pci_dio_interrupt(int irq, void *p_device)
{}

static int pci_dio_asy_cmdtest(struct comedi_device *dev,
			       struct comedi_subdevice *s,
			       struct comedi_cmd *cmd)
{}

static int pci_dio_asy_cmd(struct comedi_device *dev,
			   struct comedi_subdevice *s)
{}

static int pci_dio_asy_cancel(struct comedi_device *dev,
			      struct comedi_subdevice *s)
{}

/* same as _insn_bits_di_ because the IRQ-pins are the DI-ports  */
static int pci_dio_insn_bits_dirq_b(struct comedi_device *dev,
				    struct comedi_subdevice *s,
				    struct comedi_insn *insn,
				    unsigned int *data)
{}

static int pci_dio_insn_bits_di_b(struct comedi_device *dev,
				  struct comedi_subdevice *s,
				  struct comedi_insn *insn,
				  unsigned int *data)
{}

static int pci_dio_insn_bits_di_w(struct comedi_device *dev,
				  struct comedi_subdevice *s,
				  struct comedi_insn *insn,
				  unsigned int *data)
{}

static int pci_dio_insn_bits_do_b(struct comedi_device *dev,
				  struct comedi_subdevice *s,
				  struct comedi_insn *insn,
				  unsigned int *data)
{}

static int pci_dio_insn_bits_do_w(struct comedi_device *dev,
				  struct comedi_subdevice *s,
				  struct comedi_insn *insn,
				  unsigned int *data)
{}

static int pci_dio_reset(struct comedi_device *dev, unsigned long cardtype)
{}

static int pci_dio_auto_attach(struct comedi_device *dev,
			       unsigned long context)
{}

static void pci_dio_detach(struct comedi_device *dev)
{}

static struct comedi_driver adv_pci_dio_driver =;

static unsigned long pci_dio_override_cardtype(struct pci_dev *pcidev,
					       unsigned long cardtype)
{}

static int adv_pci_dio_pci_probe(struct pci_dev *dev,
				 const struct pci_device_id *id)
{}

static const struct pci_device_id adv_pci_dio_pci_table[] =;
MODULE_DEVICE_TABLE(pci, adv_pci_dio_pci_table);

static struct pci_driver adv_pci_dio_pci_driver =;
module_comedi_pci_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();