38 #include <linux/kernel.h>
39 #include <linux/module.h>
41 #include <linux/ptrace.h>
42 #include <linux/slab.h>
43 #include <linux/string.h>
65 static int sedlbauer_config(
struct pcmcia_device *
link)
__devinit;
66 static void sedlbauer_release(
struct pcmcia_device *
link);
68 static void sedlbauer_detach(
struct pcmcia_device *p_dev)
__devexit;
71 struct pcmcia_device *
p_dev;
76 static int __devinit sedlbauer_probe(
struct pcmcia_device *
link)
80 dev_dbg(&link->dev,
"sedlbauer_attach()\n");
84 if (!local)
return -
ENOMEM;
90 return sedlbauer_config(link);
93 static void __devexit sedlbauer_detach(
struct pcmcia_device *
link)
95 dev_dbg(&link->dev,
"sedlbauer_detach(0x%p)\n", link);
98 sedlbauer_release(link);
104 static int sedlbauer_config_check(
struct pcmcia_device *p_dev,
void *priv_data)
106 if (p_dev->config_index == 0)
113 static int __devinit sedlbauer_config(
struct pcmcia_device *
link)
118 dev_dbg(&link->dev,
"sedlbauer_config(0x%p)\n", link);
120 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_CHECK_VCC |
121 CONF_AUTO_SET_VPP | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;
123 ret = pcmcia_loop_config(link, sedlbauer_config_check,
NULL);
131 icard.
para[0] = link->irq;
132 icard.
para[1] = link->resource[0]->start;
139 printk(
KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d with %pR\n",
140 ret, link->resource[0]);
141 sedlbauer_release(link);
149 sedlbauer_release(link);
154 static void sedlbauer_release(
struct pcmcia_device *link)
157 dev_dbg(&link->dev,
"sedlbauer_release(0x%p)\n", link);
169 static int sedlbauer_suspend(
struct pcmcia_device *link)
178 static int sedlbauer_resume(
struct pcmcia_device *link)
189 PCMCIA_DEVICE_PROD_ID123(
"SEDLBAUER",
"speed star II",
"V 3.1", 0x81fb79f5, 0xf3612e1d, 0x6b95c78a),
190 PCMCIA_DEVICE_PROD_ID123(
"SEDLBAUER",
"ISDN-Adapter",
"4D67", 0x81fb79f5, 0xe4e9bc12, 0x397b7e90),
191 PCMCIA_DEVICE_PROD_ID123(
"SEDLBAUER",
"ISDN-Adapter",
"4D98", 0x81fb79f5, 0xe4e9bc12, 0x2e5c7fce),
192 PCMCIA_DEVICE_PROD_ID123(
"SEDLBAUER",
"ISDN-Adapter",
" (C) 93-94 VK", 0x81fb79f5, 0xe4e9bc12, 0x8db143fe),
193 PCMCIA_DEVICE_PROD_ID123(
"SEDLBAUER",
"ISDN-Adapter",
" (c) 93-95 VK", 0x81fb79f5, 0xe4e9bc12, 0xb391ab4c),
194 PCMCIA_DEVICE_PROD_ID12(
"HST High Soft Tech GmbH",
"Saphir II B", 0xd79e0b84, 0x21d083ae),
200 static struct pcmcia_driver sedlbauer_driver = {
202 .name =
"sedlbauer_cs",
203 .probe = sedlbauer_probe,
205 .id_table = sedlbauer_ids,
206 .suspend = sedlbauer_suspend,
207 .resume = sedlbauer_resume,
210 static int __init init_sedlbauer_cs(
void)
215 static void __exit exit_sedlbauer_cs(
void)