Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354445
b: refs/heads/master
c: 75a45d9
h: refs/heads/master
i:
  354443: ae9b6dd
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Feb 6, 2013
1 parent 10c4bf9 commit 3518336
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 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: b639e09608f0103761751d707e837a7ca01d82a7
refs/heads/master: 75a45d924dd33882caf80d3a78dd96c370a6580b
43 changes: 23 additions & 20 deletions trunk/drivers/staging/comedi/drivers/vmk80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ struct vmk80xx_board {
unsigned int ai_maxdata;
int ao_nchans;
int di_nchans;
__le16 cnt_bits;
unsigned int cnt_maxdata;
__u8 pwm_chans;
__le16 pwm_bits;
};
Expand All @@ -177,7 +177,7 @@ static const struct vmk80xx_board vmk80xx_boardinfo[] = {
.ai_maxdata = 0x00ff,
.ao_nchans = 2,
.di_nchans = 6,
.cnt_bits = 16,
.cnt_maxdata = 0xffff,
.pwm_chans = 0,
.pwm_bits = 0,
},
Expand All @@ -189,7 +189,7 @@ static const struct vmk80xx_board vmk80xx_boardinfo[] = {
.ai_maxdata = 0x03ff,
.ao_nchans = 8,
.di_nchans = 8,
.cnt_bits = 0,
.cnt_maxdata = 0, /* unknown, device is not writeable */
.pwm_chans = 1,
.pwm_bits = 10,
},
Expand Down Expand Up @@ -900,9 +900,10 @@ static int vmk80xx_do_insn_bits(struct comedi_device *dev,
return retval;
}

static int vmk80xx_cnt_rinsn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
static int vmk80xx_cnt_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct vmk80xx_private *devpriv = dev->private;
int chan;
Expand Down Expand Up @@ -947,9 +948,10 @@ static int vmk80xx_cnt_rinsn(struct comedi_device *dev,
return n;
}

static int vmk80xx_cnt_cinsn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
static int vmk80xx_cnt_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct vmk80xx_private *devpriv = dev->private;
unsigned int insn_cmd;
Expand Down Expand Up @@ -993,9 +995,10 @@ static int vmk80xx_cnt_cinsn(struct comedi_device *dev,
return n;
}

static int vmk80xx_cnt_winsn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
static int vmk80xx_cnt_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct vmk80xx_private *devpriv = dev->private;
unsigned long debtime;
Expand Down Expand Up @@ -1248,15 +1251,15 @@ static int vmk80xx_attach_common(struct comedi_device *dev)

/* Counter subdevice */
s = &dev->subdevices[4];
s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags = SDF_READABLE;
s->n_chan = 2;
s->insn_read = vmk80xx_cnt_rinsn;
s->insn_config = vmk80xx_cnt_cinsn;
s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags = SDF_READABLE;
s->n_chan = 2;
s->maxdata = boardinfo->cnt_maxdata;
s->insn_read = vmk80xx_cnt_insn_read;
s->insn_config = vmk80xx_cnt_insn_config;
if (devpriv->model == VMK8055_MODEL) {
s->subdev_flags |= SDF_WRITEABLE;
s->maxdata = (1 << boardinfo->cnt_bits) - 1;
s->insn_write = vmk80xx_cnt_winsn;
s->subdev_flags |= SDF_WRITEABLE;
s->insn_write = vmk80xx_cnt_insn_write;
}

/* PWM subdevice */
Expand Down

0 comments on commit 3518336

Please sign in to comment.