#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 "plx9052.h"
#define PCI9111_FIFO_HALF_SIZE …
#define PCI9111_AI_ACQUISITION_PERIOD_MIN_NS …
#define PCI9111_RANGE_SETTING_DELAY …
#define PCI9111_AI_INSTANT_READ_UDELAY_US …
#define PCI9111_AI_FIFO_REG …
#define PCI9111_AO_REG …
#define PCI9111_DIO_REG …
#define PCI9111_EDIO_REG …
#define PCI9111_AI_CHANNEL_REG …
#define PCI9111_AI_RANGE_STAT_REG …
#define PCI9111_AI_STAT_AD_BUSY …
#define PCI9111_AI_STAT_FF_FF …
#define PCI9111_AI_STAT_FF_HF …
#define PCI9111_AI_STAT_FF_EF …
#define PCI9111_AI_RANGE(x) …
#define PCI9111_AI_RANGE_MASK …
#define PCI9111_AI_TRIG_CTRL_REG …
#define PCI9111_AI_TRIG_CTRL_TRGEVENT …
#define PCI9111_AI_TRIG_CTRL_POTRG …
#define PCI9111_AI_TRIG_CTRL_PTRG …
#define PCI9111_AI_TRIG_CTRL_ETIS …
#define PCI9111_AI_TRIG_CTRL_TPST …
#define PCI9111_AI_TRIG_CTRL_ASCAN …
#define PCI9111_INT_CTRL_REG …
#define PCI9111_INT_CTRL_ISC2 …
#define PCI9111_INT_CTRL_FFEN …
#define PCI9111_INT_CTRL_ISC1 …
#define PCI9111_INT_CTRL_ISC0 …
#define PCI9111_SOFT_TRIG_REG …
#define PCI9111_8254_BASE_REG …
#define PCI9111_INT_CLR_REG …
#define PCI9111_LI1_ACTIVE …
#define PCI9111_LI2_ACTIVE …
static const struct comedi_lrange pci9111_ai_range = …;
struct pci9111_private_data { … };
static void plx9050_interrupt_control(unsigned long io_base,
bool int1_enable,
bool int1_active_high,
bool int2_enable,
bool int2_active_high,
bool interrupt_enable)
{ … }
enum pci9111_ISC0_sources { … };
enum pci9111_ISC1_sources { … };
static void pci9111_interrupt_source_set(struct comedi_device *dev,
enum pci9111_ISC0_sources irq_0_source,
enum pci9111_ISC1_sources irq_1_source)
{ … }
static void pci9111_fifo_reset(struct comedi_device *dev)
{ … }
static int pci9111_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int pci9111_ai_check_chanlist(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int pci9111_ai_do_cmd_test(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int pci9111_ai_do_cmd(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static void pci9111_ai_munge(struct comedi_device *dev,
struct comedi_subdevice *s, void *data,
unsigned int num_bytes,
unsigned int start_chan_index)
{ … }
static void pci9111_handle_fifo_half_full(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static irqreturn_t pci9111_interrupt(int irq, void *p_device)
{ … }
static int pci9111_ai_eoc(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned long context)
{ … }
static int pci9111_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{ … }
static int pci9111_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int pci9111_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int pci9111_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int pci9111_reset(struct comedi_device *dev)
{ … }
static int pci9111_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{ … }
static void pci9111_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver adl_pci9111_driver = …;
static int pci9111_pci_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{ … }
static const struct pci_device_id pci9111_pci_table[] = …;
MODULE_DEVICE_TABLE(pci, pci9111_pci_table);
static struct pci_driver adl_pci9111_pci_driver = …;
module_comedi_pci_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;