#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/comedi/comedi_pci.h>
#define NI_65XX_ID_REG …
#define NI_65XX_CLR_REG …
#define NI_65XX_CLR_WDOG_INT …
#define NI_65XX_CLR_WDOG_PING …
#define NI_65XX_CLR_WDOG_EXP …
#define NI_65XX_CLR_EDGE_INT …
#define NI_65XX_CLR_OVERFLOW_INT …
#define NI_65XX_STATUS_REG …
#define NI_65XX_STATUS_WDOG_INT …
#define NI_65XX_STATUS_FALL_EDGE …
#define NI_65XX_STATUS_RISE_EDGE …
#define NI_65XX_STATUS_INT …
#define NI_65XX_STATUS_OVERFLOW_INT …
#define NI_65XX_STATUS_EDGE_INT …
#define NI_65XX_CTRL_REG …
#define NI_65XX_CTRL_WDOG_ENA …
#define NI_65XX_CTRL_FALL_EDGE_ENA …
#define NI_65XX_CTRL_RISE_EDGE_ENA …
#define NI_65XX_CTRL_INT_ENA …
#define NI_65XX_CTRL_OVERFLOW_ENA …
#define NI_65XX_CTRL_EDGE_ENA …
#define NI_65XX_REV_REG …
#define NI_65XX_FILTER_REG …
#define NI_65XX_RTSI_ROUTE_REG …
#define NI_65XX_RTSI_EDGE_REG …
#define NI_65XX_RTSI_WDOG_REG …
#define NI_65XX_RTSI_TRIG_REG …
#define NI_65XX_AUTO_CLK_SEL_REG …
#define NI_65XX_AUTO_CLK_SEL_STATUS …
#define NI_65XX_AUTO_CLK_SEL_DISABLE …
#define NI_65XX_WDOG_CTRL_REG …
#define NI_65XX_WDOG_CTRL_ENA …
#define NI_65XX_RTSI_CFG_REG …
#define NI_65XX_RTSI_CFG_RISE_SENSE …
#define NI_65XX_RTSI_CFG_FALL_SENSE …
#define NI_65XX_RTSI_CFG_SYNC_DETECT …
#define NI_65XX_WDOG_STATUS_REG …
#define NI_65XX_WDOG_STATUS_EXP …
#define NI_65XX_WDOG_INTERVAL_REG …
#define NI_65XX_PORT(x) …
#define NI_65XX_IO_DATA_REG(x) …
#define NI_65XX_IO_SEL_REG(x) …
#define NI_65XX_IO_SEL_OUTPUT …
#define NI_65XX_IO_SEL_INPUT …
#define NI_65XX_RISE_EDGE_ENA_REG(x) …
#define NI_65XX_FALL_EDGE_ENA_REG(x) …
#define NI_65XX_FILTER_ENA(x) …
#define NI_65XX_WDOG_HIZ_REG(x) …
#define NI_65XX_WDOG_ENA(x) …
#define NI_65XX_WDOG_HI_LO_REG(x) …
#define NI_65XX_RTSI_ENA(x) …
#define NI_65XX_PORT_TO_CHAN(x) …
#define NI_65XX_CHAN_TO_PORT(x) …
#define NI_65XX_CHAN_TO_MASK(x) …
enum ni_65xx_boardid { … };
struct ni_65xx_board { … };
static const struct ni_65xx_board ni_65xx_boards[] = …;
static bool ni_65xx_legacy_invert_outputs;
module_param_named(legacy_invert_outputs, ni_65xx_legacy_invert_outputs,
bool, 0444);
MODULE_PARM_DESC(…) …;
static unsigned int ni_65xx_num_ports(struct comedi_device *dev)
{ … }
static void ni_65xx_disable_input_filters(struct comedi_device *dev)
{ … }
static void ni_65xx_update_edge_detection(struct comedi_device *dev,
unsigned int base_chan,
unsigned int rising,
unsigned int falling)
{ … }
static void ni_65xx_disable_edge_detection(struct comedi_device *dev)
{ … }
static int ni_65xx_dio_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int ni_65xx_dio_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static irqreturn_t ni_65xx_interrupt(int irq, void *d)
{ … }
static int ni_65xx_intr_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int ni_65xx_intr_cmd(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int ni_65xx_intr_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int ni_65xx_intr_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int ni_65xx_intr_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
#define MITE_IODWBSR …
#define WENAB …
static int ni_65xx_mite_init(struct pci_dev *pcidev)
{ … }
static int ni_65xx_auto_attach(struct comedi_device *dev,
unsigned long context)
{ … }
static void ni_65xx_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver ni_65xx_driver = …;
static int ni_65xx_pci_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{ … }
static const struct pci_device_id ni_65xx_pci_table[] = …;
MODULE_DEVICE_TABLE(pci, ni_65xx_pci_table);
static struct pci_driver ni_65xx_pci_driver = …;
module_comedi_pci_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;