#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/comedi/comedi_usb.h>
#define DT9812_DIAGS_BOARD_INFO_ADDR …
#define DT9812_MAX_WRITE_CMD_PIPE_SIZE …
#define DT9812_MAX_READ_CMD_PIPE_SIZE …
#define DT9812_USB_TIMEOUT …
#define F020_SFR_P4 …
#define F020_SFR_P1 …
#define F020_SFR_P2 …
#define F020_SFR_P3 …
#define F020_SFR_AMX0CF …
#define F020_SFR_AMX0SL …
#define F020_SFR_ADC0CF …
#define F020_SFR_ADC0L …
#define F020_SFR_ADC0H …
#define F020_SFR_DAC0L …
#define F020_SFR_DAC0H …
#define F020_SFR_DAC0CN …
#define F020_SFR_DAC1L …
#define F020_SFR_DAC1H …
#define F020_SFR_DAC1CN …
#define F020_SFR_ADC0CN …
#define F020_MASK_ADC0CF_AMP0GN0 …
#define F020_MASK_ADC0CF_AMP0GN1 …
#define F020_MASK_ADC0CF_AMP0GN2 …
#define F020_MASK_ADC0CN_AD0EN …
#define F020_MASK_ADC0CN_AD0INT …
#define F020_MASK_ADC0CN_AD0BUSY …
#define F020_MASK_DACXCN_DACXEN …
enum { … };
enum dt9812_gain { … };
enum { … };
struct dt9812_flash_data { … };
#define DT9812_MAX_NUM_MULTI_BYTE_RDS …
struct dt9812_read_multi { … };
struct dt9812_write_byte { … };
#define DT9812_MAX_NUM_MULTI_BYTE_WRTS …
struct dt9812_write_multi { … };
struct dt9812_rmw_byte { … };
#define DT9812_MAX_NUM_MULTI_BYTE_RMWS …
struct dt9812_rmw_multi { … };
struct dt9812_usb_cmd { … };
struct dt9812_private { … };
static int dt9812_read_info(struct comedi_device *dev,
int offset, void *buf, size_t buf_size)
{ … }
static int dt9812_read_multiple_registers(struct comedi_device *dev,
int reg_count, u8 *address,
u8 *value)
{ … }
static int dt9812_write_multiple_registers(struct comedi_device *dev,
int reg_count, u8 *address,
u8 *value)
{ … }
static int dt9812_rmw_multiple_registers(struct comedi_device *dev,
int reg_count,
struct dt9812_rmw_byte *rmw)
{ … }
static int dt9812_digital_in(struct comedi_device *dev, u8 *bits)
{ … }
static int dt9812_digital_out(struct comedi_device *dev, u8 bits)
{ … }
static void dt9812_configure_mux(struct comedi_device *dev,
struct dt9812_rmw_byte *rmw, int channel)
{ … }
static void dt9812_configure_gain(struct comedi_device *dev,
struct dt9812_rmw_byte *rmw,
enum dt9812_gain gain)
{ … }
static int dt9812_analog_in(struct comedi_device *dev,
int channel, u16 *value, enum dt9812_gain gain)
{ … }
static int dt9812_analog_out(struct comedi_device *dev, int channel, u16 value)
{ … }
static int dt9812_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt9812_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt9812_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt9812_ao_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt9812_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt9812_find_endpoints(struct comedi_device *dev)
{ … }
static int dt9812_reset_device(struct comedi_device *dev)
{ … }
static int dt9812_auto_attach(struct comedi_device *dev,
unsigned long context)
{ … }
static void dt9812_detach(struct comedi_device *dev)
{ … }
static struct comedi_driver dt9812_driver = …;
static int dt9812_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static const struct usb_device_id dt9812_usb_table[] = …;
MODULE_DEVICE_TABLE(usb, dt9812_usb_table);
static struct usb_driver dt9812_usb_driver = …;
module_comedi_usb_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;