linux/drivers/comedi/drivers/adv_pci1723.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * adv_pci1723.c
 * Comedi driver for the Advantech PCI-1723 card.
 *
 * COMEDI - Linux Control and Measurement Device Interface
 * Copyright (C) 2000 David A. Schleef <[email protected]>
 */

/*
 * Driver: adv_pci1723
 * Description: Advantech PCI-1723
 * Author: yonggang <[email protected]>, Ian Abbott <[email protected]>
 * Devices: [Advantech] PCI-1723 (adv_pci1723)
 * Updated: Mon, 14 Apr 2008 15:12:56 +0100
 * Status: works
 *
 * Configuration Options: not applicable, uses comedi PCI auto config
 *
 * Subdevice 0 is 8-channel AO, 16-bit, range +/- 10 V.
 *
 * Subdevice 1 is 16-channel DIO.  The channels are configurable as
 * input or output in 2 groups (0 to 7, 8 to 15). Configuring any
 * channel implicitly configures all channels in the same group.
 *
 * TODO:
 * 1. Add the two milliamp ranges to the AO subdevice (0 to 20 mA,
 *    4 to 20 mA).
 * 2. Read the initial ranges and values of the AO subdevice at
 *    start-up instead of reinitializing them.
 * 3. Implement calibration.
 */

#include <linux/module.h>
#include <linux/comedi/comedi_pci.h>

/*
 * PCI Bar 2 I/O Register map (dev->iobase)
 */
#define PCI1723_AO_REG(x)
#define PCI1723_BOARD_ID_REG
#define PCI1723_BOARD_ID_MASK
#define PCI1723_SYNC_CTRL_REG
#define PCI1723_SYNC_CTRL(x)
#define PCI1723_SYNC_CTRL_ASYNC
#define PCI1723_SYNC_CTRL_SYNC
#define PCI1723_CTRL_REG
#define PCI1723_CTRL_BUSY
#define PCI1723_CTRL_INIT
#define PCI1723_CTRL_SELF
#define PCI1723_CTRL_IDX(x)
#define PCI1723_CTRL_RANGE(x)
#define PCI1723_CTRL_SEL(x)
#define PCI1723_CTRL_GAIN
#define PCI1723_CTRL_OFFSET
#define PCI1723_CTRL_CHAN(x)
#define PCI1723_CALIB_CTRL_REG
#define PCI1723_CALIB_CTRL_CS
#define PCI1723_CALIB_CTRL_DAT
#define PCI1723_CALIB_CTRL_CLK
#define PCI1723_CALIB_STROBE_REG
#define PCI1723_DIO_CTRL_REG
#define PCI1723_DIO_CTRL_HDIO
#define PCI1723_DIO_CTRL_LDIO
#define PCI1723_DIO_DATA_REG
#define PCI1723_CALIB_DATA_REG
#define PCI1723_SYNC_STROBE_REG
#define PCI1723_RESET_AO_STROBE_REG
#define PCI1723_RESET_CALIB_STROBE_REG
#define PCI1723_RANGE_STROBE_REG
#define PCI1723_VREF_REG
#define PCI1723_VREF(x)
#define PCI1723_VREF_NEG10V
#define PCI1723_VREF_0V
#define PCI1723_VREF_POS10V

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

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

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

static int pci1723_auto_attach(struct comedi_device *dev,
			       unsigned long context_unused)
{}

static struct comedi_driver adv_pci1723_driver =;

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

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

static struct pci_driver adv_pci1723_pci_driver =;
module_comedi_pci_driver();

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