Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317902
b: refs/heads/master
c: d2e1aeb
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 13, 2012
1 parent cce5d94 commit d127345
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 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: 02818bba43fea7d25b09d7b6886ea50c7293fc7e
refs/heads/master: d2e1aebee74622251d032643b0bcd9e68a4b1693
13 changes: 4 additions & 9 deletions trunk/drivers/staging/comedi/drivers/rtd520.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,6 @@ struct rtdPrivate {

/* Macros to access registers */

/* Read one ADC data value (12bit (with sign extend) as 16bit) */
/* Note: matches what DMA would get. Actual value >> 3 */
#define RtdAdcFifoGet(dev) \
readw(devpriv->las1+LAS1_ADC_FIFO)

/* Read two ADC data values (DOESN'T WORK) */
#define RtdAdcFifoGet2(dev) \
readl(devpriv->las1+LAS1_ADC_FIFO)
Expand Down Expand Up @@ -834,7 +829,7 @@ static int rtd_ai_rinsn(struct comedi_device *dev,
}

/* read data */
d = RtdAdcFifoGet(dev); /* get 2s comp value */
d = readw(devpriv->las1 + LAS1_ADC_FIFO);
/*printk ("rtd520: Got 0x%x after %d usec\n", d, ii+1); */
d = d >> 3; /* low 3 bits are marker lines */
if (CHAN_ARRAY_TEST(devpriv->chanBipolar, 0))
Expand Down Expand Up @@ -864,7 +859,7 @@ static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,
s16 d;

if (0 == devpriv->aiCount) { /* done */
d = RtdAdcFifoGet(dev); /* Read N and discard */
d = readw(devpriv->las1 + LAS1_ADC_FIFO);
continue;
}
#if 0
Expand All @@ -874,7 +869,7 @@ static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,
break;
}
#endif
d = RtdAdcFifoGet(dev); /* get 2s comp value */
d = readw(devpriv->las1 + LAS1_ADC_FIFO);

d = d >> 3; /* low 3 bits are marker lines */
if (CHAN_ARRAY_TEST(devpriv->chanBipolar, s->async->cur_chan)) {
Expand All @@ -899,7 +894,7 @@ static int ai_read_dregs(struct comedi_device *dev, struct comedi_subdevice *s)
{
while (RtdFifoStatus(dev) & FS_ADC_NOT_EMPTY) { /* 1 -> not empty */
short sample;
s16 d = RtdAdcFifoGet(dev); /* get 2s comp value */
s16 d = readw(devpriv->las1 + LAS1_ADC_FIFO);

if (0 == devpriv->aiCount) { /* done */
continue; /* read rest */
Expand Down

0 comments on commit d127345

Please sign in to comment.