#include <linux/module.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/comedi/comedi_pci.h>
#include <linux/comedi/comedi_8254.h>
#include "plx9080.h"
#define LAS0_USER_IO …
#define LAS0_ADC …
#define FS_DAC1_NOT_EMPTY …
#define FS_DAC1_HEMPTY …
#define FS_DAC1_NOT_FULL …
#define FS_DAC2_NOT_EMPTY …
#define FS_DAC2_HEMPTY …
#define FS_DAC2_NOT_FULL …
#define FS_ADC_NOT_EMPTY …
#define FS_ADC_HEMPTY …
#define FS_ADC_NOT_FULL …
#define FS_DIN_NOT_EMPTY …
#define FS_DIN_HEMPTY …
#define FS_DIN_NOT_FULL …
#define LAS0_UPDATE_DAC(x) …
#define LAS0_DAC …
#define LAS0_PACER …
#define LAS0_TIMER …
#define LAS0_IT …
#define IRQM_ADC_FIFO_WRITE …
#define IRQM_CGT_RESET …
#define IRQM_CGT_PAUSE …
#define IRQM_ADC_ABOUT_CNT …
#define IRQM_ADC_DELAY_CNT …
#define IRQM_ADC_SAMPLE_CNT …
#define IRQM_DAC1_UCNT …
#define IRQM_DAC2_UCNT …
#define IRQM_UTC1 …
#define IRQM_UTC1_INV …
#define IRQM_UTC2 …
#define IRQM_DIGITAL_IT …
#define IRQM_EXTERNAL_IT …
#define IRQM_ETRIG_RISING …
#define IRQM_ETRIG_FALLING …
#define LAS0_CLEAR …
#define LAS0_OVERRUN …
#define LAS0_PCLK …
#define LAS0_BCLK …
#define LAS0_ADC_SCNT …
#define LAS0_DAC1_UCNT …
#define LAS0_DAC2_UCNT …
#define LAS0_DCNT …
#define LAS0_ACNT …
#define LAS0_DAC_CLK …
#define LAS0_8254_TIMER_BASE …
#define LAS0_DIO0 …
#define LAS0_DIO1 …
#define LAS0_DIO0_CTRL …
#define LAS0_DIO_STATUS …
#define LAS0_BOARD_RESET …
#define LAS0_DMA0_SRC …
#define LAS0_DMA1_SRC …
#define LAS0_ADC_CONVERSION …
#define LAS0_BURST_START …
#define LAS0_PACER_START …
#define LAS0_PACER_STOP …
#define LAS0_ACNT_STOP_ENABLE …
#define LAS0_PACER_REPEAT …
#define LAS0_DIN_START …
#define LAS0_DIN_FIFO_CLEAR …
#define LAS0_ADC_FIFO_CLEAR …
#define LAS0_CGT_WRITE …
#define LAS0_CGL_WRITE …
#define LAS0_CG_DATA …
#define LAS0_CGT_ENABLE …
#define LAS0_CG_ENABLE …
#define LAS0_CGT_PAUSE …
#define LAS0_CGT_RESET …
#define LAS0_CGT_CLEAR …
#define LAS0_DAC_CTRL(x) …
#define LAS0_DAC_SRC(x) …
#define LAS0_DAC_CYCLE(x) …
#define LAS0_DAC_RESET(x) …
#define LAS0_DAC_FIFO_CLEAR(x) …
#define LAS0_ADC_SCNT_SRC …
#define LAS0_PACER_SELECT …
#define LAS0_SBUS0_SRC …
#define LAS0_SBUS0_ENABLE …
#define LAS0_SBUS1_SRC …
#define LAS0_SBUS1_ENABLE …
#define LAS0_SBUS2_SRC …
#define LAS0_SBUS2_ENABLE …
#define LAS0_ETRG_POLARITY …
#define LAS0_EINT_POLARITY …
#define LAS0_8254_CLK_SEL(x) …
#define LAS0_8254_GATE_SEL(x) …
#define LAS0_UOUT0_SELECT …
#define LAS0_UOUT1_SELECT …
#define LAS0_DMA0_RESET …
#define LAS0_DMA1_RESET …
#define LAS1_ADC_FIFO …
#define LAS1_HDIO_FIFO …
#define LAS1_DAC_FIFO(x) …
#define DMA_CHAIN_COUNT …
#define TRANS_TARGET_PERIOD …
#define RTD_MAX_CHANLIST …
#define RTD_CLOCK_RATE …
#define RTD_CLOCK_BASE …
#define RTD_MAX_SPEED …
#define RTD_MAX_SPEED_1 …
#define RTD_MIN_SPEED …
#define RTD_MIN_SPEED_1 …
#define DMA_MODE_BITS …
#define DMA_TRANSFER_BITS …
static const struct comedi_lrange rtd_ai_7520_range = …;
static const struct comedi_lrange rtd_ai_4520_range = …;
static const struct comedi_lrange rtd_ao_range = …;
enum rtd_boardid { … };
struct rtd_boardinfo { … };
static const struct rtd_boardinfo rtd520_boards[] = …;
struct rtd_private { … };
#define SEND_EOS …
#define DMA0_ACTIVE …
#define DMA1_ACTIVE …
static int rtd_ns_to_timer_base(unsigned int *nanosec,
unsigned int flags, int base)
{ … }
static int rtd_ns_to_timer(unsigned int *ns, unsigned int flags)
{ … }
static unsigned short rtd_convert_chan_gain(struct comedi_device *dev,
unsigned int chanspec, int index)
{ … }
static void rtd_load_channelgain_list(struct comedi_device *dev,
unsigned int n_chan, unsigned int *list)
{ … }
static int rtd520_probe_fifo_depth(struct comedi_device *dev)
{ … }
static int rtd_ai_eoc(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned long context)
{ … }
static int rtd_ai_rinsn(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data)
{ … }
static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,
int count)
{ … }
static irqreturn_t rtd_interrupt(int irq, void *d)
{ … }
static int rtd_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{ … }
static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{ … }
static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{ … }
static int rtd_ao_eoc(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned long context)
{ … }
static int rtd_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int rtd_dio_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int rtd_dio_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int rtd_counter_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static void rtd_reset(struct comedi_device *dev)
{ … }
static void rtd_init_board(struct comedi_device *dev)
{ … }
static void rtd_pci_latency_quirk(struct comedi_device *dev,
struct pci_dev *pcidev)
{ … }
static int rtd_auto_attach(struct comedi_device *dev,
unsigned long context)
{ … }
static void rtd_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver rtd520_driver = …;
static int rtd520_pci_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{ … }
static const struct pci_device_id rtd520_pci_table[] = …;
MODULE_DEVICE_TABLE(pci, rtd520_pci_table);
static struct pci_driver rtd520_pci_driver = …;
module_comedi_pci_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;