linux/drivers/comedi/drivers/addi_apci_3120.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * addi_apci_3120.c
 * Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.
 *
 *	ADDI-DATA GmbH
 *	Dieselstrasse 3
 *	D-77833 Ottersweier
 *	Tel: +19(0)7223/9493-0
 *	Fax: +49(0)7223/9493-92
 *	http://www.addi-data.com
 *	[email protected]
 */

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

#include "amcc_s5933.h"

/*
 * PCI BAR 0 register map (devpriv->amcc)
 * see amcc_s5933.h for register and bit defines
 */
#define APCI3120_FIFO_ADVANCE_ON_BYTE_2

/*
 * PCI BAR 1 register map (dev->iobase)
 */
#define APCI3120_AI_FIFO_REG
#define APCI3120_CTRL_REG
#define APCI3120_CTRL_EXT_TRIG
#define APCI3120_CTRL_GATE(x)
#define APCI3120_CTRL_PR(x)
#define APCI3120_CTRL_PA(x)
#define APCI3120_AI_SOFTTRIG_REG
#define APCI3120_STATUS_REG
#define APCI3120_STATUS_EOC_INT
#define APCI3120_STATUS_AMCC_INT
#define APCI3120_STATUS_EOS_INT
#define APCI3120_STATUS_TIMER2_INT
#define APCI3120_STATUS_INT_MASK
#define APCI3120_STATUS_TO_DI_BITS(x)
#define APCI3120_STATUS_TO_VERSION(x)
#define APCI3120_STATUS_FIFO_FULL
#define APCI3120_STATUS_FIFO_EMPTY
#define APCI3120_STATUS_DA_READY
#define APCI3120_TIMER_REG
#define APCI3120_CHANLIST_REG
#define APCI3120_CHANLIST_INDEX(x)
#define APCI3120_CHANLIST_UNIPOLAR
#define APCI3120_CHANLIST_GAIN(x)
#define APCI3120_CHANLIST_MUX(x)
#define APCI3120_AO_REG(x)
#define APCI3120_AO_MUX(x)
#define APCI3120_AO_DATA(x)
#define APCI3120_TIMER_MODE_REG
#define APCI3120_TIMER_MODE(_t, _m)
#define APCI3120_TIMER_MODE0
#define APCI3120_TIMER_MODE2
#define APCI3120_TIMER_MODE4
#define APCI3120_TIMER_MODE5
#define APCI3120_TIMER_MODE_MASK(_t)
#define APCI3120_CTR0_REG
#define APCI3120_CTR0_DO_BITS(x)
#define APCI3120_CTR0_TIMER_SEL(x)
#define APCI3120_MODE_REG
#define APCI3120_MODE_TIMER2_CLK(x)
#define APCI3120_MODE_TIMER2_CLK_OSC
#define APCI3120_MODE_TIMER2_CLK_OUT1
#define APCI3120_MODE_TIMER2_CLK_EOC
#define APCI3120_MODE_TIMER2_CLK_EOS
#define APCI3120_MODE_TIMER2_CLK_MASK
#define APCI3120_MODE_TIMER2_AS(x)
#define APCI3120_MODE_TIMER2_AS_TIMER
#define APCI3120_MODE_TIMER2_AS_COUNTER
#define APCI3120_MODE_TIMER2_AS_WDOG
#define APCI3120_MODE_TIMER2_AS_MASK
#define APCI3120_MODE_SCAN_ENA
#define APCI3120_MODE_TIMER2_IRQ_ENA
#define APCI3120_MODE_EOS_IRQ_ENA
#define APCI3120_MODE_EOC_IRQ_ENA

/*
 * PCI BAR 2 register map (devpriv->addon)
 */
#define APCI3120_ADDON_ADDR_REG
#define APCI3120_ADDON_DATA_REG
#define APCI3120_ADDON_CTRL_REG
#define APCI3120_ADDON_CTRL_AMWEN_ENA
#define APCI3120_ADDON_CTRL_A2P_FIFO_ENA

/*
 * Board revisions
 */
#define APCI3120_REVA
#define APCI3120_REVB
#define APCI3120_REVA_OSC_BASE
#define APCI3120_REVB_OSC_BASE

static const struct comedi_lrange apci3120_ai_range =;

enum apci3120_boardid {};

struct apci3120_board {};

static const struct apci3120_board apci3120_boardtypes[] =;

struct apci3120_dmabuf {};

struct apci3120_private {};

static void apci3120_addon_write(struct comedi_device *dev,
				 unsigned int val, unsigned int reg)
{}

static void apci3120_init_dma(struct comedi_device *dev,
			      struct apci3120_dmabuf *dmabuf)
{}

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

/*
 * There are three timers on the board. They all use the same base
 * clock with a fixed prescaler for each timer. The base clock used
 * depends on the board version and type.
 *
 * APCI-3120 Rev A boards OSC = 14.29MHz base clock (~70ns)
 * APCI-3120 Rev B boards OSC = 20MHz base clock (50ns)
 * APCI-3001 boards OSC = 20MHz base clock (50ns)
 *
 * The prescalers for each timer are:
 * Timer 0 CLK = OSC/10
 * Timer 1 CLK = OSC/1000
 * Timer 2 CLK = OSC/1000
 */
static unsigned int apci3120_ns_to_timer(struct comedi_device *dev,
					 unsigned int timer,
					 unsigned int ns,
					 unsigned int flags)
{}

static void apci3120_clr_timer2_interrupt(struct comedi_device *dev)
{}

static void apci3120_timer_write(struct comedi_device *dev,
				 unsigned int timer, unsigned int val)
{}

static unsigned int apci3120_timer_read(struct comedi_device *dev,
					unsigned int timer)
{}

static void apci3120_timer_set_mode(struct comedi_device *dev,
				    unsigned int timer, unsigned int mode)
{}

static void apci3120_timer_enable(struct comedi_device *dev,
				  unsigned int timer, bool enable)
{}

static void apci3120_exttrig_enable(struct comedi_device *dev, bool enable)
{}

static void apci3120_set_chanlist(struct comedi_device *dev,
				  struct comedi_subdevice *s,
				  int n_chan, unsigned int *chanlist)
{}

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

static irqreturn_t apci3120_interrupt(int irq, void *d)
{}

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

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

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

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

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

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

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

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

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

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

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

static void apci3120_dma_alloc(struct comedi_device *dev)
{}

static void apci3120_dma_free(struct comedi_device *dev)
{}

static void apci3120_reset(struct comedi_device *dev)
{}

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

static void apci3120_detach(struct comedi_device *dev)
{}

static struct comedi_driver apci3120_driver =;

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

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

static struct pci_driver apci3120_pci_driver =;
module_comedi_pci_driver();

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