struct pcl818_board {
const char *name;
int n_ranges;
- int n_aichan_se;
- int n_aichan_diff;
unsigned int ns_min;
int n_aochan;
const struct comedi_lrange *ai_range_type;
{
.name = "pcl818l",
.n_ranges = 4,
- .n_aichan_se = 16,
- .n_aichan_diff = 8,
.ns_min = 25000,
.n_aochan = 1,
.ai_range_type = &range_pcl818l_l_ai,
}, {
.name = "pcl818h",
.n_ranges = 9,
- .n_aichan_se = 16,
- .n_aichan_diff = 8,
.ns_min = 10000,
.n_aochan = 1,
.ai_range_type = &range_pcl818h_ai,
}, {
.name = "pcl818hd",
.n_ranges = 9,
- .n_aichan_se = 16,
- .n_aichan_diff = 8,
.ns_min = 10000,
.n_aochan = 1,
.ai_range_type = &range_pcl818h_ai,
}, {
.name = "pcl818hg",
.n_ranges = 12,
- .n_aichan_se = 16,
- .n_aichan_diff = 8,
.ns_min = 10000,
.n_aochan = 1,
.ai_range_type = &range_pcl818hg_ai,
}, {
.name = "pcl818",
.n_ranges = 9,
- .n_aichan_se = 16,
- .n_aichan_diff = 8,
.ns_min = 10000,
.n_aochan = 2,
.ai_range_type = &range_pcl818h_ai,
}, {
.name = "pcl718",
.n_ranges = 1,
- .n_aichan_se = 16,
- .n_aichan_diff = 8,
.ns_min = 16000,
.n_aochan = 2,
.ai_range_type = &range_unipolar5,
}, {
.name = "pcm3718",
.n_ranges = 9,
- .n_aichan_se = 16,
- .n_aichan_diff = 8,
.ns_min = 10000,
.ai_range_type = &range_pcl818h_ai,
.IRQbits = 0x00fc,
return ret;
s = &dev->subdevices[0];
- if (!board->n_aichan_se) {
- s->type = COMEDI_SUBD_UNUSED;
+ s->type = COMEDI_SUBD_AI;
+ s->subdev_flags = SDF_READABLE;
+ if (check_single_ended(dev->iobase)) {
+ s->n_chan = 16;
+ s->subdev_flags |= SDF_COMMON | SDF_GROUND;
} else {
- s->type = COMEDI_SUBD_AI;
- s->subdev_flags = SDF_READABLE;
- if (check_single_ended(dev->iobase)) {
- s->n_chan = board->n_aichan_se;
- s->subdev_flags |= SDF_COMMON | SDF_GROUND;
- } else {
- s->n_chan = board->n_aichan_diff;
- s->subdev_flags |= SDF_DIFF;
- }
- s->maxdata = board->ai_maxdata;
-
- pcl818_set_ai_range_table(dev, s, it);
-
- s->insn_read = pcl818_ai_insn_read;
- if (dev->irq) {
- dev->read_subdev = s;
- s->subdev_flags |= SDF_CMD_READ;
- s->len_chanlist = s->n_chan;
- s->do_cmdtest = ai_cmdtest;
- s->do_cmd = ai_cmd;
- s->cancel = pcl818_ai_cancel;
- }
+ s->n_chan = 8;
+ s->subdev_flags |= SDF_DIFF;
+ }
+ s->maxdata = board->ai_maxdata;
+
+ pcl818_set_ai_range_table(dev, s, it);
+
+ s->insn_read = pcl818_ai_insn_read;
+ if (dev->irq) {
+ dev->read_subdev = s;
+ s->subdev_flags |= SDF_CMD_READ;
+ s->len_chanlist = s->n_chan;
+ s->do_cmdtest = ai_cmdtest;
+ s->do_cmd = ai_cmd;
+ s->cancel = pcl818_ai_cancel;
}
s = &dev->subdevices[1];