Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317642
b: refs/heads/master
c: 55acaf2
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 6, 2012
1 parent 95335ab commit f1801e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93c58378b5498f6810a2f269dc3c9a13731c3cf7
refs/heads/master: 55acaf2d10d268d7db59877615955f910add5b1b
23 changes: 16 additions & 7 deletions trunk/drivers/staging/comedi/drivers/cb_pcidas.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,12 +1043,16 @@ static int cb_pcidas_ai_cmd(struct comedi_device *dev,
devpriv->adc_fifo_bits |= INTE;
devpriv->adc_fifo_bits &= ~INT_MASK;
if (cmd->flags & TRIG_WAKE_EOS) {
if (cmd->convert_src == TRIG_NOW && cmd->chanlist_len > 1)
devpriv->adc_fifo_bits |= INT_EOS; /* interrupt end of burst */
else
devpriv->adc_fifo_bits |= INT_FNE; /* interrupt fifo not empty */
if (cmd->convert_src == TRIG_NOW && cmd->chanlist_len > 1) {
/* interrupt end of burst */
devpriv->adc_fifo_bits |= INT_EOS;
} else {
/* interrupt fifo not empty */
devpriv->adc_fifo_bits |= INT_FNE;
}
} else {
devpriv->adc_fifo_bits |= INT_FHF; /* interrupt fifo half full */
/* interrupt fifo half full */
devpriv->adc_fifo_bits |= INT_FHF;
}

/* enable (and clear) interrupts */
Expand Down Expand Up @@ -1474,7 +1478,9 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
INT_ADCFIFO)) == 0)
break;
cfc_write_to_buffer(s, inw(devpriv->adc_fifo));
if (async->cmd.stop_src == TRIG_COUNT && --devpriv->count == 0) { /* end of acquisition */
if (async->cmd.stop_src == TRIG_COUNT &&
--devpriv->count == 0) {
/* end of acquisition */
cb_pcidas_cancel(dev, s);
async->events |= COMEDI_CB_EOA;
break;
Expand Down Expand Up @@ -1620,7 +1626,10 @@ static int cb_pcidas_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
s->n_chan = thisboard->ao_nchan;
/* analog out resolution is the same as analog input resolution, so use ai_bits */
/*
* analog out resolution is the same as
* analog input resolution, so use ai_bits
*/
s->maxdata = (1 << thisboard->ai_bits) - 1;
s->range_table = &cb_pcidas_ao_ranges;
s->insn_read = cb_pcidas_ao_readback_insn;
Expand Down

0 comments on commit f1801e2

Please sign in to comment.