Lines Matching +full:max +full:- +full:channels +full:- +full:clocked

1 // SPDX-License-Identifier: GPL-2.0+
6 * COMEDI - Linux Control and Measurement Device Interface
16 * Devices: [Keithley Metrabyte] DAS-16 (das-16), DAS-16G (das-16g),
17 * DAS-16F (das-16f), DAS-1201 (das-1201), DAS-1202 (das-1202),
18 * DAS-1401 (das-1401), DAS-1402 (das-1402), DAS-1601 (das-1601),
19 * DAS-1602 (das-1602),
20 * [ComputerBoards] PC104-DAS16/JR (pc104-das16jr),
21 * PC104-DAS16JR/16 (pc104-das16jr/16), CIO-DAS16 (cio-das16),
22 * CIO-DAS16F (cio-das16/f), CIO-DAS16/JR (cio-das16/jr),
23 * CIO-DAS16JR/16 (cio-das16jr/16), CIO-DAS1401/12 (cio-das1401/12),
24 * CIO-DAS1402/12 (cio-das1402/12), CIO-DAS1402/16 (cio-das1402/16),
25 * CIO-DAS1601/12 (cio-das1601/12), CIO-DAS1602/12 (cio-das1602/12),
26 * CIO-DAS1602/16 (cio-das1602/16), CIO-DAS16/330 (cio-das16/330)
28 * Updated: 2003-10-12
33 * [0] - base io address
34 * [1] - irq (does nothing, irq is not used anymore)
35 * [2] - dma channel (optional, required for comedi_command support)
36 * [3] - master clock speed in MHz (optional, 1 or 10, ignored if
38 * [4] - analog input range lowest voltage in microvolts (optional,
41 * [5] - analog input range highest voltage in microvolts (optional,
44 * [6] - analog output range lowest voltage in microvolts (optional)
45 * [7] - analog output range highest voltage in microvolts (optional)
56 * 4922.PDF (das-1400)
218 unsigned int ai_speed; /* max conversion speed in nanosec */
231 .name = "das-16",
241 .name = "das-16g",
251 .name = "das-16f",
261 .name = "cio-das16",
271 .name = "cio-das16/f",
281 .name = "cio-das16/jr",
288 .name = "pc104-das16jr",
295 .name = "cio-das16jr/16",
302 .name = "pc104-das16jr/16",
309 .name = "das-1201",
318 .name = "das-1202",
327 .name = "das-1401",
334 .name = "das-1402",
341 .name = "das-1601",
351 .name = "das-1602",
361 .name = "cio-das1401/12",
368 .name = "cio-das1402/12",
375 .name = "cio-das1402/16",
382 .name = "cio-das1601/12",
392 .name = "cio-das1602/12",
402 .name = "cio-das1602/16",
412 .name = "cio-das16/330",
447 struct das16_private_struct *devpriv = dev->private; in das16_ai_setup_dma()
448 struct comedi_isadma *dma = devpriv->dma; in das16_ai_setup_dma()
449 struct comedi_isadma_desc *desc = &dma->desc[dma->cur_dma]; in das16_ai_setup_dma()
450 unsigned int max_samples = comedi_bytes_to_samples(s, desc->maxsize); in das16_ai_setup_dma()
459 nsamples -= unread_samples; in das16_ai_setup_dma()
460 desc->size = comedi_samples_to_bytes(s, nsamples); in das16_ai_setup_dma()
467 struct das16_private_struct *devpriv = dev->private; in das16_interrupt()
468 struct comedi_subdevice *s = dev->read_subdev; in das16_interrupt()
469 struct comedi_async *async = s->async; in das16_interrupt()
470 struct comedi_cmd *cmd = &async->cmd; in das16_interrupt()
471 struct comedi_isadma *dma = devpriv->dma; in das16_interrupt()
472 struct comedi_isadma_desc *desc = &dma->desc[dma->cur_dma]; in das16_interrupt()
478 spin_lock_irqsave(&dev->spinlock, spin_flags); in das16_interrupt()
479 if (!(devpriv->ctrl_reg & DAS16_CTRL_DMAE)) { in das16_interrupt()
480 spin_unlock_irqrestore(&dev->spinlock, spin_flags); in das16_interrupt()
485 * The pc104-das16jr (at least) has problems if the dma in das16_interrupt()
489 residue = comedi_isadma_disable_on_sample(desc->chan, in das16_interrupt()
493 if (residue > desc->size) { in das16_interrupt()
494 dev_err(dev->class_dev, "residue > transfer size!\n"); in das16_interrupt()
495 async->events |= COMEDI_CB_ERROR; in das16_interrupt()
498 nbytes = desc->size - residue; in das16_interrupt()
504 dma->cur_dma = 1 - dma->cur_dma; in das16_interrupt()
508 spin_unlock_irqrestore(&dev->spinlock, spin_flags); in das16_interrupt()
510 comedi_buf_write_samples(s, desc->virt_addr, nsamples); in das16_interrupt()
512 if (cmd->stop_src == TRIG_COUNT && async->scans_done >= cmd->stop_arg) in das16_interrupt()
513 async->events |= COMEDI_CB_EOA; in das16_interrupt()
521 struct comedi_device *dev = devpriv->dev; in das16_timer_interrupt()
526 spin_lock_irqsave(&dev->spinlock, flags); in das16_timer_interrupt()
527 if (devpriv->timer_running) in das16_timer_interrupt()
528 mod_timer(&devpriv->timer, jiffies + timer_period()); in das16_timer_interrupt()
529 spin_unlock_irqrestore(&dev->spinlock, flags); in das16_timer_interrupt()
537 const struct das16_board *board = dev->board_ptr; in das16_ai_set_mux_range()
540 outb(first_chan | (last_chan << 4), dev->iobase + DAS16_MUX_REG); in das16_ai_set_mux_range()
543 if (board->ai_pg == das16_pg_none) in das16_ai_set_mux_range()
551 outb((das16_gainlists[board->ai_pg])[range], in das16_ai_set_mux_range()
552 dev->iobase + DAS16_GAIN_REG); in das16_ai_set_mux_range()
559 unsigned int chan0 = CR_CHAN(cmd->chanlist[0]); in das16_ai_check_chanlist()
560 unsigned int range0 = CR_RANGE(cmd->chanlist[0]); in das16_ai_check_chanlist()
563 for (i = 1; i < cmd->chanlist_len; i++) { in das16_ai_check_chanlist()
564 unsigned int chan = CR_CHAN(cmd->chanlist[i]); in das16_ai_check_chanlist()
565 unsigned int range = CR_RANGE(cmd->chanlist[i]); in das16_ai_check_chanlist()
567 if (chan != ((chan0 + i) % s->n_chan)) { in das16_ai_check_chanlist()
568 dev_dbg(dev->class_dev, in das16_ai_check_chanlist()
569 "entries in chanlist must be consecutive channels, counting upwards\n"); in das16_ai_check_chanlist()
570 return -EINVAL; in das16_ai_check_chanlist()
574 dev_dbg(dev->class_dev, in das16_ai_check_chanlist()
576 return -EINVAL; in das16_ai_check_chanlist()
586 const struct das16_board *board = dev->board_ptr; in das16_cmd_test()
587 struct das16_private_struct *devpriv = dev->private; in das16_cmd_test()
594 err |= comedi_check_trigger_src(&cmd->start_src, TRIG_NOW); in das16_cmd_test()
597 if (devpriv->can_burst) in das16_cmd_test()
599 err |= comedi_check_trigger_src(&cmd->scan_begin_src, trig_mask); in das16_cmd_test()
602 if (devpriv->can_burst) in das16_cmd_test()
604 err |= comedi_check_trigger_src(&cmd->convert_src, trig_mask); in das16_cmd_test()
606 err |= comedi_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT); in das16_cmd_test()
607 err |= comedi_check_trigger_src(&cmd->stop_src, TRIG_COUNT | TRIG_NONE); in das16_cmd_test()
614 err |= comedi_check_trigger_is_unique(cmd->scan_begin_src); in das16_cmd_test()
615 err |= comedi_check_trigger_is_unique(cmd->convert_src); in das16_cmd_test()
616 err |= comedi_check_trigger_is_unique(cmd->stop_src); in das16_cmd_test()
621 if (cmd->scan_begin_src == TRIG_FOLLOW && cmd->convert_src == TRIG_NOW) in das16_cmd_test()
622 err |= -EINVAL; in das16_cmd_test()
623 if (cmd->scan_begin_src != TRIG_FOLLOW && cmd->convert_src != TRIG_NOW) in das16_cmd_test()
624 err |= -EINVAL; in das16_cmd_test()
631 err |= comedi_check_trigger_arg_is(&cmd->start_arg, 0); in das16_cmd_test()
633 if (cmd->scan_begin_src == TRIG_FOLLOW) /* internal trigger */ in das16_cmd_test()
634 err |= comedi_check_trigger_arg_is(&cmd->scan_begin_arg, 0); in das16_cmd_test()
636 err |= comedi_check_trigger_arg_is(&cmd->scan_end_arg, in das16_cmd_test()
637 cmd->chanlist_len); in das16_cmd_test()
640 if (cmd->scan_begin_src == TRIG_TIMER) { in das16_cmd_test()
641 err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg, in das16_cmd_test()
642 board->ai_speed * in das16_cmd_test()
643 cmd->chanlist_len); in das16_cmd_test()
646 if (cmd->convert_src == TRIG_TIMER) { in das16_cmd_test()
647 err |= comedi_check_trigger_arg_min(&cmd->convert_arg, in das16_cmd_test()
648 board->ai_speed); in das16_cmd_test()
651 if (cmd->stop_src == TRIG_COUNT) in das16_cmd_test()
652 err |= comedi_check_trigger_arg_min(&cmd->stop_arg, 1); in das16_cmd_test()
654 err |= comedi_check_trigger_arg_is(&cmd->stop_arg, 0); in das16_cmd_test()
660 if (cmd->scan_begin_src == TRIG_TIMER) { in das16_cmd_test()
661 arg = cmd->scan_begin_arg; in das16_cmd_test()
662 comedi_8254_cascade_ns_to_timer(dev->pacer, &arg, cmd->flags); in das16_cmd_test()
663 err |= comedi_check_trigger_arg_is(&cmd->scan_begin_arg, arg); in das16_cmd_test()
665 if (cmd->convert_src == TRIG_TIMER) { in das16_cmd_test()
666 arg = cmd->convert_arg; in das16_cmd_test()
667 comedi_8254_cascade_ns_to_timer(dev->pacer, &arg, cmd->flags); in das16_cmd_test()
668 err |= comedi_check_trigger_arg_is(&cmd->convert_arg, arg); in das16_cmd_test()
674 if (cmd->chanlist && cmd->chanlist_len > 0) in das16_cmd_test()
686 comedi_8254_cascade_ns_to_timer(dev->pacer, &ns, flags); in das16_set_pacer()
687 comedi_8254_update_divisors(dev->pacer); in das16_set_pacer()
688 comedi_8254_pacer_enable(dev->pacer, 1, 2, true); in das16_set_pacer()
695 struct das16_private_struct *devpriv = dev->private; in das16_cmd_exec()
696 struct comedi_isadma *dma = devpriv->dma; in das16_cmd_exec()
697 struct comedi_async *async = s->async; in das16_cmd_exec()
698 struct comedi_cmd *cmd = &async->cmd; in das16_cmd_exec()
699 unsigned int first_chan = CR_CHAN(cmd->chanlist[0]); in das16_cmd_exec()
700 unsigned int last_chan = CR_CHAN(cmd->chanlist[cmd->chanlist_len - 1]); in das16_cmd_exec()
701 unsigned int range = CR_RANGE(cmd->chanlist[0]); in das16_cmd_exec()
705 if (cmd->flags & CMDF_PRIORITY) { in das16_cmd_exec()
706 dev_err(dev->class_dev, in das16_cmd_exec()
708 return -1; in das16_cmd_exec()
711 if (devpriv->can_burst) in das16_cmd_exec()
712 outb(DAS1600_CONV_DISABLE, dev->iobase + DAS1600_CONV_REG); in das16_cmd_exec()
718 cmd->convert_arg = das16_set_pacer(dev, cmd->convert_arg, cmd->flags); in das16_cmd_exec()
722 if (devpriv->can_burst) { in das16_cmd_exec()
723 if (cmd->convert_src == TRIG_NOW) { in das16_cmd_exec()
725 dev->iobase + DAS1600_BURST_REG); in das16_cmd_exec()
727 byte |= DAS16_PACER_BURST_LEN(cmd->chanlist_len - 1); in das16_cmd_exec()
729 outb(0, dev->iobase + DAS1600_BURST_REG); in das16_cmd_exec()
732 outb(byte, dev->iobase + DAS16_PACER_REG); in das16_cmd_exec()
735 dma->cur_dma = 0; in das16_cmd_exec()
739 spin_lock_irqsave(&dev->spinlock, flags); in das16_cmd_exec()
740 devpriv->timer_running = 1; in das16_cmd_exec()
741 devpriv->timer.expires = jiffies + timer_period(); in das16_cmd_exec()
742 add_timer(&devpriv->timer); in das16_cmd_exec()
745 devpriv->ctrl_reg &= ~(DAS16_CTRL_INTE | DAS16_CTRL_PACING_MASK); in das16_cmd_exec()
746 devpriv->ctrl_reg |= DAS16_CTRL_DMAE; in das16_cmd_exec()
747 if (cmd->convert_src == TRIG_EXT) in das16_cmd_exec()
748 devpriv->ctrl_reg |= DAS16_CTRL_EXT_PACER; in das16_cmd_exec()
750 devpriv->ctrl_reg |= DAS16_CTRL_INT_PACER; in das16_cmd_exec()
751 outb(devpriv->ctrl_reg, dev->iobase + DAS16_CTRL_REG); in das16_cmd_exec()
753 if (devpriv->can_burst) in das16_cmd_exec()
754 outb(0, dev->iobase + DAS1600_CONV_REG); in das16_cmd_exec()
755 spin_unlock_irqrestore(&dev->spinlock, flags); in das16_cmd_exec()
762 struct das16_private_struct *devpriv = dev->private; in das16_cancel()
763 struct comedi_isadma *dma = devpriv->dma; in das16_cancel()
766 spin_lock_irqsave(&dev->spinlock, flags); in das16_cancel()
768 /* disable interrupts, dma and pacer clocked conversions */ in das16_cancel()
769 devpriv->ctrl_reg &= ~(DAS16_CTRL_INTE | DAS16_CTRL_DMAE | in das16_cancel()
771 outb(devpriv->ctrl_reg, dev->iobase + DAS16_CTRL_REG); in das16_cancel()
773 comedi_isadma_disable(dma->chan); in das16_cancel()
776 if (devpriv->timer_running) { in das16_cancel()
777 devpriv->timer_running = 0; in das16_cancel()
778 del_timer(&devpriv->timer); in das16_cancel()
781 if (devpriv->can_burst) in das16_cancel()
782 outb(0, dev->iobase + DAS1600_BURST_REG); in das16_cancel()
784 spin_unlock_irqrestore(&dev->spinlock, flags); in das16_cancel()
801 if (s->maxdata == 0x0fff) in das16_ai_munge()
803 data[i] &= s->maxdata; in das16_ai_munge()
814 status = inb(dev->iobase + DAS16_STATUS_REG); in das16_ai_eoc()
817 return -EBUSY; in das16_ai_eoc()
825 unsigned int chan = CR_CHAN(insn->chanspec); in das16_ai_insn_read()
826 unsigned int range = CR_RANGE(insn->chanspec); in das16_ai_insn_read()
834 for (i = 0; i < insn->n; i++) { in das16_ai_insn_read()
836 outb_p(0, dev->iobase + DAS16_TRIG_REG); in das16_ai_insn_read()
842 val = inb(dev->iobase + DAS16_AI_MSB_REG) << 8; in das16_ai_insn_read()
843 val |= inb(dev->iobase + DAS16_AI_LSB_REG); in das16_ai_insn_read()
844 if (s->maxdata == 0x0fff) in das16_ai_insn_read()
846 val &= s->maxdata; in das16_ai_insn_read()
851 return insn->n; in das16_ai_insn_read()
859 unsigned int chan = CR_CHAN(insn->chanspec); in das16_ao_insn_write()
862 for (i = 0; i < insn->n; i++) { in das16_ao_insn_write()
865 s->readback[chan] = val; in das16_ao_insn_write()
869 outb(val & 0xff, dev->iobase + DAS16_AO_LSB_REG(chan)); in das16_ao_insn_write()
870 outb((val >> 8) & 0xff, dev->iobase + DAS16_AO_MSB_REG(chan)); in das16_ao_insn_write()
873 return insn->n; in das16_ao_insn_write()
881 data[1] = inb(dev->iobase + DAS16_DIO_REG) & 0xf; in das16_di_insn_bits()
883 return insn->n; in das16_di_insn_bits()
892 outb(s->state, dev->iobase + DAS16_DIO_REG); in das16_do_insn_bits()
894 data[1] = s->state; in das16_do_insn_bits()
896 return insn->n; in das16_do_insn_bits()
901 const struct das16_board *board = dev->board_ptr; in das16_probe()
905 diobits = inb(dev->iobase + DAS16_DIO_REG) & 0xf0; in das16_probe()
906 if (board->id != diobits) { in das16_probe()
907 dev_err(dev->class_dev, in das16_probe()
909 board->id, diobits); in das16_probe()
910 return -EINVAL; in das16_probe()
918 outb(0, dev->iobase + DAS16_STATUS_REG); in das16_reset()
919 outb(0, dev->iobase + DAS16_CTRL_REG); in das16_reset()
920 outb(0, dev->iobase + DAS16_PACER_REG); in das16_reset()
925 struct das16_private_struct *devpriv = dev->private; in das16_alloc_dma()
927 timer_setup(&devpriv->timer, das16_timer_interrupt, 0); in das16_alloc_dma()
929 /* only DMA channels 3 and 1 are valid */ in das16_alloc_dma()
934 devpriv->dma = comedi_isadma_alloc(dev, 2, dma_chan, dma_chan, in das16_alloc_dma()
940 struct das16_private_struct *devpriv = dev->private; in das16_free_dma()
943 del_timer_sync(&devpriv->timer); in das16_free_dma()
944 comedi_isadma_free(devpriv->dma); in das16_free_dma()
954 unsigned int min = it->options[4]; in das16_ai_range()
955 unsigned int max = it->options[5]; in das16_ai_range() local
957 /* get any user-defined input range */ in das16_ai_range()
958 if (pg_type == das16_pg_none && (min || max)) { in das16_ai_range()
962 /* allocate single-range range table */ in das16_ai_range()
969 lrange->length = 1; in das16_ai_range()
970 krange = lrange->range; in das16_ai_range()
971 krange->min = min; in das16_ai_range()
972 krange->max = max; in das16_ai_range()
973 krange->flags = UNIT_volt; in das16_ai_range()
988 unsigned int min = it->options[6]; in das16_ao_range()
989 unsigned int max = it->options[7]; in das16_ao_range() local
991 /* get any user-defined output range */ in das16_ao_range()
992 if (min || max) { in das16_ao_range()
996 /* allocate single-range range table */ in das16_ao_range()
1003 lrange->length = 1; in das16_ao_range()
1004 krange = lrange->range; in das16_ao_range()
1005 krange->min = min; in das16_ao_range()
1006 krange->max = max; in das16_ao_range()
1007 krange->flags = UNIT_volt; in das16_ao_range()
1017 const struct das16_board *board = dev->board_ptr; in das16_attach()
1025 if (it->options[3]) { in das16_attach()
1026 if (it->options[3] != 1 && it->options[3] != 10) { in das16_attach()
1027 dev_err(dev->class_dev, in das16_attach()
1029 return -EINVAL; in das16_attach()
1035 return -ENOMEM; in das16_attach()
1036 devpriv->dev = dev; in das16_attach()
1038 if (board->size < 0x400) { in das16_attach()
1039 ret = comedi_request_region(dev, it->options[0], board->size); in das16_attach()
1043 ret = comedi_request_region(dev, it->options[0], 0x10); in das16_attach()
1047 ret = __comedi_request_region(dev, dev->iobase + 0x400, in das16_attach()
1048 board->size & 0x3ff); in das16_attach()
1051 devpriv->extra_iobase = dev->iobase + 0x400; in das16_attach()
1052 devpriv->can_burst = 1; in das16_attach()
1057 return -EINVAL; in das16_attach()
1061 if (devpriv->can_burst) { in das16_attach()
1062 status = inb(dev->iobase + DAS1600_STATUS_REG); in das16_attach()
1066 if (it->options[3]) in das16_attach()
1067 osc_base = I8254_OSC_BASE_1MHZ / it->options[3]; in das16_attach()
1070 dev->pacer = comedi_8254_init(dev->iobase + DAS16_TIMER_BASE_REG, in das16_attach()
1072 if (!dev->pacer) in das16_attach()
1073 return -ENOMEM; in das16_attach()
1075 das16_alloc_dma(dev, it->options[2]); in das16_attach()
1077 ret = comedi_alloc_subdevices(dev, 4 + board->has_8255); in das16_attach()
1081 status = inb(dev->iobase + DAS16_STATUS_REG); in das16_attach()
1084 s = &dev->subdevices[0]; in das16_attach()
1085 s->type = COMEDI_SUBD_AI; in das16_attach()
1086 s->subdev_flags = SDF_READABLE; in das16_attach()
1088 s->subdev_flags |= SDF_GROUND; in das16_attach()
1089 s->n_chan = 16; in das16_attach()
1091 s->subdev_flags |= SDF_DIFF; in das16_attach()
1092 s->n_chan = 8; in das16_attach()
1094 s->len_chanlist = s->n_chan; in das16_attach()
1095 s->maxdata = board->ai_maxdata; in das16_attach()
1096 s->range_table = das16_ai_range(dev, s, it, board->ai_pg, status); in das16_attach()
1097 s->insn_read = das16_ai_insn_read; in das16_attach()
1098 if (devpriv->dma) { in das16_attach()
1099 dev->read_subdev = s; in das16_attach()
1100 s->subdev_flags |= SDF_CMD_READ; in das16_attach()
1101 s->do_cmdtest = das16_cmd_test; in das16_attach()
1102 s->do_cmd = das16_cmd_exec; in das16_attach()
1103 s->cancel = das16_cancel; in das16_attach()
1104 s->munge = das16_ai_munge; in das16_attach()
1108 s = &dev->subdevices[1]; in das16_attach()
1109 if (board->has_ao) { in das16_attach()
1110 s->type = COMEDI_SUBD_AO; in das16_attach()
1111 s->subdev_flags = SDF_WRITABLE; in das16_attach()
1112 s->n_chan = 2; in das16_attach()
1113 s->maxdata = 0x0fff; in das16_attach()
1114 s->range_table = das16_ao_range(dev, s, it); in das16_attach()
1115 s->insn_write = das16_ao_insn_write; in das16_attach()
1121 s->type = COMEDI_SUBD_UNUSED; in das16_attach()
1125 s = &dev->subdevices[2]; in das16_attach()
1126 s->type = COMEDI_SUBD_DI; in das16_attach()
1127 s->subdev_flags = SDF_READABLE; in das16_attach()
1128 s->n_chan = 4; in das16_attach()
1129 s->maxdata = 1; in das16_attach()
1130 s->range_table = &range_digital; in das16_attach()
1131 s->insn_bits = das16_di_insn_bits; in das16_attach()
1134 s = &dev->subdevices[3]; in das16_attach()
1135 s->type = COMEDI_SUBD_DO; in das16_attach()
1136 s->subdev_flags = SDF_WRITABLE; in das16_attach()
1137 s->n_chan = 4; in das16_attach()
1138 s->maxdata = 1; in das16_attach()
1139 s->range_table = &range_digital; in das16_attach()
1140 s->insn_bits = das16_do_insn_bits; in das16_attach()
1143 outb(s->state, dev->iobase + DAS16_DIO_REG); in das16_attach()
1146 if (board->has_8255) { in das16_attach()
1147 s = &dev->subdevices[4]; in das16_attach()
1148 ret = subdev_8255_init(dev, s, NULL, board->i8255_offset); in das16_attach()
1155 devpriv->ctrl_reg = DAS16_CTRL_IRQ(dev->irq); in das16_attach()
1156 outb(devpriv->ctrl_reg, dev->iobase + DAS16_CTRL_REG); in das16_attach()
1158 if (devpriv->can_burst) { in das16_attach()
1159 outb(DAS1600_ENABLE_VAL, dev->iobase + DAS1600_ENABLE_REG); in das16_attach()
1160 outb(0, dev->iobase + DAS1600_CONV_REG); in das16_attach()
1161 outb(0, dev->iobase + DAS1600_BURST_REG); in das16_attach()
1169 const struct das16_board *board = dev->board_ptr; in das16_detach()
1170 struct das16_private_struct *devpriv = dev->private; in das16_detach()
1173 if (dev->iobase) in das16_detach()
1177 if (devpriv->extra_iobase) in das16_detach()
1178 release_region(devpriv->extra_iobase, in das16_detach()
1179 board->size & 0x3ff); in das16_detach()