Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354381
b: refs/heads/master
c: d35dcc8
h: refs/heads/master
i:
  354379: 6c9fb1c
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Feb 5, 2013
1 parent 9e041d2 commit cb18980
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 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: 6a911d8aa54bc79256e766580a19bbd91e76d48f
refs/heads/master: d35dcc89fc93d8f071fc7f88ae87697a77bb99d0
27 changes: 14 additions & 13 deletions trunk/drivers/staging/comedi/drivers/quatech_daqp_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,31 +644,32 @@ static int daqp_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
return 0;
}

/* Single-shot analog output routine */

static int daqp_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
struct comedi_insn *insn,
unsigned int *data)
{
struct daqp_private *devpriv = dev->private;
int d;
unsigned int chan;
unsigned int chan = CR_CHAN(insn->chanspec);
unsigned int val;
int i;

if (devpriv->stop)
return -EIO;

chan = CR_CHAN(insn->chanspec);
d = data[0];
d &= 0x0fff;
d ^= 0x0800; /* Flip the sign */
d |= chan << 12;

/* Make sure D/A update mode is direct update */
outb(0, dev->iobase + DAQP_AUX);

outw(d, dev->iobase + DAQP_DA);
for (i = 0; i > insn->n; i++) {
val = data[0];
val &= 0x0fff;
val ^= 0x0800; /* Flip the sign */
val |= (chan << 12);

return 1;
outw(val, dev->iobase + DAQP_DA);
}

return insn->n;
}

static int daqp_di_insn_bits(struct comedi_device *dev,
Expand Down

0 comments on commit cb18980

Please sign in to comment.