#include <linux/module.h>
#include <linux/gfp.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/comedi/comedidev.h>
#include <linux/comedi/comedi_8254.h>
#include <linux/comedi/comedi_isadma.h>
#define PCL818_AI_LSB_REG …
#define PCL818_AI_MSB_REG …
#define PCL818_RANGE_REG …
#define PCL818_MUX_REG …
#define PCL818_MUX_SCAN(_first, _last) …
#define PCL818_DO_DI_LSB_REG …
#define PCL818_AO_LSB_REG(x) …
#define PCL818_AO_MSB_REG(x) …
#define PCL818_STATUS_REG …
#define PCL818_STATUS_NEXT_CHAN_MASK …
#define PCL818_STATUS_INT …
#define PCL818_STATUS_MUX …
#define PCL818_STATUS_UNI …
#define PCL818_STATUS_EOC …
#define PCL818_CTRL_REG …
#define PCL818_CTRL_TRIG(x) …
#define PCL818_CTRL_DISABLE_TRIG …
#define PCL818_CTRL_SOFT_TRIG …
#define PCL818_CTRL_EXT_TRIG …
#define PCL818_CTRL_PACER_TRIG …
#define PCL818_CTRL_DMAE …
#define PCL818_CTRL_IRQ(x) …
#define PCL818_CTRL_INTE …
#define PCL818_CNTENABLE_REG …
#define PCL818_CNTENABLE_PACER_TRIG0 …
#define PCL818_CNTENABLE_CNT0_INT_CLK …
#define PCL818_DO_DI_MSB_REG …
#define PCL818_TIMER_BASE …
#define PCL818_FI_ENABLE …
#define PCL818_FI_INTCLR …
#define PCL818_FI_FLUSH …
#define PCL818_FI_STATUS …
#define PCL818_FI_DATALO …
#define PCL818_FI_DATAHI …
#define MAGIC_DMA_WORD …
static const struct comedi_lrange range_pcl818h_ai = …;
static const struct comedi_lrange range_pcl818hg_ai = …;
static const struct comedi_lrange range_pcl818l_l_ai = …;
static const struct comedi_lrange range_pcl818l_h_ai = …;
static const struct comedi_lrange range718_bipolar1 = …;
static const struct comedi_lrange range718_bipolar0_5 = …;
static const struct comedi_lrange range718_unipolar2 = …;
static const struct comedi_lrange range718_unipolar1 = …;
struct pcl818_board { … };
static const struct pcl818_board boardtypes[] = …;
struct pcl818_private { … };
static void pcl818_ai_setup_dma(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int unread_samples)
{ … }
static void pcl818_ai_set_chan_range(struct comedi_device *dev,
unsigned int chan,
unsigned int range)
{ … }
static void pcl818_ai_set_chan_scan(struct comedi_device *dev,
unsigned int first_chan,
unsigned int last_chan)
{ … }
static void pcl818_ai_setup_chanlist(struct comedi_device *dev,
unsigned int *chanlist,
unsigned int seglen)
{ … }
static void pcl818_ai_clear_eoc(struct comedi_device *dev)
{ … }
static void pcl818_ai_soft_trig(struct comedi_device *dev)
{ … }
static unsigned int pcl818_ai_get_fifo_sample(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int *chan)
{ … }
static unsigned int pcl818_ai_get_sample(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int *chan)
{ … }
static int pcl818_ai_eoc(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned long context)
{ … }
static bool pcl818_ai_write_sample(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int chan, unsigned short val)
{ … }
static void pcl818_handle_eoc(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void pcl818_handle_dma(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void pcl818_handle_fifo(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static irqreturn_t pcl818_interrupt(int irq, void *d)
{ … }
static int check_channel_list(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan)
{ … }
static int check_single_ended(unsigned int port)
{ … }
static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int pcl818_ai_cmd(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int pcl818_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int pcl818_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int pcl818_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int pcl818_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int pcl818_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static void pcl818_reset(struct comedi_device *dev)
{ … }
static void pcl818_set_ai_range_table(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_devconfig *it)
{ … }
static void pcl818_alloc_dma(struct comedi_device *dev, unsigned int dma_chan)
{ … }
static void pcl818_free_dma(struct comedi_device *dev)
{ … }
static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ … }
static void pcl818_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver pcl818_driver = …;
module_comedi_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;