Commit c1a6c5e1 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl816: all board types have digital inputs and outputs

All the board types have 16 digital inputs and 16 digital outputs.

Remove the 'n_dichan' and 'n_dochan' members in the boardinfo.

The subdevice support code is currently incomplete in this driver. For
now just tidy up the incomplete subdevice code in pcl816_attach().
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 03d98e6c
...@@ -96,8 +96,6 @@ struct pcl816_board { ...@@ -96,8 +96,6 @@ struct pcl816_board {
int n_aichan; int n_aichan;
unsigned int ai_ns_min; unsigned int ai_ns_min;
int n_aochan; int n_aochan;
int n_dichan;
int n_dochan;
const struct comedi_lrange *ai_range_type; const struct comedi_lrange *ai_range_type;
unsigned int IRQbits; unsigned int IRQbits;
int ai_maxdata; int ai_maxdata;
...@@ -113,8 +111,6 @@ static const struct pcl816_board boardtypes[] = { ...@@ -113,8 +111,6 @@ static const struct pcl816_board boardtypes[] = {
.n_aichan = 16, .n_aichan = 16,
.ai_ns_min = 10000, .ai_ns_min = 10000,
.n_aochan = 1, .n_aochan = 1,
.n_dichan = 16,
.n_dochan = 16,
.ai_range_type = &range_pcl816, .ai_range_type = &range_pcl816,
.IRQbits = 0x00fc, .IRQbits = 0x00fc,
.ai_maxdata = 0xffff, .ai_maxdata = 0xffff,
...@@ -127,8 +123,6 @@ static const struct pcl816_board boardtypes[] = { ...@@ -127,8 +123,6 @@ static const struct pcl816_board boardtypes[] = {
.n_aichan = 16, .n_aichan = 16,
.ai_ns_min = 10000, .ai_ns_min = 10000,
.n_aochan = 1, .n_aochan = 1,
.n_dichan = 16,
.n_dochan = 16,
.ai_range_type = &range_pcl816, .ai_range_type = &range_pcl816,
.IRQbits = 0x00fc, .IRQbits = 0x00fc,
.ai_maxdata = 0x3fff, .ai_maxdata = 0x3fff,
...@@ -928,14 +922,6 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -928,14 +922,6 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->hwdmasize[1] = (1 << pages) * PAGE_SIZE; devpriv->hwdmasize[1] = (1 << pages) * PAGE_SIZE;
} }
/* if (board->n_aochan > 0)
subdevs[1] = COMEDI_SUBD_AO;
if (board->n_dichan > 0)
subdevs[2] = COMEDI_SUBD_DI;
if (board->n_dochan > 0)
subdevs[3] = COMEDI_SUBD_DO;
*/
ret = comedi_alloc_subdevices(dev, 1); ret = comedi_alloc_subdevices(dev, 1);
if (ret) if (ret)
return ret; return ret;
...@@ -962,7 +948,7 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -962,7 +948,7 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
} }
#if 0 #if 0
case COMEDI_SUBD_AO: subdevs[1] = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE | SDF_GROUND; s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
s->n_chan = board->n_aochan; s->n_chan = board->n_aochan;
s->maxdata = board->ao_maxdata; s->maxdata = board->ao_maxdata;
...@@ -970,19 +956,17 @@ case COMEDI_SUBD_AO: ...@@ -970,19 +956,17 @@ case COMEDI_SUBD_AO:
s->range_table = &range_pcl816; s->range_table = &range_pcl816;
break; break;
case COMEDI_SUBD_DI: subdevs[2] = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE;
s->n_chan = board->n_dichan; s->n_chan = 16;
s->maxdata = 1; s->maxdata = 1;
s->len_chanlist = board->n_dichan;
s->range_table = &range_digital; s->range_table = &range_digital;
break; break;
case COMEDI_SUBD_DO: subdevs[3] = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = board->n_dochan; s->n_chan = 16;
s->maxdata = 1; s->maxdata = 1;
s->len_chanlist = board->n_dochan;
s->range_table = &range_digital; s->range_table = &range_digital;
break; break;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment