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

staging: comedi: drivers: replace SDF_WRITEABLE with SDF_WRITABLE

As indicated in the comedi.h uapi header, SDF_WRITEABLE was a spelling
error in the API, SDF_WRITABLE is prefered.

For aesthetics, replace all the SDF_WRITEABLE uses with SDF_WRITABLE.
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 75f6108f
...@@ -66,8 +66,7 @@ static int apci1500_auto_attach(struct comedi_device *dev, ...@@ -66,8 +66,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
/* Allocate and Initialise DO Subdevice Structures */ /* Allocate and Initialise DO Subdevice Structures */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = 16; s->n_chan = 16;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
...@@ -78,7 +77,7 @@ static int apci1500_auto_attach(struct comedi_device *dev, ...@@ -78,7 +77,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
/* Allocate and Initialise Timer Subdevice Structures */ /* Allocate and Initialise Timer Subdevice Structures */
s = &dev->subdevices[2]; s = &dev->subdevices[2];
s->type = COMEDI_SUBD_TIMER; s->type = COMEDI_SUBD_TIMER;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = 1; s->n_chan = 1;
s->maxdata = 0; s->maxdata = 0;
s->len_chanlist = 1; s->len_chanlist = 1;
......
...@@ -163,7 +163,7 @@ static int apci1516_auto_attach(struct comedi_device *dev, ...@@ -163,7 +163,7 @@ static int apci1516_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[1]; s = &dev->subdevices[1];
if (this_board->do_nchan) { if (this_board->do_nchan) {
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = this_board->do_nchan; s->n_chan = this_board->do_nchan;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
......
...@@ -403,7 +403,7 @@ static int apci1564_auto_attach(struct comedi_device *dev, ...@@ -403,7 +403,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
/* Allocate and Initialise DO Subdevice Structures */ /* Allocate and Initialise DO Subdevice Structures */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 32; s->n_chan = 32;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
...@@ -431,7 +431,7 @@ static int apci1564_auto_attach(struct comedi_device *dev, ...@@ -431,7 +431,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
/* Allocate and Initialise Timer Subdevice Structures */ /* Allocate and Initialise Timer Subdevice Structures */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_TIMER; s->type = COMEDI_SUBD_TIMER;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 3; s->n_chan = 3;
s->maxdata = 0; s->maxdata = 0;
s->range_table = &range_digital; s->range_table = &range_digital;
......
...@@ -140,7 +140,7 @@ static int apci16xx_auto_attach(struct comedi_device *dev, ...@@ -140,7 +140,7 @@ static int apci16xx_auto_attach(struct comedi_device *dev,
for (i = 0; i < n_subdevs; i++) { for (i = 0; i < n_subdevs; i++) {
s = &dev->subdevices[i]; s = &dev->subdevices[i];
s->type = COMEDI_SUBD_DIO; s->type = COMEDI_SUBD_DIO;
s->subdev_flags = SDF_WRITEABLE | SDF_READABLE; s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
s->n_chan = ((i * 32) < board->n_chan) ? 32 : last; s->n_chan = ((i * 32) < board->n_chan) ? 32 : last;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
......
...@@ -267,7 +267,7 @@ static int apci2032_auto_attach(struct comedi_device *dev, ...@@ -267,7 +267,7 @@ static int apci2032_auto_attach(struct comedi_device *dev,
/* Initialize the digital output subdevice */ /* Initialize the digital output subdevice */
s = &dev->subdevices[0]; s = &dev->subdevices[0];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 32; s->n_chan = 32;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
......
...@@ -98,7 +98,7 @@ static int apci2200_auto_attach(struct comedi_device *dev, ...@@ -98,7 +98,7 @@ static int apci2200_auto_attach(struct comedi_device *dev,
/* Initialize the digital output subdevice */ /* Initialize the digital output subdevice */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 16; s->n_chan = 16;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
......
...@@ -192,7 +192,7 @@ static int apci3120_auto_attach(struct comedi_device *dev, ...@@ -192,7 +192,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[1]; s = &dev->subdevices[1];
if (this_board->has_ao) { if (this_board->has_ao) {
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = 8; s->n_chan = 8;
s->maxdata = 0x3fff; s->maxdata = 0x3fff;
s->range_table = &range_bipolar10; s->range_table = &range_bipolar10;
...@@ -218,7 +218,7 @@ static int apci3120_auto_attach(struct comedi_device *dev, ...@@ -218,7 +218,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
/* Digital Output subdevice */ /* Digital Output subdevice */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 4; s->n_chan = 4;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
...@@ -227,7 +227,7 @@ static int apci3120_auto_attach(struct comedi_device *dev, ...@@ -227,7 +227,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
/* Timer subdevice */ /* Timer subdevice */
s = &dev->subdevices[4]; s = &dev->subdevices[4];
s->type = COMEDI_SUBD_TIMER; s->type = COMEDI_SUBD_TIMER;
s->subdev_flags = SDF_WRITEABLE | SDF_READABLE; s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
s->n_chan = 1; s->n_chan = 1;
s->maxdata = 0x00ffffff; s->maxdata = 0x00ffffff;
s->insn_write = apci3120_write_insn_timer; s->insn_write = apci3120_write_insn_timer;
......
...@@ -357,7 +357,7 @@ static int apci3501_auto_attach(struct comedi_device *dev, ...@@ -357,7 +357,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[0]; s = &dev->subdevices[0];
if (ao_n_chan) { if (ao_n_chan) {
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = ao_n_chan; s->n_chan = ao_n_chan;
s->maxdata = 0x3fff; s->maxdata = 0x3fff;
s->range_table = &apci3501_ao_range; s->range_table = &apci3501_ao_range;
...@@ -383,7 +383,7 @@ static int apci3501_auto_attach(struct comedi_device *dev, ...@@ -383,7 +383,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
/* Initialize the digital output subdevice */ /* Initialize the digital output subdevice */
s = &dev->subdevices[2]; s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 2; s->n_chan = 2;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
...@@ -392,7 +392,7 @@ static int apci3501_auto_attach(struct comedi_device *dev, ...@@ -392,7 +392,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
/* Initialize the timer/watchdog subdevice */ /* Initialize the timer/watchdog subdevice */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_TIMER; s->type = COMEDI_SUBD_TIMER;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = 1; s->n_chan = 1;
s->maxdata = 0; s->maxdata = 0;
s->len_chanlist = 1; s->len_chanlist = 1;
......
...@@ -849,7 +849,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev, ...@@ -849,7 +849,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev,
if (board->has_ao) { if (board->has_ao) {
s = &dev->subdevices[subdev]; s = &dev->subdevices[subdev];
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = 4; s->n_chan = 4;
s->maxdata = 0x0fff; s->maxdata = 0x0fff;
s->range_table = &apci3xxx_ao_range; s->range_table = &apci3xxx_ao_range;
...@@ -880,7 +880,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev, ...@@ -880,7 +880,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev,
if (board->has_dig_out) { if (board->has_dig_out) {
s = &dev->subdevices[subdev]; s = &dev->subdevices[subdev];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 4; s->n_chan = 4;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
...@@ -893,7 +893,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev, ...@@ -893,7 +893,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev,
if (board->has_ttl_io) { if (board->has_ttl_io) {
s = &dev->subdevices[subdev]; s = &dev->subdevices[subdev];
s->type = COMEDI_SUBD_DIO; s->type = COMEDI_SUBD_DIO;
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE; s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
s->n_chan = 24; s->n_chan = 24;
s->maxdata = 1; s->maxdata = 1;
s->io_bits = 0xff; /* channels 0-7 are always outputs */ s->io_bits = 0xff; /* channels 0-7 are always outputs */
......
...@@ -134,7 +134,7 @@ int addi_watchdog_init(struct comedi_subdevice *s, unsigned long iobase) ...@@ -134,7 +134,7 @@ int addi_watchdog_init(struct comedi_subdevice *s, unsigned long iobase)
spriv->iobase = iobase; spriv->iobase = iobase;
s->type = COMEDI_SUBD_TIMER; s->type = COMEDI_SUBD_TIMER;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 1; s->n_chan = 1;
s->maxdata = 0xff; s->maxdata = 0xff;
s->insn_config = addi_watchdog_insn_config; s->insn_config = addi_watchdog_insn_config;
......
...@@ -241,7 +241,7 @@ static int pci1723_auto_attach(struct comedi_device *dev, ...@@ -241,7 +241,7 @@ static int pci1723_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[0]; s = &dev->subdevices[0];
dev->write_subdev = s; dev->write_subdev = s;
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = 8; s->n_chan = 8;
s->maxdata = 0xffff; s->maxdata = 0xffff;
s->len_chanlist = 8; s->len_chanlist = 8;
......
...@@ -265,7 +265,7 @@ static int c6xdigio_attach(struct comedi_device *dev, ...@@ -265,7 +265,7 @@ static int c6xdigio_attach(struct comedi_device *dev,
s = &dev->subdevices[0]; s = &dev->subdevices[0];
/* pwm output subdevice */ /* pwm output subdevice */
s->type = COMEDI_SUBD_PWM; s->type = COMEDI_SUBD_PWM;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 2; s->n_chan = 2;
s->maxdata = 500; s->maxdata = 500;
s->range_table = &range_unknown; s->range_table = &range_unknown;
......
...@@ -423,7 +423,7 @@ static int waveform_attach(struct comedi_device *dev, ...@@ -423,7 +423,7 @@ static int waveform_attach(struct comedi_device *dev,
dev->write_subdev = s; dev->write_subdev = s;
/* analog output subdevice (loopback) */ /* analog output subdevice (loopback) */
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND; s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
s->n_chan = N_CHANS; s->n_chan = N_CHANS;
s->maxdata = 0xffff; s->maxdata = 0xffff;
s->range_table = &waveform_ai_ranges; s->range_table = &waveform_ai_ranges;
......
...@@ -497,7 +497,7 @@ static int das6402_attach(struct comedi_device *dev, ...@@ -497,7 +497,7 @@ static int das6402_attach(struct comedi_device *dev,
/* Analog Output subdevice */ /* Analog Output subdevice */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 2; s->n_chan = 2;
s->maxdata = board->maxdata; s->maxdata = board->maxdata;
s->range_table = &das6402_ao_ranges; s->range_table = &das6402_ao_ranges;
...@@ -520,7 +520,7 @@ static int das6402_attach(struct comedi_device *dev, ...@@ -520,7 +520,7 @@ static int das6402_attach(struct comedi_device *dev,
/* Digital Input subdevice */ /* Digital Input subdevice */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 8; s->n_chan = 8;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
......
...@@ -804,7 +804,7 @@ static int dt9812_auto_attach(struct comedi_device *dev, ...@@ -804,7 +804,7 @@ static int dt9812_auto_attach(struct comedi_device *dev,
/* Digital Output subdevice */ /* Digital Output subdevice */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 8; s->n_chan = 8;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
...@@ -822,7 +822,7 @@ static int dt9812_auto_attach(struct comedi_device *dev, ...@@ -822,7 +822,7 @@ static int dt9812_auto_attach(struct comedi_device *dev,
/* Analog Output subdevice */ /* Analog Output subdevice */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 2; s->n_chan = 2;
s->maxdata = 0x0fff; s->maxdata = 0x0fff;
s->range_table = is_unipolar ? &range_unipolar2_5 : &range_bipolar10; s->range_table = is_unipolar ? &range_unipolar2_5 : &range_bipolar10;
......
...@@ -689,7 +689,7 @@ static int gsc_hpdi_auto_attach(struct comedi_device *dev, ...@@ -689,7 +689,7 @@ static int gsc_hpdi_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[0]; s = &dev->subdevices[0];
dev->read_subdev = s; dev->read_subdev = s;
s->type = COMEDI_SUBD_DIO; s->type = COMEDI_SUBD_DIO;
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE | SDF_LSAMPL | s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL |
SDF_CMD_READ; SDF_CMD_READ;
s->n_chan = 32; s->n_chan = 32;
s->len_chanlist = 32; s->len_chanlist = 32;
......
...@@ -1421,7 +1421,7 @@ static int me4000_auto_attach(struct comedi_device *dev, ...@@ -1421,7 +1421,7 @@ static int me4000_auto_attach(struct comedi_device *dev,
if (thisboard->ao_nchan) { if (thisboard->ao_nchan) {
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_COMMON | SDF_GROUND; s->subdev_flags = SDF_WRITABLE | SDF_COMMON | SDF_GROUND;
s->n_chan = thisboard->ao_nchan; s->n_chan = thisboard->ao_nchan;
s->maxdata = 0xFFFF; /* 16 bit DAC */ s->maxdata = 0xFFFF; /* 16 bit DAC */
s->range_table = &range_bipolar10; s->range_table = &range_bipolar10;
......
...@@ -511,7 +511,7 @@ static int me_auto_attach(struct comedi_device *dev, ...@@ -511,7 +511,7 @@ static int me_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[1]; s = &dev->subdevices[1];
if (board->has_ao) { if (board->has_ao) {
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_COMMON; s->subdev_flags = SDF_WRITABLE | SDF_COMMON;
s->n_chan = 4; s->n_chan = 4;
s->maxdata = 0x0fff; s->maxdata = 0x0fff;
s->len_chanlist = 4; s->len_chanlist = 4;
...@@ -528,7 +528,7 @@ static int me_auto_attach(struct comedi_device *dev, ...@@ -528,7 +528,7 @@ static int me_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[2]; s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DIO; s->type = COMEDI_SUBD_DIO;
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE; s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
s->n_chan = 32; s->n_chan = 32;
s->maxdata = 1; s->maxdata = 1;
s->len_chanlist = 32; s->len_chanlist = 32;
......
...@@ -561,7 +561,7 @@ static int ni6501_auto_attach(struct comedi_device *dev, ...@@ -561,7 +561,7 @@ static int ni6501_auto_attach(struct comedi_device *dev,
/* Counter subdevice */ /* Counter subdevice */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_COUNTER; s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE | SDF_LSAMPL; s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL;
s->n_chan = 1; s->n_chan = 1;
s->maxdata = 0xffffffff; s->maxdata = 0xffffffff;
s->insn_read = ni6501_cnt_insn_read; s->insn_read = ni6501_cnt_insn_read;
......
...@@ -734,7 +734,7 @@ static int daqp_auto_attach(struct comedi_device *dev, ...@@ -734,7 +734,7 @@ static int daqp_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 2; s->n_chan = 2;
s->maxdata = 0x0fff; s->maxdata = 0x0fff;
s->range_table = &range_bipolar5; s->range_table = &range_bipolar5;
...@@ -754,7 +754,7 @@ static int daqp_auto_attach(struct comedi_device *dev, ...@@ -754,7 +754,7 @@ static int daqp_auto_attach(struct comedi_device *dev,
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 1; s->n_chan = 1;
s->maxdata = 1; s->maxdata = 1;
s->insn_bits = daqp_do_insn_bits; s->insn_bits = daqp_do_insn_bits;
......
...@@ -742,7 +742,7 @@ static int serial2002_attach(struct comedi_device *dev, ...@@ -742,7 +742,7 @@ static int serial2002_attach(struct comedi_device *dev,
/* digital output subdevice */ /* digital output subdevice */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 0; s->n_chan = 0;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
...@@ -760,7 +760,7 @@ static int serial2002_attach(struct comedi_device *dev, ...@@ -760,7 +760,7 @@ static int serial2002_attach(struct comedi_device *dev,
/* analog output subdevice */ /* analog output subdevice */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 0; s->n_chan = 0;
s->maxdata = 1; s->maxdata = 1;
s->range_table = NULL; s->range_table = NULL;
......
...@@ -797,7 +797,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev) ...@@ -797,7 +797,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
/* Analog output subdevice */ /* Analog output subdevice */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND; s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
s->n_chan = boardinfo->ao_nchans; s->n_chan = boardinfo->ao_nchans;
s->maxdata = 0x00ff; s->maxdata = 0x00ff;
s->range_table = boardinfo->range; s->range_table = boardinfo->range;
...@@ -819,7 +819,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev) ...@@ -819,7 +819,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
/* Digital output subdevice */ /* Digital output subdevice */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = 8; s->n_chan = 8;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
...@@ -834,7 +834,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev) ...@@ -834,7 +834,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
s->insn_read = vmk80xx_cnt_insn_read; s->insn_read = vmk80xx_cnt_insn_read;
s->insn_config = vmk80xx_cnt_insn_config; s->insn_config = vmk80xx_cnt_insn_config;
if (devpriv->model == VMK8055_MODEL) { if (devpriv->model == VMK8055_MODEL) {
s->subdev_flags |= SDF_WRITEABLE; s->subdev_flags |= SDF_WRITABLE;
s->insn_write = vmk80xx_cnt_insn_write; s->insn_write = vmk80xx_cnt_insn_write;
} }
...@@ -842,7 +842,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev) ...@@ -842,7 +842,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
if (devpriv->model == VMK8061_MODEL) { if (devpriv->model == VMK8061_MODEL) {
s = &dev->subdevices[5]; s = &dev->subdevices[5];
s->type = COMEDI_SUBD_PWM; s->type = COMEDI_SUBD_PWM;
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE; s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
s->n_chan = boardinfo->pwm_nchans; s->n_chan = boardinfo->pwm_nchans;
s->maxdata = boardinfo->pwm_maxdata; s->maxdata = boardinfo->pwm_maxdata;
s->insn_read = vmk80xx_pwm_insn_read; s->insn_read = vmk80xx_pwm_insn_read;
......
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