Lines Matching +full:port +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (c) 1999-2001 Vojtech Pavlik
8 * NS558 based standard IBM game port driver for Linux
50 struct gameport *port; in ns558_isa_probe() local
56 if (!request_region(io, 1, "ns558-isa")) in ns558_isa_probe()
57 return -EBUSY; in ns558_isa_probe()
60 * We must not be able to write arbitrary values to the port. in ns558_isa_probe()
69 return -ENODEV; in ns558_isa_probe()
80 return -ENODEV; in ns558_isa_probe()
92 return -ENODEV; in ns558_isa_probe()
95 * And now find the number of mirrors of the port. in ns558_isa_probe()
100 release_region(io & (-1 << (i - 1)), (1 << (i - 1))); in ns558_isa_probe()
102 if (!request_region(io & (-1 << i), (1 << i), "ns558-isa")) in ns558_isa_probe()
105 outb(0xff, io & (-1 << i)); in ns558_isa_probe()
107 if (inb(io & (-1 << i)) != inb((io & (-1 << i)) + (1 << i) - 1)) b++; in ns558_isa_probe()
111 release_region(io & (-1 << i), (1 << i)); in ns558_isa_probe()
116 i--; in ns558_isa_probe()
119 if (!request_region(io & (-1 << i), (1 << i), "ns558-isa")) in ns558_isa_probe()
120 return -EBUSY; in ns558_isa_probe()
124 port = gameport_allocate_port(); in ns558_isa_probe()
125 if (!ns558 || !port) { in ns558_isa_probe()
127 release_region(io & (-1 << i), (1 << i)); in ns558_isa_probe()
129 gameport_free_port(port); in ns558_isa_probe()
130 return -ENOMEM; in ns558_isa_probe()
133 ns558->io = io; in ns558_isa_probe()
134 ns558->size = 1 << i; in ns558_isa_probe()
135 ns558->gameport = port; in ns558_isa_probe()
137 port->io = io; in ns558_isa_probe()
138 gameport_set_name(port, "NS558 ISA Gameport"); in ns558_isa_probe()
139 gameport_set_phys(port, "isa%04x/gameport0", io & (-1 << i)); in ns558_isa_probe()
141 gameport_register_port(port); in ns558_isa_probe()
143 list_add(&ns558->node, &ns558_list); in ns558_isa_probe()
151 { .id = "@P@0001", .driver_data = 0 }, /* ALS 100 */
152 { .id = "@P@0020", .driver_data = 0 }, /* ALS 200 */
153 { .id = "@P@1001", .driver_data = 0 }, /* ALS 100+ */
154 { .id = "@P@2001", .driver_data = 0 }, /* ALS 120 */
155 { .id = "ASB16fd", .driver_data = 0 }, /* AdLib NSC16 */
156 { .id = "AZT3001", .driver_data = 0 }, /* AZT1008 */
157 { .id = "CDC0001", .driver_data = 0 }, /* Opl3-SAx */
158 { .id = "CSC0001", .driver_data = 0 }, /* CS4232 */
159 { .id = "CSC000f", .driver_data = 0 }, /* CS4236 */
160 { .id = "CSC0101", .driver_data = 0 }, /* CS4327 */
161 { .id = "CTL7001", .driver_data = 0 }, /* SB16 */
162 { .id = "CTL7002", .driver_data = 0 }, /* AWE64 */
163 { .id = "CTL7005", .driver_data = 0 }, /* Vibra16 */
164 { .id = "ENS2020", .driver_data = 0 }, /* SoundscapeVIVO */
165 { .id = "ESS0001", .driver_data = 0 }, /* ES1869 */
166 { .id = "ESS0005", .driver_data = 0 }, /* ES1878 */
167 { .id = "ESS6880", .driver_data = 0 }, /* ES688 */
168 { .id = "IBM0012", .driver_data = 0 }, /* CS4232 */
169 { .id = "OPT0001", .driver_data = 0 }, /* OPTi Audio16 */
170 { .id = "YMH0006", .driver_data = 0 }, /* Opl3-SA */
171 { .id = "YMH0022", .driver_data = 0 }, /* Opl3-SAx */
172 { .id = "PNPb02f", .driver_data = 0 }, /* Generic */
173 { .id = "", },
182 struct gameport *port; in ns558_pnp_probe() local
186 return -ENODEV; in ns558_pnp_probe()
192 if (!request_region(ioport, iolen, "ns558-pnp")) in ns558_pnp_probe()
193 return -EBUSY; in ns558_pnp_probe()
196 port = gameport_allocate_port(); in ns558_pnp_probe()
197 if (!ns558 || !port) { in ns558_pnp_probe()
200 gameport_free_port(port); in ns558_pnp_probe()
201 return -ENOMEM; in ns558_pnp_probe()
204 ns558->io = ioport; in ns558_pnp_probe()
205 ns558->size = iolen; in ns558_pnp_probe()
206 ns558->dev = dev; in ns558_pnp_probe()
207 ns558->gameport = port; in ns558_pnp_probe()
209 gameport_set_name(port, "NS558 PnP Gameport"); in ns558_pnp_probe()
210 gameport_set_phys(port, "pnp%s/gameport0", dev_name(&dev->dev)); in ns558_pnp_probe()
211 port->dev.parent = &dev->dev; in ns558_pnp_probe()
212 port->io = ioport; in ns558_pnp_probe()
214 gameport_register_port(port); in ns558_pnp_probe()
216 list_add_tail(&ns558->node, &ns558_list); in ns558_pnp_probe()
238 if (error && error != -ENODEV) /* should be ENOSYS really */ in ns558_init()
243 * enabled get detected as PnP. This may be suboptimal in multi-device in ns558_init()
250 return list_empty(&ns558_list) && error ? -ENODEV : 0; in ns558_init()
258 gameport_unregister_port(ns558->gameport); in ns558_exit()
259 release_region(ns558->io & ~(ns558->size - 1), ns558->size); in ns558_exit()