Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325115
b: refs/heads/master
c: 83dcfee
h: refs/heads/master
i:
  325113: 397f752
  325111: d567afb
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent 6fa6a01 commit a97d4c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 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: bfa6d3b80fe578d6f930107f75b600920d7e74e0
refs/heads/master: 83dcfee0f2b29e689f79f259bde1c1dc34772b13
27 changes: 10 additions & 17 deletions trunk/drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ a multiple of chanlist_len*convert_arg.
#define PCI9111_AO_RESOLUTION_MASK 0x0FFF
#define PCI9111_DI_CHANNEL_NBR 16
#define PCI9111_DO_CHANNEL_NBR 16
#define PCI9111_DO_MASK 0xFFFF

#define PCI9111_RANGE_SETTING_DELAY 10
#define PCI9111_AI_INSTANT_READ_UDELAY_US 2
Expand Down Expand Up @@ -1088,28 +1087,22 @@ static int pci9111_di_insn_bits(struct comedi_device *dev,
return insn->n;
}

/* Digital outputs */

static int pci9111_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
struct comedi_insn *insn,
unsigned int *data)
{
unsigned int bits;
unsigned int mask = data[0];
unsigned int bits = data[1];

/* Only set bits that have been masked */
/* data[0] = mask */
/* data[1] = bit state */
if (mask) {
s->state &= ~mask;
s->state |= (bits & mask);

data[0] &= PCI9111_DO_MASK;

bits = s->state;
bits &= ~data[0];
bits |= data[0] & data[1];
s->state = bits;

outw(bits, dev->iobase + PCI9111_DIO_REG);
outw(s->state, dev->iobase + PCI9111_DIO_REG);
}

data[1] = bits;
data[1] = s->state;

return insn->n;
}
Expand Down

0 comments on commit a97d4c3

Please sign in to comment.