Fix subdevice flags not having AREF capability
authorDavid Schleef <ds@schleef.org>
Thu, 21 Nov 2002 07:56:24 +0000 (07:56 +0000)
committerDavid Schleef <ds@schleef.org>
Thu, 21 Nov 2002 07:56:24 +0000 (07:56 +0000)
20 files changed:
comedi/drivers/amplc_pci230.c
comedi/drivers/cb_das16_cs.c
comedi/drivers/cb_pcimdas.c
comedi/drivers/comedi_rt_timer.c
comedi/drivers/daqboard2000.c
comedi/drivers/das6402.c
comedi/drivers/dt2801.c
comedi/drivers/dt2811.c
comedi/drivers/dt2814.c
comedi/drivers/dt3000.c
comedi/drivers/fl512.c
comedi/drivers/multiq3.c
comedi/drivers/ni_atmio16d.c
comedi/drivers/pcl711.c
comedi/drivers/pcmad.c
comedi/drivers/quatech_daqp_cs.c
comedi/drivers/rtd520.c
comedi/drivers/rti800.c
comedi/drivers/serial2002.c
comedi/drivers/skel.c

index be2b66c502ddb633c34a779d450f3f7ea5f8a51f..f3ba44a4c8655b0a0c12001227a461d51af554cf 100644 (file)
@@ -380,7 +380,7 @@ static int pci230_attach(comedi_device *dev,comedi_devconfig *it)
        s=dev->subdevices+0;
        /* analog input subdevice */
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_DIFF|SDF_GROUND;
        s->n_chan=thisboard->ai_chans;
        s->maxdata=(1<<thisboard->ai_bits)-1;
        s->range_table=&pci230_ai_range;
index eacb804cd1246444d3f879e8cf54113a1bfcc2ee..8a974dca912ca3bc91de6be599f7ebe9e93d9f03 100644 (file)
@@ -206,7 +206,7 @@ static int das16cs_attach(comedi_device *dev,comedi_devconfig *it)
        dev->read_subdev=s;
        /* analog input subdevice */
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_GROUND|SDF_DIFF;
        s->n_chan=16;
        s->maxdata=0xffff;
        s->range_table=&das16cs_ai_range;
index bfe416caa8860b66c8229d58e434a5cc744cba03..ede9f2dc7ba90304257c25a530b5fd087a0da202 100644 (file)
@@ -360,7 +360,7 @@ found:
        //dev->read_subdev=s;
        // analog input subdevice 
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_GROUND;
        s->n_chan=thisboard->ai_se_chans;
        s->maxdata=(1<<thisboard->ai_bits)-1;
        s->range_table=&range_unknown;
index d221edab72b11d36eb9f1100ac7d0d98a6f2e872..a327951320d11d555933d4ad1028a217cec124d3 100644 (file)
@@ -617,7 +617,7 @@ static int timer_attach(comedi_device *dev,comedi_devconfig *it)
        // input or output subdevice
        s=dev->subdevices+0;
        s->type=emul_s->type;
-       s->subdev_flags = emul_s->subdev_flags;
+       s->subdev_flags = emul_s->subdev_flags; /* SDF_GROUND (to fool check_driver) */
        s->n_chan=emul_s->n_chan;
        s->len_chanlist=1024;
        s->do_cmd=timer_cmd;
index 9828e28b0be318ec2e78dfdcef7b5e7f70f53031..ca8841b27ea266f66c46a5ac0e187e3437f34b37 100644 (file)
@@ -788,7 +788,7 @@ static int daqboard2000_attach(comedi_device *dev, comedi_devconfig *it)
   s = dev->subdevices + 0;
   /* ai subdevice */
   s->type = COMEDI_SUBD_AI;
-  s->subdev_flags = SDF_READABLE;
+  s->subdev_flags = SDF_READABLE|SDF_GROUND;
   s->n_chan = 24;
   s->maxdata = 0xffff;
   s->insn_read = daqboard2000_ai_insn_read;
index 6dd70607be9fdea1f067e5b9b31abf44cf4db0d6..90a2054923edb877fbddaa06c87b0631b2f09077 100644 (file)
@@ -338,7 +338,7 @@ static int das6402_attach(comedi_device *dev,comedi_devconfig *it)
        /* ai subdevice */
        s=dev->subdevices+0;
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_GROUND;
        s->n_chan=8;
        //s->trig[2]=das6402_ai_mode2;
        s->cancel=das6402_ai_cancel;
index be3ca4c06e5edbc87bc815fa9763c88e988cdc90..9cef9222aef535aec15b4e2895cfcedfd40433d0 100644 (file)
@@ -533,7 +533,7 @@ havetype:
        s=dev->subdevices+0;
        /* ai subdevice */
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_GROUND;
 #if 1
        s->n_chan=n_ai_chans;
 #else
index 948dca7776640ba03e61bb938ffe49926d2a48a6..9fbd65c8a90b29dd107e4b71d2d88854e903b3a4 100644 (file)
@@ -386,7 +386,7 @@ static int dt2811_attach(comedi_device * dev, comedi_devconfig * it)
        s = dev->subdevices + 0;
        /* initialize the ADC subdevice */
        s->type = COMEDI_SUBD_AI;
-       s->subdev_flags = SDF_READABLE;
+       s->subdev_flags = SDF_READABLE|SDF_GROUND;
        s->n_chan = devpriv->adc_mux == adc_diff ? 8 : 16;
        s->insn_read = dt2811_ai_insn;
        s->maxdata = 0xfff;
index c7ef753a162eecae097a5a45dc98f789254dcfbe..c9bc55d4da0b02dbbac08145224e23200df9432b 100644 (file)
@@ -299,7 +299,7 @@ static int dt2814_attach(comedi_device *dev,comedi_devconfig *it)
        s=dev->subdevices+0;
        dev->read_subdev = s;
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_GROUND;
        s->n_chan=16;                   /* XXX */
        s->len_chanlist=1;
        s->insn_read = dt2814_ai_insn_read;
index 06e64b31b11444498e9163cbf7bbbaddd6915f25..9b0c2c2153bd6b7efb8f2757ea5e1e583047275a 100644 (file)
@@ -789,7 +789,7 @@ static int dt3000_attach(comedi_device *dev,comedi_devconfig *it)
 
        /* ai subdevice */
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_GROUND|SDF_DIFF;
        s->n_chan=this_board->adchan;
        s->insn_read=dt3k_ai_insn;
        s->maxdata=(1<<this_board->adbits)-1;
index 7c9e356d1a778062e34d167fddaeb391e7123a49..aa7a474857fed6de95f7cdf3a11496ba7b8b12b4 100644 (file)
@@ -165,7 +165,7 @@ static int fl512_attach(comedi_device *dev,comedi_devconfig *it)
   /* Analog indput */
   s                = dev->subdevices+0;
   s->type          = COMEDI_SUBD_AI;         /* define subdevice as Analog In   */
-  s->subdev_flags  = SDF_READABLE;           /* you can read it from userspace  */
+  s->subdev_flags  = SDF_READABLE|SDF_GROUND;/* you can read it from userspace  */
   s->n_chan        = 16;                     /* Number of Analog input channels */
   s->maxdata       = 0x0fff;                 /* accept only 12 bits of data     */
   s->range_table   = &range_fl512;           /* device use one of the ranges    */
index 362db58b2fc8d829a2048eaac1e78e48d4981a72..79925ffd1e7e462ed1334e0a7541fca212f30d7b 100644 (file)
@@ -260,7 +260,7 @@ static int multiq3_attach(comedi_device * dev, comedi_devconfig * it)
       s = dev->subdevices + 0;
       /* ai subdevice */
       s->type = COMEDI_SUBD_AI;
-      s->subdev_flags = SDF_READABLE;
+      s->subdev_flags = SDF_READABLE|SDF_GROUND;
       s->n_chan = 8;
       s->insn_read = multiq3_ai_insn_read;
       s->maxdata = 0x1fff;
index bb0ec2766d3645f8d73597a6c0856778ddc7a207..68df12d072dbdf07adfbec0983f67e05cab12f95 100644 (file)
@@ -758,7 +758,7 @@ static int atmio16d_attach(comedi_device * dev, comedi_devconfig * it)
        dev->read_subdev = s;
        /* ai subdevice */
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_GROUND;
        s->n_chan=(devpriv->adc_mux? 16 : 8);
        s->len_chanlist=16;
        s->insn_read = atmio16d_ai_insn_read;
index 9c934736ef614dbce6503a189e560e01e9f73b48..baca557f96cdb68d640ea0febffc7a10b32dc35f 100644 (file)
@@ -535,7 +535,7 @@ static int pcl711_attach(comedi_device * dev, comedi_devconfig * it)
        s = dev->subdevices + 0;
        /* AI subdevice */
        s->type = COMEDI_SUBD_AI;
-       s->subdev_flags = SDF_READABLE;
+       s->subdev_flags = SDF_READABLE|SDF_GROUND;
        s->n_chan = this_board->n_aichan;
        s->maxdata = 0xfff;
        s->len_chanlist = 1;
index abe5b6caa7f2b974c1413fdea670ca9aac248055..2dfe32428e2f2a72e02f34456446efabe8cfe20e 100644 (file)
@@ -152,7 +152,7 @@ static int pcmad_attach(comedi_device *dev,comedi_devconfig *it)
 
        s=dev->subdevices+0;
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|AREF_GROUND;
        s->n_chan=16;                   /* XXX */
        s->len_chanlist=1;
        s->insn_read=pcmad_ai_insn_read;
index 556df5af69f11a43d4afe2513880f5c96c674a43..4be6d06bf699936870331123340e644d1b9104f1 100644 (file)
@@ -393,7 +393,7 @@ static int daqp_attach(comedi_device *dev, comedi_devconfig *it)
 
        s=dev->subdevices+0;
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|AREF_GROUND|AREF_DIFF;
        s->n_chan=8;
        s->maxdata=0xffff;
        s->range_table=&range_daqp_ai;
index df3154044180d5f0c8b93db89f2e7ae8bb4c30e0..26ff9f3eb22b8d3ce385a18898b905b3aaae0b8f 100644 (file)
@@ -875,7 +875,7 @@ static int rtd_attach (
     dev->read_subdev=s;
     /* analog input subdevice */
     s->type=COMEDI_SUBD_AI;
-    s->subdev_flags=SDF_READABLE;
+    s->subdev_flags=SDF_READABLE|SDF_GROUND|SDF_COMMON|SDF_DIFF;
     s->n_chan=thisboard->aiChans;
     s->maxdata=(1<<thisboard->aiBits)-1;
     if (thisboard->aiMaxGain <= 32) {
index 6db094033463530c17e52ab011906fe9d198701b..a00bf534fcdf1d15d4c1f7cce29af23cc80b69b7 100644 (file)
@@ -345,7 +345,7 @@ static int rti800_attach(comedi_device * dev, comedi_devconfig * it)
        s=dev->subdevices+0;
        /* ai subdevice */
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       s->subdev_flags=SDF_READABLE|SDF_GROUND;
        s->n_chan=(devpriv->adc_mux? 16 : 8);
        s->insn_read=rti800_ai_insn_read;
        s->maxdata=0xfff;
index b1ec5eb750b2a7a5aa2916acab60e1f9b898b7a1..92aa7d9ca38a64499187ee5a3060d7c6ef21be5c 100644 (file)
@@ -574,7 +574,7 @@ static int serial2002_attach(comedi_device *dev,comedi_devconfig *it)
   /* analog input subdevice */
   s=dev->subdevices+2;
   s->type = COMEDI_SUBD_AI;
-  s->subdev_flags = SDF_READABLE;
+  s->subdev_flags = SDF_READABLE|SDF_GROUND;
   s->n_chan = 0;
   s->maxdata = 1;
   s->range_table = 0;
index c0458a4f4376344ebef8e3f5a08aa1328be7b689..272fc5a11e84c7c95104b6c7ac84f1cd3fa3b2c0 100644 (file)
@@ -237,7 +237,8 @@ static int skel_attach(comedi_device *dev,comedi_devconfig *it)
        //dev->read_subdev=s;
        /* analog input subdevice */
        s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE;
+       /* we support single-ended (ground) and differential */
+       s->subdev_flags=SDF_READABLE|SDF_GROUND|SDF_DIFF;
        s->n_chan=thisboard->ai_chans;
        s->maxdata=(1<<thisboard->ai_bits)-1;
        s->range_table=&range_bipolar10;