3 * comedi driver for DAS08 ISA/PC-104 boards
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.
23 * Description: DAS-08 ISA/PC-104 compatible boards
24 * Devices: (Keithley Metrabyte) DAS08 [isa-das08],
25 * (ComputerBoards) DAS08 [isa-das08]
26 * (ComputerBoards) DAS08-PGM [das08-pgm]
27 * (ComputerBoards) DAS08-PGH [das08-pgh]
28 * (ComputerBoards) DAS08-PGL [das08-pgl]
29 * (ComputerBoards) DAS08-AOH [das08-aoh]
30 * (ComputerBoards) DAS08-AOL [das08-aol]
31 * (ComputerBoards) DAS08-AOM [das08-aom]
32 * (ComputerBoards) DAS08/JR-AO [das08/jr-ao]
33 * (ComputerBoards) DAS08/JR-16-AO [das08jr-16-ao]
34 * (ComputerBoards) PC104-DAS08 [pc104-das08]
35 * (ComputerBoards) DAS08/JR/16 [das08jr/16]
36 * Author: Warren Jasper, ds, Frank Hess
37 * Updated: Fri, 31 Aug 2012 19:19:06 +0100
40 * This is the ISA/PC-104-specific support split off from the das08 driver.
42 * Configuration Options:
43 * [0] - base io address
46 #include <linux/module.h>
47 #include "../comedidev.h"
51 static const struct das08_board_struct das08_isa_boards[] = {
56 .ai_pg = das08_pg_none,
57 .ai_encoding = das08_encode12,
62 .iosize = 16, /* unchecked */
64 /* cio-das08pgx.pdf */
68 .ai_encoding = das08_encode12,
73 .iosize = 16, /* unchecked */
75 /* cio-das08pgx.pdf */
79 .ai_encoding = das08_encode12,
83 .iosize = 16, /* unchecked */
85 /* cio-das08pgx.pdf */
89 .ai_encoding = das08_encode12,
93 .iosize = 16, /* unchecked */
95 /* cio-das08_aox.pdf */
99 .ai_encoding = das08_encode12,
103 .i8255_offset = 0x0c,
104 .i8254_offset = 0x04,
105 .iosize = 16, /* unchecked */
107 /* cio-das08_aox.pdf */
111 .ai_encoding = das08_encode12,
115 .i8255_offset = 0x0c,
116 .i8254_offset = 0x04,
117 .iosize = 16, /* unchecked */
119 /* cio-das08_aox.pdf */
123 .ai_encoding = das08_encode12,
127 .i8255_offset = 0x0c,
128 .i8254_offset = 0x04,
129 .iosize = 16, /* unchecked */
131 /* cio-das08-jr-ao.pdf */
132 .name = "das08/jr-ao",
135 .ai_pg = das08_pg_none,
136 .ai_encoding = das08_encode12,
140 .iosize = 16, /* unchecked */
142 /* cio-das08jr-16-ao.pdf */
143 .name = "das08jr-16-ao",
146 .ai_pg = das08_pg_none,
147 .ai_encoding = das08_encode16,
151 .i8254_offset = 0x04,
152 .iosize = 16, /* unchecked */
154 .name = "pc104-das08",
156 .ai_pg = das08_pg_none,
157 .ai_encoding = das08_encode12,
161 .iosize = 16, /* unchecked */
163 .name = "das08jr/16",
166 .ai_pg = das08_pg_none,
167 .ai_encoding = das08_encode16,
170 .iosize = 16, /* unchecked */
174 static int das08_isa_attach(struct comedi_device *dev,
175 struct comedi_devconfig *it)
177 const struct das08_board_struct *thisboard = comedi_board(dev);
178 struct das08_private_struct *devpriv;
181 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
185 ret = comedi_request_region(dev, it->options[0], thisboard->iosize);
189 return das08_common_attach(dev, dev->iobase);
192 static struct comedi_driver das08_isa_driver = {
193 .driver_name = "isa-das08",
194 .module = THIS_MODULE,
195 .attach = das08_isa_attach,
196 .detach = comedi_legacy_detach,
197 .board_name = &das08_isa_boards[0].name,
198 .num_names = ARRAY_SIZE(das08_isa_boards),
199 .offset = sizeof(das08_isa_boards[0]),
201 module_comedi_driver(das08_isa_driver);
203 MODULE_AUTHOR("Comedi http://www.comedi.org");
204 MODULE_DESCRIPTION("Comedi low-level driver");
205 MODULE_LICENSE("GPL");