12 #include <linux/module.h>
13 #include <linux/kernel.h>
15 #include <linux/ptrace.h>
16 #include <linux/string.h>
17 #include <linux/tty.h>
18 #include <linux/serial.h>
40 static int avmcs_config(
struct pcmcia_device *
link);
41 static void avmcs_release(
struct pcmcia_device *
link);
42 static void avmcs_detach(
struct pcmcia_device *p_dev);
44 static int avmcs_probe(
struct pcmcia_device *p_dev)
47 p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
48 p_dev->config_index = 1;
49 p_dev->config_regs = PRESENT_OPTION;
51 return avmcs_config(p_dev);
55 static void avmcs_detach(
struct pcmcia_device *
link)
60 static int avmcs_configcheck(
struct pcmcia_device *p_dev,
void *priv_data)
62 p_dev->resource[0]->end = 16;
63 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
64 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
69 static int avmcs_config(
struct pcmcia_device *
link)
74 int (*addcard)(
unsigned int port,
unsigned irq);
78 strlcpy(devname, link->prod_id[1],
sizeof(devname));
83 if (pcmcia_loop_config(link, avmcs_configcheck,
NULL))
109 if (
strcmp(
"M1", s) == 0) {
111 }
else if (
strcmp(
"M2", s) == 0) {
132 if ((i = (*addcard)(link->resource[0]->start, link->irq)) < 0) {
134 "avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n",
135 (
unsigned int) link->resource[0]->start, link->irq);
144 static void avmcs_release(
struct pcmcia_device *link)
152 PCMCIA_DEVICE_PROD_ID12(
"AVM",
"ISDN-Controller B1", 0x95d42008, 0x845dc335),
153 PCMCIA_DEVICE_PROD_ID12(
"AVM",
"Mobile ISDN-Controller M1", 0x95d42008, 0x81e10430),
154 PCMCIA_DEVICE_PROD_ID12(
"AVM",
"Mobile ISDN-Controller M2", 0x95d42008, 0x18e8558a),
159 static struct pcmcia_driver avmcs_driver = {
162 .probe = avmcs_probe,
163 .remove = avmcs_detach,
164 .id_table = avmcs_ids,
167 static int __init avmcs_init(
void)
172 static void __exit avmcs_exit(
void)