#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 PCL816_DO_DI_LSB_REG …
#define PCL816_DO_DI_MSB_REG …
#define PCL816_TIMER_BASE …
#define PCL816_AI_LSB_REG …
#define PCL816_AI_MSB_REG …
#define PCL816_RANGE_REG …
#define PCL816_CLRINT_REG …
#define PCL816_MUX_REG …
#define PCL816_MUX_SCAN(_first, _last) …
#define PCL816_CTRL_REG …
#define PCL816_CTRL_SOFT_TRIG …
#define PCL816_CTRL_PACER_TRIG …
#define PCL816_CTRL_EXT_TRIG …
#define PCL816_CTRL_POE …
#define PCL816_CTRL_DMAEN …
#define PCL816_CTRL_INTEN …
#define PCL816_CTRL_DMASRC_SLOT(x) …
#define PCL816_STATUS_REG …
#define PCL816_STATUS_NEXT_CHAN_MASK …
#define PCL816_STATUS_INTSRC_SLOT(x) …
#define PCL816_STATUS_INTSRC_DMA …
#define PCL816_STATUS_INTSRC_MASK …
#define PCL816_STATUS_INTACT …
#define PCL816_STATUS_DRDY …
#define MAGIC_DMA_WORD …
static const struct comedi_lrange range_pcl816 = …;
struct pcl816_board { … };
static const struct pcl816_board boardtypes[] = …;
struct pcl816_private { … };
static void pcl816_ai_setup_dma(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int unread_samples)
{ … }
static void pcl816_ai_set_chan_range(struct comedi_device *dev,
unsigned int chan,
unsigned int range)
{ … }
static void pcl816_ai_set_chan_scan(struct comedi_device *dev,
unsigned int first_chan,
unsigned int last_chan)
{ … }
static void pcl816_ai_setup_chanlist(struct comedi_device *dev,
unsigned int *chanlist,
unsigned int seglen)
{ … }
static void pcl816_ai_clear_eoc(struct comedi_device *dev)
{ … }
static void pcl816_ai_soft_trig(struct comedi_device *dev)
{ … }
static unsigned int pcl816_ai_get_sample(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int pcl816_ai_eoc(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned long context)
{ … }
static bool pcl816_ai_next_chan(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void transfer_from_dma_buf(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned short *ptr,
unsigned int bufptr, unsigned int len)
{ … }
static irqreturn_t pcl816_interrupt(int irq, void *d)
{ … }
static int check_channel_list(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int *chanlist,
unsigned int chanlen)
{ … }
static int pcl816_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{ … }
static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{ … }
static int pcl816_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
{ … }
static int pcl816_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int pcl816_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int pcl816_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int pcl816_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static void pcl816_reset(struct comedi_device *dev)
{ … }
static void pcl816_alloc_irq_and_dma(struct comedi_device *dev,
struct comedi_devconfig *it)
{ … }
static void pcl816_free_dma(struct comedi_device *dev)
{ … }
static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ … }
static void pcl816_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver pcl816_driver = …;
module_comedi_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;