12 #include <linux/module.h>
15 #include <linux/kernel.h>
17 #include <linux/ptrace.h>
18 #include <linux/slab.h>
19 #include <linux/string.h>
35 static int isdnprot = 2;
41 static int avma1cs_config(
struct pcmcia_device *
link)
__devinit;
42 static void avma1cs_release(
struct pcmcia_device *
link);
43 static void avma1cs_detach(
struct pcmcia_device *p_dev)
__devexit;
45 static int __devinit avma1cs_probe(
struct pcmcia_device *p_dev)
47 dev_dbg(&p_dev->dev,
"avma1cs_attach()\n");
50 p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
51 p_dev->config_index = 1;
52 p_dev->config_regs = PRESENT_OPTION;
54 return avma1cs_config(p_dev);
57 static void __devexit avma1cs_detach(
struct pcmcia_device *
link)
59 dev_dbg(&link->dev,
"avma1cs_detach(0x%p)\n", link);
60 avma1cs_release(link);
64 static int avma1cs_configcheck(
struct pcmcia_device *p_dev,
void *priv_data)
66 p_dev->resource[0]->end = 16;
67 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
68 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
75 static int __devinit avma1cs_config(
struct pcmcia_device *
link)
82 dev_dbg(&link->dev,
"avma1cs_config(0x%p)\n", link);
86 strlcpy(devname, link->prod_id[1],
sizeof(devname));
88 if (pcmcia_loop_config(link, avma1cs_configcheck,
NULL))
114 avma1cs_release(link);
118 icard.
para[0] = link->irq;
119 icard.
para[1] = link->resource[0]->start;
126 "PCMCIA %d at i/o %#x\n", i,
127 (
unsigned int) link->resource[0]->start);
128 avma1cs_release(link);
131 link->priv = (
void *) (
unsigned long)
i;
136 static void avma1cs_release(
struct pcmcia_device *link)
138 unsigned long minor = (
unsigned long) link->priv;
140 dev_dbg(&link->dev,
"avma1cs_release(0x%p)\n", link);
149 PCMCIA_DEVICE_PROD_ID12(
"AVM",
"ISDN A", 0x95d42008, 0xadc9d4bb),
150 PCMCIA_DEVICE_PROD_ID12(
"ISDN",
"CARD", 0x8d9761c8, 0x01c5aa7b),
155 static struct pcmcia_driver avma1cs_driver = {
158 .probe = avma1cs_probe,
160 .id_table = avma1cs_ids,
163 static int __init init_avma1_cs(
void)
168 static void __exit exit_avma1_cs(
void)