#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/errno.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/uaccess.h>
#include <linux/comedi/comedi_usb.h>
enum { … };
#define VMK8055_DI_REG …
#define VMK8055_DO_REG …
#define VMK8055_AO1_REG …
#define VMK8055_AO2_REG …
#define VMK8055_AI1_REG …
#define VMK8055_AI2_REG …
#define VMK8055_CNT1_REG …
#define VMK8055_CNT2_REG …
#define VMK8061_CH_REG …
#define VMK8061_DI_REG …
#define VMK8061_DO_REG …
#define VMK8061_PWM_REG1 …
#define VMK8061_PWM_REG2 …
#define VMK8061_CNT_REG …
#define VMK8061_AO_REG …
#define VMK8061_AI_REG1 …
#define VMK8061_AI_REG2 …
#define VMK8055_CMD_RST …
#define VMK8055_CMD_DEB1_TIME …
#define VMK8055_CMD_DEB2_TIME …
#define VMK8055_CMD_RST_CNT1 …
#define VMK8055_CMD_RST_CNT2 …
#define VMK8055_CMD_WRT_AD …
#define VMK8061_CMD_RD_AI …
#define VMK8061_CMR_RD_ALL_AI …
#define VMK8061_CMD_SET_AO …
#define VMK8061_CMD_SET_ALL_AO …
#define VMK8061_CMD_OUT_PWM …
#define VMK8061_CMD_RD_DI …
#define VMK8061_CMD_DO …
#define VMK8061_CMD_CLR_DO …
#define VMK8061_CMD_SET_DO …
#define VMK8061_CMD_RD_CNT …
#define VMK8061_CMD_RST_CNT …
#define VMK8061_CMD_RD_VERSION …
#define VMK8061_CMD_RD_JMP_STAT …
#define VMK8061_CMD_RD_PWR_STAT …
#define VMK8061_CMD_RD_DO …
#define VMK8061_CMD_RD_AO …
#define VMK8061_CMD_RD_PWM …
#define IC3_VERSION …
#define IC6_VERSION …
#define MIN_BUF_SIZE …
#define PACKET_TIMEOUT …
enum vmk80xx_model { … };
static const struct comedi_lrange vmk8061_range = …;
struct vmk80xx_board { … };
static const struct vmk80xx_board vmk80xx_boardinfo[] = …;
struct vmk80xx_private { … };
static void vmk80xx_do_bulk_msg(struct comedi_device *dev)
{ … }
static int vmk80xx_read_packet(struct comedi_device *dev)
{ … }
static int vmk80xx_write_packet(struct comedi_device *dev, int cmd)
{ … }
static int vmk80xx_reset_device(struct comedi_device *dev)
{ … }
static int vmk80xx_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_ao_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_cnt_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_cnt_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_cnt_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_pwm_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_pwm_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int vmk80xx_find_usb_endpoints(struct comedi_device *dev)
{ … }
static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)
{ … }
static int vmk80xx_init_subdevices(struct comedi_device *dev)
{ … }
static int vmk80xx_auto_attach(struct comedi_device *dev,
unsigned long context)
{ … }
static void vmk80xx_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver vmk80xx_driver = …;
static int vmk80xx_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static const struct usb_device_id vmk80xx_usb_id_table[] = …;
MODULE_DEVICE_TABLE(usb, vmk80xx_usb_id_table);
static struct usb_driver vmk80xx_usb_driver = …;
module_comedi_usb_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;