Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325122
b: refs/heads/master
c: b5d8d11
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent b57c70c commit 4a2295b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 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: af031edf3f377b946c1d2b0d163fcf32b1041434
refs/heads/master: b5d8d11931f3b772487381e7ca89dfd6e5b4f0fd
23 changes: 8 additions & 15 deletions trunk/drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ a multiple of chanlist_len*convert_arg.

/* IO address map */

#define PCI9111_REGISTER_AD_FIFO_VALUE 0x00 /* AD Data stored
in FIFO */
#define PCI9111_AI_FIFO_REG 0x00
#define PCI9111_AO_REG 0x00
#define PCI9111_DIO_REG 0x02
#define PCI9111_REGISTER_EXTENDED_IO_PORTS 0x04
Expand Down Expand Up @@ -217,16 +216,6 @@ a multiple of chanlist_len*convert_arg.
(inb(dev->iobase + PCI9111_REGISTER_RANGE_STATUS_READBACK) \
&PCI9111_RANGE_MASK)

#define pci9111_ai_get_data() \
(((inw(dev->iobase + PCI9111_REGISTER_AD_FIFO_VALUE)>>4) \
&PCI9111_AI_RESOLUTION_MASK) \
^ PCI9111_AI_RESOLUTION_2_CMP_BIT)

#define pci9111_hr_ai_get_data() \
((inw(dev->iobase + PCI9111_REGISTER_AD_FIFO_VALUE) \
&PCI9111_HR_AI_RESOLUTION_MASK) \
^ PCI9111_HR_AI_RESOLUTION_2_CMP_BIT)

static const struct comedi_lrange pci9111_hr_ai_range = {
5,
{
Expand Down Expand Up @@ -888,7 +877,7 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
&& !dev_private->
stop_is_none ? dev_private->stop_counter :
PCI9111_FIFO_HALF_SIZE;
insw(dev->iobase + PCI9111_REGISTER_AD_FIFO_VALUE,
insw(dev->iobase + PCI9111_AI_FIFO_REG,
dev_private->ai_bounce_buffer, num_samples);

if (dev_private->scan_delay < 1) {
Expand Down Expand Up @@ -1007,9 +996,13 @@ static int pci9111_ai_insn_read(struct comedi_device *dev,
conversion_done:

if (resolution == PCI9111_HR_AI_RESOLUTION)
data[i] = pci9111_hr_ai_get_data();
data[i] = (inw(dev->iobase + PCI9111_AI_FIFO_REG)
& PCI9111_HR_AI_RESOLUTION_MASK)
^ PCI9111_HR_AI_RESOLUTION_2_CMP_BIT;
else
data[i] = pci9111_ai_get_data();
data[i] = ((inw(dev->iobase + PCI9111_AI_FIFO_REG) >> 4)
& PCI9111_AI_RESOLUTION_MASK)
^ PCI9111_AI_RESOLUTION_2_CMP_BIT;
}

return i;
Expand Down

0 comments on commit 4a2295b

Please sign in to comment.