return ret ? ret : n;
}
-/*
-==============================================================================
-*/
static int pcl812_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
return i;
}
-/*
-==============================================================================
-*/
static int pcl812_ao_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
return i;
}
-/*
-==============================================================================
-*/
static int pcl812_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
return insn->n;
}
-/*
-==============================================================================
-*/
static int pcl812_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{
return 0;
}
-/*
-==============================================================================
-*/
static int pcl812_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
struct pcl812_private *devpriv = dev->private;
return 0;
}
-/*
-==============================================================================
-*/
static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
{
char err = 1;
return IRQ_HANDLED;
}
-/*
-==============================================================================
-*/
static void transfer_from_dma_buf(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned short *ptr,
comedi_event(dev, s);
}
-/*
-==============================================================================
-*/
static irqreturn_t interrupt_pcl812_ai_dma(int irq, void *d)
{
struct comedi_device *dev = d;
return IRQ_HANDLED;
}
-/*
-==============================================================================
-*/
static irqreturn_t interrupt_pcl812(int irq, void *d)
{
struct comedi_device *dev = d;
return interrupt_pcl812_ai_int(irq, d);
}
-/*
-==============================================================================
-*/
static int pcl812_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
{
struct pcl812_private *devpriv = dev->private;
return s->async->buf_write_count - s->async->buf_read_count;
}
-/*
-==============================================================================
-*/
static void setup_range_channel(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned int rangechan, char wait)
udelay(devpriv->max_812_ai_mode0_rangewait);
}
-/*
-==============================================================================
-*/
static int pcl812_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{
return 0;
}
-/*
-==============================================================================
-*/
static void pcl812_reset(struct comedi_device *dev)
{
const struct pcl812_board *board = comedi_board(dev);