64 #include "../comedidev.h"
67 #include <linux/slab.h>
78 static struct pcmcia_device *pcmcia_cur_dev;
84 .name =
"daqcard-1200",
95 .memory_mapped_io = 0,
99 .name =
"ni_labpc_cs",
109 .memory_mapped_io = 0,
116 #define thisboard ((const struct labpc_board_struct *)dev->board_ptr)
119 .driver_name =
"ni_labpc_cs",
121 .attach = &labpc_attach,
124 .board_name = &labpc_cs_boards[0].
name,
131 unsigned int irq = 0;
132 struct pcmcia_device *
link;
141 link = pcmcia_cur_dev;
144 iobase = link->resource[0]->start;
148 pr_err(
"bug! couldn't determine board type\n");
155 static void labpc_config(
struct pcmcia_device *
link);
156 static void labpc_release(
struct pcmcia_device *link);
157 static int labpc_cs_suspend(
struct pcmcia_device *p_dev);
158 static int labpc_cs_resume(
struct pcmcia_device *p_dev);
160 static int labpc_cs_attach(
struct pcmcia_device *);
161 static void labpc_cs_detach(
struct pcmcia_device *);
164 struct pcmcia_device *
link;
166 struct bus_operations *
bus;
169 static int labpc_cs_attach(
struct pcmcia_device *link)
173 dev_dbg(&link->dev,
"labpc_cs_attach()\n");
182 pcmcia_cur_dev =
link;
189 static void labpc_cs_detach(
struct pcmcia_device *link)
199 static int labpc_pcmcia_config_loop(
struct pcmcia_device *p_dev,
202 if (p_dev->config_index == 0)
209 static void labpc_config(
struct pcmcia_device *link)
213 dev_dbg(&link->dev,
"labpc_config\n");
215 link->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ |
216 CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;
218 ret = pcmcia_loop_config(link, labpc_pcmcia_config_loop,
NULL);
220 dev_warn(&link->dev,
"no configuration found\n");
238 static void labpc_release(
struct pcmcia_device *link)
240 dev_dbg(&link->dev,
"labpc_release\n");
245 static int labpc_cs_suspend(
struct pcmcia_device *link)
254 static int labpc_cs_resume(
struct pcmcia_device *link)
264 PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0103),
273 static struct pcmcia_driver labpc_cs_driver = {
274 .probe = labpc_cs_attach,
275 .remove = labpc_cs_detach,
276 .suspend = labpc_cs_suspend,
277 .resume = labpc_cs_resume,
278 .id_table = labpc_cs_ids,
280 .name =
"daqcard-1200",
283 static int __init init_labpc_cs(
void)
289 static void __exit exit_labpc_cs(
void)
294 static int __init labpc_init_module(
void)
298 ret = init_labpc_cs();
305 static void __exit labpc_exit_module(
void)