#include <linux/module.h>
#include <linux/delay.h>
#include <linux/gfp.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/comedi/comedidev.h>
#include <linux/comedi/comedi_isadma.h>
#define DT2821_ADCSR_REG …
#define DT2821_ADCSR_ADERR …
#define DT2821_ADCSR_ADCLK …
#define DT2821_ADCSR_MUXBUSY …
#define DT2821_ADCSR_ADDONE …
#define DT2821_ADCSR_IADDONE …
#define DT2821_ADCSR_GS(x) …
#define DT2821_ADCSR_CHAN(x) …
#define DT2821_CHANCSR_REG …
#define DT2821_CHANCSR_LLE …
#define DT2821_CHANCSR_TO_PRESLA(x) …
#define DT2821_CHANCSR_NUMB(x) …
#define DT2821_ADDAT_REG …
#define DT2821_DACSR_REG …
#define DT2821_DACSR_DAERR …
#define DT2821_DACSR_YSEL(x) …
#define DT2821_DACSR_SSEL …
#define DT2821_DACSR_DACRDY …
#define DT2821_DACSR_IDARDY …
#define DT2821_DACSR_DACLK …
#define DT2821_DACSR_HBOE …
#define DT2821_DACSR_LBOE …
#define DT2821_DADAT_REG …
#define DT2821_DIODAT_REG …
#define DT2821_SUPCSR_REG …
#define DT2821_SUPCSR_DMAD …
#define DT2821_SUPCSR_ERRINTEN …
#define DT2821_SUPCSR_CLRDMADNE …
#define DT2821_SUPCSR_DDMA …
#define DT2821_SUPCSR_DS(x) …
#define DT2821_SUPCSR_DS_PIO …
#define DT2821_SUPCSR_DS_AD_CLK …
#define DT2821_SUPCSR_DS_DA_CLK …
#define DT2821_SUPCSR_DS_AD_TRIG …
#define DT2821_SUPCSR_BUFFB …
#define DT2821_SUPCSR_SCDN …
#define DT2821_SUPCSR_DACON …
#define DT2821_SUPCSR_ADCINIT …
#define DT2821_SUPCSR_DACINIT …
#define DT2821_SUPCSR_PRLD …
#define DT2821_SUPCSR_STRIG …
#define DT2821_SUPCSR_XTRIG …
#define DT2821_SUPCSR_XCLK …
#define DT2821_SUPCSR_BDINIT …
#define DT2821_TMRCTR_REG …
#define DT2821_TMRCTR_PRESCALE(x) …
#define DT2821_TMRCTR_DIVIDER(x) …
#define DT2821_OSC_BASE …
#define DT2821_PRESCALE(x) …
#define DT2821_PRESCALE_MAX …
#define DT2821_DIVIDER_MAX …
#define DT2821_OSC_MAX …
static const struct comedi_lrange range_dt282x_ai_lo_bipolar = …;
static const struct comedi_lrange range_dt282x_ai_lo_unipolar = …;
static const struct comedi_lrange range_dt282x_ai_5_bipolar = …;
static const struct comedi_lrange range_dt282x_ai_5_unipolar = …;
static const struct comedi_lrange range_dt282x_ai_hi_bipolar = …;
static const struct comedi_lrange range_dt282x_ai_hi_unipolar = …;
static const struct comedi_lrange dt282x_ao_range = …;
struct dt282x_board { … };
static const struct dt282x_board boardtypes[] = …;
struct dt282x_private { … };
static int dt282x_prep_ai_dma(struct comedi_device *dev, int dma_index, int n)
{ … }
static int dt282x_prep_ao_dma(struct comedi_device *dev, int dma_index, int n)
{ … }
static void dt282x_disable_dma(struct comedi_device *dev)
{ … }
static unsigned int dt282x_ns_to_timer(unsigned int *ns, unsigned int flags)
{ … }
static void dt282x_munge(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned short *buf,
unsigned int nbytes)
{ … }
static unsigned int dt282x_ao_setup_dma(struct comedi_device *dev,
struct comedi_subdevice *s,
int cur_dma)
{ … }
static void dt282x_ao_dma_interrupt(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void dt282x_ai_dma_interrupt(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static irqreturn_t dt282x_interrupt(int irq, void *d)
{ … }
static void dt282x_load_changain(struct comedi_device *dev, int n,
unsigned int *chanlist)
{ … }
static int dt282x_ai_timeout(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned long context)
{ … }
static int dt282x_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt282x_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int dt282x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{ … }
static int dt282x_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int dt282x_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt282x_ao_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int dt282x_ao_inttrig(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int trig_num)
{ … }
static int dt282x_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{ … }
static int dt282x_ao_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int dt282x_dio_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt282x_dio_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static const struct comedi_lrange *const ai_range_table[] = …;
static const struct comedi_lrange *const ai_range_pgl_table[] = …;
static const struct comedi_lrange *opt_ai_range_lkup(int ispgl, int x)
{ … }
static void dt282x_alloc_dma(struct comedi_device *dev,
struct comedi_devconfig *it)
{ … }
static void dt282x_free_dma(struct comedi_device *dev)
{ … }
static int dt282x_initialize(struct comedi_device *dev)
{ … }
static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ … }
static void dt282x_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver dt282x_driver = …;
module_comedi_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;