32 #ifdef __IN_PCMCIA_PACKAGE__
33 #include <pcmcia/k_compat.h>
36 #include <linux/kernel.h>
37 #include <linux/module.h>
38 #include <linux/ptrace.h>
39 #include <linux/slab.h>
40 #include <linux/string.h>
41 #include <linux/netdevice.h>
43 #include <linux/device.h>
51 #include <linux/wireless.h>
65 static int atmel_config(
struct pcmcia_device *
link);
66 static void atmel_release(
struct pcmcia_device *
link);
68 static void atmel_detach(
struct pcmcia_device *p_dev);
74 static int atmel_probe(
struct pcmcia_device *p_dev)
78 dev_dbg(&p_dev->dev,
"atmel_attach()\n");
88 return atmel_config(p_dev);
91 static void atmel_detach(
struct pcmcia_device *
link)
93 dev_dbg(&link->dev,
"atmel_detach\n");
102 static int card_present(
void *
arg)
104 struct pcmcia_device *
link = (
struct pcmcia_device *)arg;
112 static int atmel_config_check(
struct pcmcia_device *p_dev,
void *priv_data)
114 if (p_dev->config_index == 0)
120 static int atmel_config(
struct pcmcia_device *link)
129 dev_dbg(&link->dev,
"atmel_config\n");
131 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP |
132 CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;
134 if (pcmcia_loop_config(link, atmel_config_check,
NULL))
138 dev_err(&link->dev,
"atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config.");
148 link->resource[0]->start,
164 static void atmel_release(
struct pcmcia_device *link)
168 dev_dbg(&link->dev,
"atmel_release\n");
177 static int atmel_suspend(
struct pcmcia_device *link)
186 static int atmel_resume(
struct pcmcia_device *link)
199 #define PCMCIA_DEVICE_MANF_CARD_INFO(manf, card, info) { \
200 .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \
201 PCMCIA_DEV_ID_MATCH_CARD_ID, \
204 .driver_info = (kernel_ulong_t)(info), }
206 #define PCMCIA_DEVICE_PROD_ID12_INFO(v1, v2, vh1, vh2, info) { \
207 .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \
208 PCMCIA_DEV_ID_MATCH_PROD_ID2, \
209 .prod_id = { (v1), (v2), NULL, NULL }, \
210 .prod_id_hash = { (vh1), (vh2), 0, 0 }, \
211 .driver_info = (kernel_ulong_t)(info), }
240 static struct pcmcia_driver atmel_driver = {
243 .probe = atmel_probe,
244 .remove = atmel_detach,
245 .id_table = atmel_ids,
246 .suspend = atmel_suspend,
247 .resume = atmel_resume,
250 static int __init atmel_cs_init(
void)
255 static void __exit atmel_cs_cleanup(
void)