Lines Matching +full:board +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0+
4 * Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
7 * ADDI-DATA GmbH
9 * D-77833 Ottersweier
10 * Tel: +19(0)7223/9493-0
11 * Fax: +49(0)7223/9493-92
12 * http://www.addi-data.com
13 * info@addi-data.com
22 * PCI bar 1 I/O Register map - Digital input/output
28 * PCI bar 2 I/O Register map - Watchdog (APCI-1516 and APCI-2016)
72 data[1] = inw(dev->iobase + APCI1516_DI_REG); in apci1516_di_insn_bits()
74 return insn->n; in apci1516_di_insn_bits()
82 s->state = inw(dev->iobase + APCI1516_DO_REG); in apci1516_do_insn_bits()
85 outw(s->state, dev->iobase + APCI1516_DO_REG); in apci1516_do_insn_bits()
87 data[1] = s->state; in apci1516_do_insn_bits()
89 return insn->n; in apci1516_do_insn_bits()
94 const struct apci1516_boardinfo *board = dev->board_ptr; in apci1516_reset() local
95 struct apci1516_private *devpriv = dev->private; in apci1516_reset()
97 if (!board->has_wdog) in apci1516_reset()
100 outw(0x0, dev->iobase + APCI1516_DO_REG); in apci1516_reset()
102 addi_watchdog_reset(devpriv->wdog_iobase); in apci1516_reset()
111 const struct apci1516_boardinfo *board = NULL; in apci1516_auto_attach() local
117 board = &apci1516_boardtypes[context]; in apci1516_auto_attach()
118 if (!board) in apci1516_auto_attach()
119 return -ENODEV; in apci1516_auto_attach()
120 dev->board_ptr = board; in apci1516_auto_attach()
121 dev->board_name = board->name; in apci1516_auto_attach()
125 return -ENOMEM; in apci1516_auto_attach()
131 dev->iobase = pci_resource_start(pcidev, 1); in apci1516_auto_attach()
132 devpriv->wdog_iobase = pci_resource_start(pcidev, 2); in apci1516_auto_attach()
139 s = &dev->subdevices[0]; in apci1516_auto_attach()
140 if (board->di_nchan) { in apci1516_auto_attach()
141 s->type = COMEDI_SUBD_DI; in apci1516_auto_attach()
142 s->subdev_flags = SDF_READABLE; in apci1516_auto_attach()
143 s->n_chan = board->di_nchan; in apci1516_auto_attach()
144 s->maxdata = 1; in apci1516_auto_attach()
145 s->range_table = &range_digital; in apci1516_auto_attach()
146 s->insn_bits = apci1516_di_insn_bits; in apci1516_auto_attach()
148 s->type = COMEDI_SUBD_UNUSED; in apci1516_auto_attach()
152 s = &dev->subdevices[1]; in apci1516_auto_attach()
153 if (board->do_nchan) { in apci1516_auto_attach()
154 s->type = COMEDI_SUBD_DO; in apci1516_auto_attach()
155 s->subdev_flags = SDF_WRITABLE; in apci1516_auto_attach()
156 s->n_chan = board->do_nchan; in apci1516_auto_attach()
157 s->maxdata = 1; in apci1516_auto_attach()
158 s->range_table = &range_digital; in apci1516_auto_attach()
159 s->insn_bits = apci1516_do_insn_bits; in apci1516_auto_attach()
161 s->type = COMEDI_SUBD_UNUSED; in apci1516_auto_attach()
165 s = &dev->subdevices[2]; in apci1516_auto_attach()
166 if (board->has_wdog) { in apci1516_auto_attach()
167 ret = addi_watchdog_init(s, devpriv->wdog_iobase); in apci1516_auto_attach()
171 s->type = COMEDI_SUBD_UNUSED; in apci1516_auto_attach()
180 if (dev->iobase) in apci1516_detach()
193 const struct pci_device_id *id) in apci1516_pci_probe() argument
195 return comedi_pci_auto_config(dev, &apci1516_driver, id->driver_data); in apci1516_pci_probe()
214 MODULE_DESCRIPTION("ADDI-DATA APCI-1016/1516/2016, 16 channel DIO boards");