5 COMEDI - Linux Control and Measurement Device Interface
6 Copyright (C) 2000 David A. Schleef <ds@schleef.org>
7 Copyright (C) 2001,2002,2003 Frank Mori Hess <fmhess@users.sourceforge.net>
8 Copyright (C) 2004 Salvador E. Tropea <set@users.sf.net> <set@ieee.org>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *****************************************************************
29 Description: DAS-08 compatible boards
30 Author: Warren Jasper, ds, Frank Hess
31 Devices: [Keithley Metrabyte] DAS08 (isa-das08), [ComputerBoards] DAS08 (isa-das08),
32 DAS08-PGM (das08-pgm),
33 DAS08-PGH (das08-pgh), DAS08-PGL (das08-pgl), DAS08-AOH (das08-aoh),
34 DAS08-AOL (das08-aol), DAS08-AOM (das08-aom), DAS08/JR-AO (das08/jr-ao),
35 DAS08/JR-16-AO (das08jr-16-ao), PCI-DAS08 (das08),
36 PC104-DAS08 (pc104-das08), DAS08/JR/16 (das08jr/16)
39 This is a rewrite of the das08 and das08jr drivers.
41 Options (for ISA cards):
44 Options (for pci-das08):
48 The das08 driver doesn't support asynchronous commands, since
49 the cheap das08 hardware doesn't really support them. The
50 comedi_rt_timer driver can be used to emulate commands for this
54 #include <linux/comedidev.h>
56 #include <linux/delay.h>
58 #include "comedi_pci.h"
62 #define DRV_NAME "das08"
64 #define PCI_VENDOR_ID_COMPUTERBOARDS 0x1307
65 #define PCI_DEVICE_ID_PCIDAS08 0x29
66 #define PCIDAS08_SIZE 0x54
68 // pci configuration registers
70 #define INTR1_ENABLE 0x1
71 #define INTR1_HIGH_POLARITY 0x2
72 #define PCI_INTR_ENABLE 0x40
73 #define INTR1_EDGE_TRIG 0x100 // requires high polarity
76 #define CNTRL_INTR 0x4
83 0 a/d bits 0-3 start 8 bit
84 1 a/d bits 4-11 start 12 bit
85 2 eoc, ip1-3, irq, mux op1-4, inte, mux
90 requires hard-wiring for async ai
96 #define DAS08_TRIG_12BIT 1
97 #define DAS08_STATUS 2
98 #define DAS08_EOC (1<<7)
99 #define DAS08_IRQ (1<<3)
100 #define DAS08_IP(x) (((x)>>4)&0x7)
101 #define DAS08_CONTROL 2
102 #define DAS08_MUX_MASK 0x7
103 #define DAS08_MUX(x) ((x) & DAS08_MUX_MASK)
104 #define DAS08_INTE (1<<3)
105 #define DAS08_DO_MASK 0xf0
106 #define DAS08_OP(x) (((x) << 4) & DAS08_DO_MASK)
113 0 a/d bits 0-3 unused
114 1 a/d bits 4-11 start 12 bit
124 #define DAS08JR_DIO 3
125 #define DAS08JR_AO_LSB(x) ((x)?6:4)
126 #define DAS08JR_AO_MSB(x) ((x)?7:5)
135 0 a/d bits 0-3 start 8 bit
136 1 a/d bits 4-11 start 12 bit
137 2 eoc, ip1-3, irq, mux op1-4, inte, mux
138 3 mux, gain status gain control
148 #define DAS08AO_GAIN_CONTROL 3
149 #define DAS08AO_GAIN_STATUS 3
151 #define DAS08AO_AO_LSB(x) ((x)?0xa:8)
152 #define DAS08AO_AO_MSB(x) ((x)?0xb:9)
153 #define DAS08AO_AO_UPDATE 8
155 /* gainlist same as _pgx_ below */
157 static int das08_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
158 comedi_insn * insn, lsampl_t * data);
159 static int das08_di_rbits(comedi_device * dev, comedi_subdevice * s,
160 comedi_insn * insn, lsampl_t * data);
161 static int das08_do_wbits(comedi_device * dev, comedi_subdevice * s,
162 comedi_insn * insn, lsampl_t * data);
163 static int das08jr_di_rbits(comedi_device * dev, comedi_subdevice * s,
164 comedi_insn * insn, lsampl_t * data);
165 static int das08jr_do_wbits(comedi_device * dev, comedi_subdevice * s,
166 comedi_insn * insn, lsampl_t * data);
167 static int das08jr_ao_winsn(comedi_device * dev, comedi_subdevice * s,
168 comedi_insn * insn, lsampl_t * data);
169 static int das08ao_ao_winsn(comedi_device * dev, comedi_subdevice * s,
170 comedi_insn * insn, lsampl_t * data);
171 static void i8254_set_mode_low(unsigned int base, int channel,
174 static const comedi_lrange range_das08_pgl = { 9, {
186 static const comedi_lrange range_das08_pgh = { 12, {
201 static const comedi_lrange range_das08_pgm = { 9, {
217 0 a/d bits 0-3 unused
218 1 a/d bits 4-11 start 12 bit
228 static const comedi_lrange *const das08_ai_lranges[] = {
236 static const int das08_pgh_gainlist[] =
237 { 8, 0, 10, 2, 12, 4, 14, 6, 1, 3, 5, 7 };
238 static const int das08_pgl_gainlist[] = { 8, 0, 2, 4, 6, 1, 3, 5, 7 };
239 static const int das08_pgm_gainlist[] = { 8, 0, 10, 12, 14, 9, 11, 13, 15 };
241 static const int *const das08_gainlists[] = {
249 static const struct das08_board_struct das08_boards[] = {
251 name: "isa-das08", // cio-das08.pdf
255 ai_pg: das08_pg_none,
256 ai_encoding:das08_encode12,
264 iosize: 16, // unchecked
267 name: "das08-pgm", // cio-das08pgx.pdf
272 ai_encoding:das08_encode12,
279 iosize: 16, // unchecked
282 name: "das08-pgh", // cio-das08pgx.pdf
287 ai_encoding:das08_encode12,
294 iosize: 16, // unchecked
297 name: "das08-pgl", // cio-das08pgx.pdf
302 ai_encoding:das08_encode12,
309 iosize: 16, // unchecked
312 name: "das08-aoh", // cio-das08_aox.pdf
317 ai_encoding:das08_encode12,
318 ao: das08ao_ao_winsn, // 8
325 iosize: 16, // unchecked
328 name: "das08-aol", // cio-das08_aox.pdf
333 ai_encoding:das08_encode12,
334 ao: das08ao_ao_winsn, // 8
341 iosize: 16, // unchecked
344 name: "das08-aom", // cio-das08_aox.pdf
349 ai_encoding:das08_encode12,
350 ao: das08ao_ao_winsn, // 8
357 iosize: 16, // unchecked
360 name: "das08/jr-ao", // cio-das08-jr-ao.pdf
364 ai_pg: das08_pg_none,
365 ai_encoding:das08_encode12,
366 ao: das08jr_ao_winsn,
368 di: das08jr_di_rbits,
369 do_: das08jr_do_wbits,
373 iosize: 16, // unchecked
376 name: "das08jr-16-ao", // cio-das08jr-16-ao.pdf
380 ai_pg: das08_pg_none,
381 ai_encoding:das08_encode16,
382 ao: das08jr_ao_winsn,
384 di: das08jr_di_rbits,
385 do_: das08jr_do_wbits,
389 iosize: 16, // unchecked
391 #ifdef CONFIG_COMEDI_PCI
393 name: "das08", // pci-das08
394 id: PCI_DEVICE_ID_PCIDAS08,
398 ai_pg: das08_bipolar5,
399 ai_encoding:das08_encode12,
415 ai_pg: das08_pg_none,
416 ai_encoding:das08_encode12,
424 iosize: 16, // unchecked
439 ai_pg: das08_pg_none,
440 ai_encoding:das08_encode16,
443 di: das08jr_di_rbits,
444 do_: das08jr_do_wbits,
448 iosize: 16, // unchecked
452 name: "das48-pga", // cio-das48-pga.pdf
455 name: "das08-pga-g2", // a KM board
460 #ifdef CONFIG_COMEDI_PCMCIA
461 struct das08_board_struct das08_cs_boards[NUM_DAS08_CS_BOARDS] = {
468 ai_pg: das08_bipolar5,
469 ai_encoding:das08_pcm_encode12,
479 // duplicate so driver name can be used also
486 ai_pg: das08_bipolar5,
487 ai_encoding:das08_pcm_encode12,
500 #ifdef CONFIG_COMEDI_PCI
501 static DEFINE_PCI_DEVICE_TABLE(das08_pci_table) = {
502 {PCI_VENDOR_ID_COMPUTERBOARDS, PCI_DEVICE_ID_PCIDAS08, PCI_ANY_ID,
503 PCI_ANY_ID, 0, 0, 0},
507 MODULE_DEVICE_TABLE(pci, das08_pci_table);
510 #define devpriv ((struct das08_private_struct *)dev->private)
511 #define thisboard ((const struct das08_board_struct *)dev->board_ptr)
513 #define TIMEOUT 100000
515 static int das08_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
516 comedi_insn * insn, lsampl_t * data)
523 chan = CR_CHAN(insn->chanspec);
524 range = CR_RANGE(insn->chanspec);
527 inb(dev->iobase + DAS08_LSB);
528 inb(dev->iobase + DAS08_MSB);
530 /* set multiplexer */
531 spin_lock(&dev->spinlock); // lock to prevent race with digital output
532 devpriv->do_mux_bits &= ~DAS08_MUX_MASK;
533 devpriv->do_mux_bits |= DAS08_MUX(chan);
534 outb(devpriv->do_mux_bits, dev->iobase + DAS08_CONTROL);
535 spin_unlock(&dev->spinlock);
537 if (s->range_table->length > 1) {
539 range = CR_RANGE(insn->chanspec);
540 outb(devpriv->pg_gainlist[range],
541 dev->iobase + DAS08AO_GAIN_CONTROL);
544 for (n = 0; n < insn->n; n++) {
545 /* clear over-range bits for 16-bit boards */
546 if (thisboard->ai_nbits == 16)
547 if (inb(dev->iobase + DAS08_MSB) & 0x80)
548 rt_printk("das08: over-range\n");
550 /* trigger conversion */
551 outb_p(0, dev->iobase + DAS08_TRIG_12BIT);
553 for (i = 0; i < TIMEOUT; i++) {
554 if (!(inb(dev->iobase + DAS08_STATUS) & DAS08_EOC))
558 rt_printk("das08: timeout\n");
561 msb = inb(dev->iobase + DAS08_MSB);
562 lsb = inb(dev->iobase + DAS08_LSB);
563 if (thisboard->ai_encoding == das08_encode12) {
564 data[n] = (lsb >> 4) | (msb << 4);
565 } else if (thisboard->ai_encoding == das08_pcm_encode12) {
566 data[n] = (msb << 8) + lsb;
567 } else if (thisboard->ai_encoding == das08_encode16) {
568 /* FPOS 16-bit boards are sign-magnitude */
570 data[n] = (1 << 15) | lsb | ((msb & 0x7f) << 8);
572 data[n] = (1 << 15) - (lsb | (msb & 0x7f) << 8);
574 comedi_error(dev, "bug! unknown ai encoding");
582 static int das08_di_rbits(comedi_device * dev, comedi_subdevice * s,
583 comedi_insn * insn, lsampl_t * data)
586 data[1] = DAS08_IP(inb(dev->iobase + DAS08_STATUS));
591 static int das08_do_wbits(comedi_device * dev, comedi_subdevice * s,
592 comedi_insn * insn, lsampl_t * data)
596 // get current settings of digital output lines
597 wbits = (devpriv->do_mux_bits >> 4) & 0xf;
598 // null bits we are going to set
600 // set new bit values
601 wbits |= data[0] & data[1];
602 // remember digital output bits
603 spin_lock(&dev->spinlock); // prevent race with setting of analog input mux
604 devpriv->do_mux_bits &= ~DAS08_DO_MASK;
605 devpriv->do_mux_bits |= DAS08_OP(wbits);
606 outb(devpriv->do_mux_bits, dev->iobase + DAS08_CONTROL);
607 spin_unlock(&dev->spinlock);
614 static int das08jr_di_rbits(comedi_device * dev, comedi_subdevice * s,
615 comedi_insn * insn, lsampl_t * data)
618 data[1] = inb(dev->iobase + DAS08JR_DIO);
623 static int das08jr_do_wbits(comedi_device * dev, comedi_subdevice * s,
624 comedi_insn * insn, lsampl_t * data)
626 // null bits we are going to set
627 devpriv->do_bits &= ~data[0];
628 // set new bit values
629 devpriv->do_bits |= data[0] & data[1];
630 outb(devpriv->do_bits, dev->iobase + DAS08JR_DIO);
632 data[1] = devpriv->do_bits;
637 static int das08jr_ao_winsn(comedi_device * dev, comedi_subdevice * s,
638 comedi_insn * insn, lsampl_t * data)
644 chan = CR_CHAN(insn->chanspec);
646 for (n = 0; n < insn->n; n++) {
647 lsb = data[n] & 0xff;
648 msb = (data[n] >> 8) & 0xf;
650 outb(lsb, dev->iobase + devpriv->ao_offset_lsb[chan]);
651 outb(msb, dev->iobase + devpriv->ao_offset_msb[chan]);
653 outb(lsb, dev->iobase + DAS08JR_AO_LSB(chan));
654 outb(msb, dev->iobase + DAS08JR_AO_MSB(chan));
658 inb(dev->iobase + DAS08JR_DIO);
666 * The -aox boards have the DACs at a different offset and use
667 * a different method to force an update.
670 static int das08ao_ao_winsn(comedi_device * dev, comedi_subdevice * s,
671 comedi_insn * insn, lsampl_t * data)
677 chan = CR_CHAN(insn->chanspec);
679 for (n = 0; n < insn->n; n++) {
680 lsb = data[n] & 0xff;
681 msb = (data[n] >> 8) & 0xf;
683 outb(lsb, dev->iobase + devpriv->ao_offset_lsb[chan]);
684 outb(msb, dev->iobase + devpriv->ao_offset_msb[chan]);
686 outb(lsb, dev->iobase + DAS08AO_AO_LSB(chan));
687 outb(msb, dev->iobase + DAS08AO_AO_MSB(chan));
691 inb(dev->iobase + DAS08AO_AO_UPDATE);
697 static unsigned int i8254_read_channel_low(unsigned int base, int chan)
699 unsigned int msb, lsb;
701 /* The following instructions must be in order.
702 We must avoid other process reading the counter's value in the
704 The spin_lock isn't needed since ioctl calls grab the big kernel
705 lock automatically */
707 outb(chan << 6, base + I8254_CTRL);
711 /*spin_unlock(sp); */
713 return lsb | (msb << 8);
716 static void i8254_write_channel_low(unsigned int base, int chan,
719 unsigned int msb, lsb;
724 /* write lsb, then msb */
726 /* See comments in i8254_read_channel_low */
730 /*spin_unlock(sp); */
733 static unsigned int i8254_read_channel(struct i8254_struct *st, int channel)
735 int chan = st->logic2phys[channel];
737 return i8254_read_channel_low(st->iobase, chan);
740 static void i8254_write_channel(struct i8254_struct *st, int channel,
743 int chan = st->logic2phys[channel];
745 i8254_write_channel_low(st->iobase, chan, value);
748 static void i8254_initialize(struct i8254_struct *st)
751 for (i = 0; i < 3; ++i)
752 i8254_set_mode_low(st->iobase, i, st->mode[i]);
755 static void i8254_set_mode_low(unsigned int base, int channel,
758 outb((channel << 6) | 0x30 | (mode & 0x0F), base + I8254_CTRL);
761 static void i8254_set_mode(struct i8254_struct *st, int channel,
764 int chan = st->logic2phys[channel];
766 st->mode[chan] = mode;
767 return i8254_set_mode_low(st->iobase, chan, mode);
770 static unsigned int i8254_read_status_low(unsigned int base, int channel)
772 outb(0xE0 | (2 << channel), base + I8254_CTRL);
773 return inb(base + channel);
776 static unsigned int i8254_read_status(struct i8254_struct *st, int channel)
778 int chan = st->logic2phys[channel];
780 return i8254_read_status_low(st->iobase, chan);
783 static int das08_counter_read(comedi_device * dev, comedi_subdevice * s,
784 comedi_insn * insn, lsampl_t * data)
786 int chan = insn->chanspec;
791 //printk("Reading counter channel %d ",chan);
792 data[0] = i8254_read_channel(&devpriv->i8254, chan);
793 //printk("=> 0x%08X\n",data[0]);
798 static int das08_counter_write(comedi_device * dev, comedi_subdevice * s,
799 comedi_insn * insn, lsampl_t * data)
801 int chan = insn->chanspec;
806 //printk("Writing counter channel %d with 0x%04X\n",chan,data[0]);
807 i8254_write_channel(&devpriv->i8254, chan, data[0]);
812 static int das08_counter_config(comedi_device * dev, comedi_subdevice * s,
813 comedi_insn * insn, lsampl_t * data)
815 int chan = insn->chanspec;
821 case INSN_CONFIG_SET_COUNTER_MODE:
822 i8254_set_mode(&devpriv->i8254, chan, data[1]);
824 case INSN_CONFIG_8254_READ_STATUS:
825 data[1] = i8254_read_status(&devpriv->i8254, chan);
834 static int das08_attach(comedi_device * dev, comedi_devconfig * it);
836 static comedi_driver driver_das08 = {
837 driver_name: DRV_NAME,
840 detach:das08_common_detach,
841 board_name:&das08_boards[0].name,
842 num_names:sizeof(das08_boards) /
843 sizeof(struct das08_board_struct),
844 offset:sizeof(struct das08_board_struct),
847 int das08_common_attach(comedi_device * dev, unsigned long iobase)
852 // allocate ioports for non-pcmcia, non-pci boards
853 if ((thisboard->bustype != pcmcia) && (thisboard->bustype != pci)) {
854 printk(" iobase 0x%lx\n", iobase);
855 if (!request_region(iobase, thisboard->iosize, DRV_NAME)) {
856 printk(" I/O port conflict\n");
860 dev->iobase = iobase;
862 dev->board_name = thisboard->name;
864 if ((ret = alloc_subdevices(dev, 6)) < 0)
867 s = dev->subdevices + 0;
870 s->type = COMEDI_SUBD_AI;
871 /* XXX some boards actually have differential inputs instead of single ended.
872 * The driver does nothing with arefs though, so it's no big deal. */
873 s->subdev_flags = SDF_READABLE | SDF_GROUND;
875 s->maxdata = (1 << thisboard->ai_nbits) - 1;
876 s->range_table = das08_ai_lranges[thisboard->ai_pg];
877 s->insn_read = thisboard->ai;
878 devpriv->pg_gainlist = das08_gainlists[thisboard->ai_pg];
880 s->type = COMEDI_SUBD_UNUSED;
883 s = dev->subdevices + 1;
886 s->type = COMEDI_SUBD_AO;
887 // XXX lacks read-back insn
888 s->subdev_flags = SDF_WRITABLE;
890 s->maxdata = (1 << thisboard->ao_nbits) - 1;
891 s->range_table = &range_bipolar5;
892 s->insn_write = thisboard->ao;
894 s->type = COMEDI_SUBD_UNUSED;
897 s = dev->subdevices + 2;
900 s->type = COMEDI_SUBD_DI;
901 s->subdev_flags = SDF_READABLE;
902 s->n_chan = (thisboard->di == das08_di_rbits) ? 3 : 8;
904 s->range_table = &range_digital;
905 s->insn_bits = thisboard->di;
907 s->type = COMEDI_SUBD_UNUSED;
910 s = dev->subdevices + 3;
912 if (thisboard->do_) {
913 s->type = COMEDI_SUBD_DO;
914 s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
915 s->n_chan = thisboard->do_nchan;
917 s->range_table = &range_digital;
918 s->insn_bits = thisboard->do_;
920 s->type = COMEDI_SUBD_UNUSED;
923 s = dev->subdevices + 4;
925 if (thisboard->i8255_offset != 0) {
926 subdev_8255_init(dev, s, NULL, (unsigned long)(dev->iobase +
927 thisboard->i8255_offset));
929 s->type = COMEDI_SUBD_UNUSED;
932 s = dev->subdevices + 5;
934 if (thisboard->i8254_offset != 0) {
935 s->type = COMEDI_SUBD_COUNTER;
936 s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
939 s->insn_read = das08_counter_read;
940 s->insn_write = das08_counter_write;
941 s->insn_config = das08_counter_config;
942 /* Set-up the 8254 structure */
943 devpriv->i8254.channels = 3;
944 devpriv->i8254.logic2phys[0] = 0;
945 devpriv->i8254.logic2phys[1] = 1;
946 devpriv->i8254.logic2phys[2] = 2;
947 devpriv->i8254.iobase = iobase + thisboard->i8254_offset;
948 devpriv->i8254.mode[0] =
949 devpriv->i8254.mode[1] =
950 devpriv->i8254.mode[2] = I8254_MODE0 | I8254_BINARY;
951 i8254_initialize(&devpriv->i8254);
953 s->type = COMEDI_SUBD_UNUSED;
959 static int das08_attach(comedi_device * dev, comedi_devconfig * it)
962 unsigned long iobase;
963 #ifdef CONFIG_COMEDI_PCI
964 unsigned long pci_iobase = 0;
965 struct pci_dev *pdev;
968 if ((ret = alloc_private(dev, sizeof(struct das08_private_struct))) < 0)
971 printk("comedi%d: das08: ", dev->minor);
972 // deal with a pci board
973 if (thisboard->bustype == pci) {
974 #ifdef CONFIG_COMEDI_PCI
975 if (it->options[0] || it->options[1]) {
976 printk("bus %i slot %i ",
977 it->options[0], it->options[1]);
981 for (pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL);
983 pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) {
984 if (pdev->vendor == PCI_VENDOR_ID_COMPUTERBOARDS
985 && pdev->device == PCI_DEVICE_ID_PCIDAS08) {
986 if (it->options[0] || it->options[1]) {
987 if (pdev->bus->number == it->options[0]
988 && PCI_SLOT(pdev->devfn) ==
998 printk("No pci das08 cards found\n");
1001 devpriv->pdev = pdev;
1002 // enable PCI device and reserve I/O spaces
1003 if (comedi_pci_enable(pdev, DRV_NAME)) {
1004 printk(" Error enabling PCI device and requesting regions\n");
1007 // read base addresses
1008 pci_iobase = pci_resource_start(pdev, 1);
1009 iobase = pci_resource_start(pdev, 2);
1010 printk("pcibase 0x%lx iobase 0x%lx\n", pci_iobase, iobase);
1011 devpriv->pci_iobase = pci_iobase;
1013 /* We could enable to pci-das08's interrupt here to make it possible
1014 * to do timed input in this driver, but there is little point since
1015 * conversions would have to be started by the interrupt handler
1016 * so you might as well use comedi_rt_timer to emulate commands
1018 /* set source of interrupt trigger to counter2 output */
1019 outb(CNTRL_INTR | CNTRL_DIR, pci_iobase + CNTRL);
1020 /* Enable local interrupt 1 and pci interrupt */
1021 outw(INTR1_ENABLE | PCI_INTR_ENABLE, pci_iobase + INTCSR);
1023 #else /* CONFIG_COMEDI_PCI */
1024 printk("this driver has not been built with PCI support.\n");
1026 #endif /* CONFIG_COMEDI_PCI */
1028 iobase = it->options[0];
1032 return das08_common_attach(dev, iobase);
1035 int das08_common_detach(comedi_device * dev)
1037 printk(KERN_INFO "comedi%d: das08: remove\n", dev->minor);
1039 if (dev->subdevices)
1040 subdev_8255_cleanup(dev, dev->subdevices + 4);
1042 // deallocate ioports for non-pcmcia, non-pci boards
1043 if ((thisboard->bustype != pcmcia) && (thisboard->bustype != pci)) {
1045 release_region(dev->iobase, thisboard->iosize);
1048 #ifdef CONFIG_COMEDI_PCI
1050 if (devpriv->pdev) {
1051 if (devpriv->pci_iobase) {
1052 comedi_pci_disable(devpriv->pdev);
1054 pci_dev_put(devpriv->pdev);
1062 #ifdef CONFIG_COMEDI_PCI
1063 COMEDI_PCI_INITCLEANUP(driver_das08, das08_pci_table);
1065 COMEDI_INITCLEANUP(driver_das08);
1068 EXPORT_SYMBOL_GPL(das08_common_attach);
1069 EXPORT_SYMBOL_GPL(das08_common_detach);
1070 #ifdef CONFIG_COMEDI_PCMCIA
1071 EXPORT_SYMBOL_GPL(das08_cs_boards);