linux/drivers/comedi/drivers/ii_pci20kc.c

// SPDX-License-Identifier: GPL-2.0
/*
 * ii_pci20kc.c
 * Driver for Intelligent Instruments PCI-20001C carrier board and modules.
 *
 * Copyright (C) 2000 Markus Kempf <[email protected]>
 * with suggestions from David Schleef		16.06.2000
 */

/*
 * Driver: ii_pci20kc
 * Description: Intelligent Instruments PCI-20001C carrier board
 * Devices: [Intelligent Instrumentation] PCI-20001C (ii_pci20kc)
 * Author: Markus Kempf <[email protected]>
 * Status: works
 *
 * Supports the PCI-20001C-1a and PCI-20001C-2a carrier boards. The
 * -2a version has 32 on-board DIO channels. Three add-on modules
 * can be added to the carrier board for additional functionality.
 *
 * Supported add-on modules:
 *	PCI-20006M-1   1 channel, 16-bit analog output module
 *	PCI-20006M-2   2 channel, 16-bit analog output module
 *	PCI-20341M-1A  4 channel, 16-bit analog input module
 *
 * Options:
 *   0   Board base address
 *   1   IRQ (not-used)
 */

#include <linux/module.h>
#include <linux/io.h>
#include <linux/comedi/comedidev.h>

/*
 * Register I/O map
 */
#define II20K_SIZE
#define II20K_MOD_OFFSET
#define II20K_ID_REG
#define II20K_ID_MOD1_EMPTY
#define II20K_ID_MOD2_EMPTY
#define II20K_ID_MOD3_EMPTY
#define II20K_ID_MASK
#define II20K_ID_PCI20001C_1A
#define II20K_ID_PCI20001C_2A
#define II20K_MOD_STATUS_REG
#define II20K_MOD_STATUS_IRQ_MOD1
#define II20K_MOD_STATUS_IRQ_MOD2
#define II20K_MOD_STATUS_IRQ_MOD3
#define II20K_DIO0_REG
#define II20K_DIO1_REG
#define II20K_DIR_ENA_REG
#define II20K_DIR_DIO3_OUT
#define II20K_DIR_DIO2_OUT
#define II20K_BUF_DISAB_DIO3
#define II20K_BUF_DISAB_DIO2
#define II20K_DIR_DIO1_OUT
#define II20K_DIR_DIO0_OUT
#define II20K_BUF_DISAB_DIO1
#define II20K_BUF_DISAB_DIO0
#define II20K_CTRL01_REG
#define II20K_CTRL01_SET
#define II20K_CTRL01_DIO0_IN
#define II20K_CTRL01_DIO1_IN
#define II20K_DIO2_REG
#define II20K_DIO3_REG
#define II20K_CTRL23_REG
#define II20K_CTRL23_SET
#define II20K_CTRL23_DIO2_IN
#define II20K_CTRL23_DIO3_IN

#define II20K_ID_PCI20006M_1
#define II20K_ID_PCI20006M_2
#define II20K_AO_STRB_REG(x)
#define II20K_AO_LSB_REG(x)
#define II20K_AO_MSB_REG(x)
#define II20K_AO_STRB_BOTH_REG

#define II20K_ID_PCI20341M_1
#define II20K_AI_STATUS_CMD_REG
#define II20K_AI_STATUS_CMD_BUSY
#define II20K_AI_STATUS_CMD_HW_ENA
#define II20K_AI_STATUS_CMD_EXT_START
#define II20K_AI_LSB_REG
#define II20K_AI_MSB_REG
#define II20K_AI_PACER_RESET_REG
#define II20K_AI_16BIT_DATA_REG
#define II20K_AI_CONF_REG
#define II20K_AI_CONF_ENA
#define II20K_AI_OPT_REG
#define II20K_AI_OPT_TRIG_ENA
#define II20K_AI_OPT_TRIG_INV
#define II20K_AI_OPT_TIMEBASE(x)
#define II20K_AI_OPT_BURST_MODE
#define II20K_AI_STATUS_REG
#define II20K_AI_STATUS_INT
#define II20K_AI_STATUS_TRIG
#define II20K_AI_STATUS_TRIG_ENA
#define II20K_AI_STATUS_PACER_ERR
#define II20K_AI_STATUS_DATA_ERR
#define II20K_AI_STATUS_SET_TIME_ERR
#define II20K_AI_LAST_CHAN_ADDR_REG
#define II20K_AI_CUR_ADDR_REG
#define II20K_AI_SET_TIME_REG
#define II20K_AI_DELAY_LSB_REG
#define II20K_AI_DELAY_MSB_REG
#define II20K_AI_CHAN_ADV_REG
#define II20K_AI_CHAN_RESET_REG
#define II20K_AI_START_TRIG_REG
#define II20K_AI_COUNT_RESET_REG
#define II20K_AI_CHANLIST_REG
#define II20K_AI_CHANLIST_ONBOARD_ONLY
#define II20K_AI_CHANLIST_GAIN(x)
#define II20K_AI_CHANLIST_MUX_ENA
#define II20K_AI_CHANLIST_CHAN(x)
#define II20K_AI_CHANLIST_LEN

/* the AO range is set by jumpers on the 20006M module */
static const struct comedi_lrange ii20k_ao_ranges =;

static const struct comedi_lrange ii20k_ai_ranges =;

static void __iomem *ii20k_module_iobase(struct comedi_device *dev,
					 struct comedi_subdevice *s)
{}

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

static int ii20k_ai_eoc(struct comedi_device *dev,
			struct comedi_subdevice *s,
			struct comedi_insn *insn,
			unsigned long context)
{}

static void ii20k_ai_setup(struct comedi_device *dev,
			   struct comedi_subdevice *s,
			   unsigned int chanspec)
{}

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

static void ii20k_dio_config(struct comedi_device *dev,
			     struct comedi_subdevice *s)
{}

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

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

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

static int ii20k_attach(struct comedi_device *dev,
			struct comedi_devconfig *it)
{}

static void ii20k_detach(struct comedi_device *dev)
{}

static struct comedi_driver ii20k_driver =;
module_comedi_driver();

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