This source file includes following definitions.
- das08_isa_attach
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 #include <linux/module.h>
32 #include "../comedidev.h"
33
34 #include "das08.h"
35
36 static const struct das08_board_struct das08_isa_boards[] = {
37 {
38
39 .name = "isa-das08",
40 .ai_nbits = 12,
41 .ai_pg = das08_pg_none,
42 .ai_encoding = das08_encode12,
43 .di_nchan = 3,
44 .do_nchan = 4,
45 .i8255_offset = 8,
46 .i8254_offset = 4,
47 .iosize = 16,
48 }, {
49
50 .name = "das08-pgm",
51 .ai_nbits = 12,
52 .ai_pg = das08_pgm,
53 .ai_encoding = das08_encode12,
54 .di_nchan = 3,
55 .do_nchan = 4,
56 .i8255_offset = 0,
57 .i8254_offset = 0x04,
58 .iosize = 16,
59 }, {
60
61 .name = "das08-pgh",
62 .ai_nbits = 12,
63 .ai_pg = das08_pgh,
64 .ai_encoding = das08_encode12,
65 .di_nchan = 3,
66 .do_nchan = 4,
67 .i8254_offset = 0x04,
68 .iosize = 16,
69 }, {
70
71 .name = "das08-pgl",
72 .ai_nbits = 12,
73 .ai_pg = das08_pgl,
74 .ai_encoding = das08_encode12,
75 .di_nchan = 3,
76 .do_nchan = 4,
77 .i8254_offset = 0x04,
78 .iosize = 16,
79 }, {
80
81 .name = "das08-aoh",
82 .ai_nbits = 12,
83 .ai_pg = das08_pgh,
84 .ai_encoding = das08_encode12,
85 .ao_nbits = 12,
86 .di_nchan = 3,
87 .do_nchan = 4,
88 .i8255_offset = 0x0c,
89 .i8254_offset = 0x04,
90 .iosize = 16,
91 }, {
92
93 .name = "das08-aol",
94 .ai_nbits = 12,
95 .ai_pg = das08_pgl,
96 .ai_encoding = das08_encode12,
97 .ao_nbits = 12,
98 .di_nchan = 3,
99 .do_nchan = 4,
100 .i8255_offset = 0x0c,
101 .i8254_offset = 0x04,
102 .iosize = 16,
103 }, {
104
105 .name = "das08-aom",
106 .ai_nbits = 12,
107 .ai_pg = das08_pgm,
108 .ai_encoding = das08_encode12,
109 .ao_nbits = 12,
110 .di_nchan = 3,
111 .do_nchan = 4,
112 .i8255_offset = 0x0c,
113 .i8254_offset = 0x04,
114 .iosize = 16,
115 }, {
116
117 .name = "das08/jr-ao",
118 .is_jr = true,
119 .ai_nbits = 12,
120 .ai_pg = das08_pg_none,
121 .ai_encoding = das08_encode12,
122 .ao_nbits = 12,
123 .di_nchan = 8,
124 .do_nchan = 8,
125 .iosize = 16,
126 }, {
127
128 .name = "das08jr-16-ao",
129 .is_jr = true,
130 .ai_nbits = 16,
131 .ai_pg = das08_pg_none,
132 .ai_encoding = das08_encode16,
133 .ao_nbits = 16,
134 .di_nchan = 8,
135 .do_nchan = 8,
136 .i8254_offset = 0x04,
137 .iosize = 16,
138 }, {
139 .name = "pc104-das08",
140 .ai_nbits = 12,
141 .ai_pg = das08_pg_none,
142 .ai_encoding = das08_encode12,
143 .di_nchan = 3,
144 .do_nchan = 4,
145 .i8254_offset = 4,
146 .iosize = 16,
147 }, {
148 .name = "das08jr/16",
149 .is_jr = true,
150 .ai_nbits = 16,
151 .ai_pg = das08_pg_none,
152 .ai_encoding = das08_encode16,
153 .di_nchan = 8,
154 .do_nchan = 8,
155 .iosize = 16,
156 },
157 };
158
159 static int das08_isa_attach(struct comedi_device *dev,
160 struct comedi_devconfig *it)
161 {
162 const struct das08_board_struct *board = dev->board_ptr;
163 struct das08_private_struct *devpriv;
164 int ret;
165
166 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
167 if (!devpriv)
168 return -ENOMEM;
169
170 ret = comedi_request_region(dev, it->options[0], board->iosize);
171 if (ret)
172 return ret;
173
174 return das08_common_attach(dev, dev->iobase);
175 }
176
177 static struct comedi_driver das08_isa_driver = {
178 .driver_name = "isa-das08",
179 .module = THIS_MODULE,
180 .attach = das08_isa_attach,
181 .detach = comedi_legacy_detach,
182 .board_name = &das08_isa_boards[0].name,
183 .num_names = ARRAY_SIZE(das08_isa_boards),
184 .offset = sizeof(das08_isa_boards[0]),
185 };
186 module_comedi_driver(das08_isa_driver);
187
188 MODULE_AUTHOR("Comedi http://www.comedi.org");
189 MODULE_DESCRIPTION("Comedi low-level driver");
190 MODULE_LICENSE("GPL");