#include <linux/module.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/comedi/comedi_pci.h>
#include "plx9080.h"
#define FIRMWARE_REV_REG …
#define FEATURES_REG_PRESENT_BIT …
#define BOARD_CONTROL_REG …
#define BOARD_RESET_BIT …
#define TX_FIFO_RESET_BIT …
#define RX_FIFO_RESET_BIT …
#define TX_ENABLE_BIT …
#define RX_ENABLE_BIT …
#define DEMAND_DMA_DIRECTION_TX_BIT …
#define LINE_VALID_ON_STATUS_VALID_BIT …
#define START_TX_BIT …
#define CABLE_THROTTLE_ENABLE_BIT …
#define TEST_MODE_ENABLE_BIT …
#define BOARD_STATUS_REG …
#define COMMAND_LINE_STATUS_MASK …
#define TX_IN_PROGRESS_BIT …
#define TX_NOT_EMPTY_BIT …
#define TX_NOT_ALMOST_EMPTY_BIT …
#define TX_NOT_ALMOST_FULL_BIT …
#define TX_NOT_FULL_BIT …
#define RX_NOT_EMPTY_BIT …
#define RX_NOT_ALMOST_EMPTY_BIT …
#define RX_NOT_ALMOST_FULL_BIT …
#define RX_NOT_FULL_BIT …
#define BOARD_JUMPER0_INSTALLED_BIT …
#define BOARD_JUMPER1_INSTALLED_BIT …
#define TX_OVERRUN_BIT …
#define RX_UNDERRUN_BIT …
#define RX_OVERRUN_BIT …
#define TX_PROG_ALMOST_REG …
#define RX_PROG_ALMOST_REG …
#define ALMOST_EMPTY_BITS(x) …
#define ALMOST_FULL_BITS(x) …
#define FEATURES_REG …
#define FIFO_SIZE_PRESENT_BIT …
#define FIFO_WORDS_PRESENT_BIT …
#define LEVEL_EDGE_INTERRUPTS_PRESENT_BIT …
#define GPIO_SUPPORTED_BIT …
#define PLX_DMA_CH1_SUPPORTED_BIT …
#define OVERRUN_UNDERRUN_SUPPORTED_BIT …
#define FIFO_REG …
#define TX_STATUS_COUNT_REG …
#define TX_LINE_VALID_COUNT_REG …
#define TX_LINE_INVALID_COUNT_REG …
#define RX_STATUS_COUNT_REG …
#define RX_LINE_COUNT_REG …
#define INTERRUPT_CONTROL_REG …
#define FRAME_VALID_START_INTR …
#define FRAME_VALID_END_INTR …
#define TX_FIFO_EMPTY_INTR …
#define TX_FIFO_ALMOST_EMPTY_INTR …
#define TX_FIFO_ALMOST_FULL_INTR …
#define TX_FIFO_FULL_INTR …
#define RX_EMPTY_INTR …
#define RX_ALMOST_EMPTY_INTR …
#define RX_ALMOST_FULL_INTR …
#define RX_FULL_INTR …
#define INTERRUPT_STATUS_REG …
#define TX_CLOCK_DIVIDER_REG …
#define TX_FIFO_SIZE_REG …
#define RX_FIFO_SIZE_REG …
#define FIFO_SIZE_MASK …
#define TX_FIFO_WORDS_REG …
#define RX_FIFO_WORDS_REG …
#define INTERRUPT_EDGE_LEVEL_REG …
#define INTERRUPT_POLARITY_REG …
#define TIMER_BASE …
#define DMA_BUFFER_SIZE …
#define NUM_DMA_BUFFERS …
#define NUM_DMA_DESCRIPTORS …
struct hpdi_private { … };
static void gsc_hpdi_drain_dma(struct comedi_device *dev, unsigned int channel)
{ … }
static irqreturn_t gsc_hpdi_interrupt(int irq, void *d)
{ … }
static void gsc_hpdi_abort_dma(struct comedi_device *dev, unsigned int channel)
{ … }
static int gsc_hpdi_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int gsc_hpdi_cmd(struct comedi_device *dev,
struct comedi_subdevice *s)
{ … }
static int gsc_hpdi_check_chanlist(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int gsc_hpdi_cmd_test(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_cmd *cmd)
{ … }
static int gsc_hpdi_setup_dma_descriptors(struct comedi_device *dev,
unsigned int len)
{ … }
static int gsc_hpdi_dio_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static void gsc_hpdi_free_dma(struct comedi_device *dev)
{ … }
static int gsc_hpdi_init(struct comedi_device *dev)
{ … }
static void gsc_hpdi_init_plx9080(struct comedi_device *dev)
{ … }
static int gsc_hpdi_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{ … }
static void gsc_hpdi_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver gsc_hpdi_driver = …;
static int gsc_hpdi_pci_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{ … }
static const struct pci_device_id gsc_hpdi_pci_table[] = …;
MODULE_DEVICE_TABLE(pci, gsc_hpdi_pci_table);
static struct pci_driver gsc_hpdi_pci_driver = …;
module_comedi_pci_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;