linux/drivers/comedi/drivers/cb_pcimdas.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * comedi/drivers/cb_pcimdas.c
 * Comedi driver for Computer Boards PCIM-DAS1602/16 and PCIe-DAS1602/16
 *
 * COMEDI - Linux Control and Measurement Device Interface
 * Copyright (C) 2000 David A. Schleef <[email protected]>
 */

/*
 * Driver: cb_pcimdas
 * Description: Measurement Computing PCI Migration series boards
 * Devices: [ComputerBoards] PCIM-DAS1602/16 (cb_pcimdas), PCIe-DAS1602/16
 * Author: Richard Bytheway
 * Updated: Mon, 13 Oct 2014 11:57:39 +0000
 * Status: experimental
 *
 * Written to support the PCIM-DAS1602/16 and PCIe-DAS1602/16.
 *
 * Configuration Options:
 *   none
 *
 * Manual configuration of PCI(e) cards is not supported; they are configured
 * automatically.
 *
 * Developed from cb_pcidas and skel by Richard Bytheway ([email protected]).
 * Only supports DIO, AO and simple AI in it's present form.
 * No interrupts, multi channel or FIFO AI,
 * although the card looks like it could support this.
 *
 * https://www.mccdaq.com/PDFs/Manuals/pcim-das1602-16.pdf
 * https://www.mccdaq.com/PDFs/Manuals/pcie-das1602-16.pdf
 */

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

#include "plx9052.h"

/*
 * PCI Bar 1 Register map
 * see plx9052.h for register and bit defines
 */

/*
 * PCI Bar 2 Register map (devpriv->daqio)
 */
#define PCIMDAS_AI_REG
#define PCIMDAS_AI_SOFTTRIG_REG
#define PCIMDAS_AO_REG(x)

/*
 * PCI Bar 3 Register map (devpriv->BADR3)
 */
#define PCIMDAS_MUX_REG
#define PCIMDAS_MUX(_lo, _hi)
#define PCIMDAS_DI_DO_REG
#define PCIMDAS_STATUS_REG
#define PCIMDAS_STATUS_EOC
#define PCIMDAS_STATUS_UB
#define PCIMDAS_STATUS_MUX
#define PCIMDAS_STATUS_CLK
#define PCIMDAS_STATUS_TO_CURR_MUX(x)
#define PCIMDAS_CONV_STATUS_REG
#define PCIMDAS_CONV_STATUS_EOC
#define PCIMDAS_CONV_STATUS_EOB
#define PCIMDAS_CONV_STATUS_EOA
#define PCIMDAS_CONV_STATUS_FNE
#define PCIMDAS_CONV_STATUS_FHF
#define PCIMDAS_CONV_STATUS_OVERRUN
#define PCIMDAS_IRQ_REG
#define PCIMDAS_IRQ_INTE
#define PCIMDAS_IRQ_INT
#define PCIMDAS_IRQ_OVERRUN
#define PCIMDAS_IRQ_EOA
#define PCIMDAS_IRQ_EOA_INT_SEL
#define PCIMDAS_IRQ_INTSEL(x)
#define PCIMDAS_IRQ_INTSEL_EOC
#define PCIMDAS_IRQ_INTSEL_FNE
#define PCIMDAS_IRQ_INTSEL_EOB
#define PCIMDAS_IRQ_INTSEL_FHF_EOA
#define PCIMDAS_PACER_REG
#define PCIMDAS_PACER_GATE_STATUS
#define PCIMDAS_PACER_GATE_POL
#define PCIMDAS_PACER_GATE_LATCH
#define PCIMDAS_PACER_GATE_EN
#define PCIMDAS_PACER_EXT_PACER_POL
#define PCIMDAS_PACER_SRC(x)
#define PCIMDAS_PACER_SRC_POLLED
#define PCIMDAS_PACER_SRC_EXT
#define PCIMDAS_PACER_SRC_INT
#define PCIMDAS_PACER_SRC_MASK
#define PCIMDAS_BURST_REG
#define PCIMDAS_BURST_BME
#define PCIMDAS_BURST_CONV_EN
#define PCIMDAS_GAIN_REG
#define PCIMDAS_8254_BASE
#define PCIMDAS_USER_CNTR_REG
#define PCIMDAS_USER_CNTR_CTR1_CLK_SEL
#define PCIMDAS_RESIDUE_MSB_REG
#define PCIMDAS_RESIDUE_LSB_REG

/*
 * PCI Bar 4 Register map (dev->iobase)
 */
#define PCIMDAS_8255_BASE

static const struct comedi_lrange cb_pcimdas_ai_bip_range =;

static const struct comedi_lrange cb_pcimdas_ai_uni_range =;

/*
 * The Analog Output range is not programmable. The DAC ranges are
 * jumper-settable on the board. The settings are not software-readable.
 */
static const struct comedi_lrange cb_pcimdas_ao_range =;

/*
 * this structure is for data unique to this hardware driver.  If
 * several hardware drivers keep similar information in this structure,
 * feel free to suggest moving the variable to the struct comedi_device
 * struct.
 */
struct cb_pcimdas_private {};

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

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

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

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

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

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

static unsigned int cb_pcimdas_pacer_clk(struct comedi_device *dev)
{}

static bool cb_pcimdas_is_ai_se(struct comedi_device *dev)
{}

static bool cb_pcimdas_is_ai_uni(struct comedi_device *dev)
{}

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

static struct comedi_driver cb_pcimdas_driver =;

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

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

static struct pci_driver cb_pcimdas_pci_driver =;
module_comedi_pci_driver();

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