blob: 86e0f491f85e2d56c5f3fb5a15dbb1c0f60e6ea5 [file] [log] [blame]
Dominik Brodowski5085cb22005-06-27 16:28:45 -07001This file details changes in 2.6 which affect PCMCIA card driver authors:
Dominik Brodowskicdb13802010-07-28 10:59:06 +02002* pcmcia_request_window changes (as of 2.6.36)
3 Instead of win_req_t, drivers are now requested to fill out
4 struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four ioport
5 ranges. After a call to pcmcia_request_window(), the regions found there
6 are reserved and may be used immediately -- until pcmcia_release_window()
7 is called.
8
Dominik Brodowski90abdc32010-07-24 17:23:51 +02009* pcmcia_request_io changes (as of 2.6.36)
10 Instead of io_req_t, drivers are now requested to fill out
11 struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
12 ranges. After a call to pcmcia_request_io(), the ports found there
13 are reserved, after calling pcmcia_request_configuration(), they may
14 be used.
15
Dominik Brodowskiac8b4222010-07-21 22:38:13 +020016* No dev_info_t, no cs_types.h (as of 2.6.36)
17 dev_info_t and a few other typedefs are removed. No longer use them
18 in PCMCIA device drivers. Also, do not include pcmcia/cs_types.h, as
19 this file is gone.
20
Dominik Brodowskib9300aa2010-03-20 19:43:40 +010021* No dev_node_t (as of 2.6.35)
22 There is no more need to fill out a "dev_node_t" structure.
23
Dominik Brodowskieb141202010-03-07 12:21:16 +010024* New IRQ request rules (as of 2.6.35)
25 Instead of the old pcmcia_request_irq() interface, drivers may now
26 choose between:
27 - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.
28 - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
29 clean up automatically on calls to pcmcia_disable_device() or
30 device ejection.
31 - drivers still not capable of IRQF_SHARED (or not telling us so) may
32 use the deprecated pcmcia_request_exclusive_irq() for the time
33 being; they might receive a shared IRQ nonetheless.
Dominik Brodowski5085cb22005-06-27 16:28:45 -070034
Dominik Brodowski9cb495b2009-10-24 15:57:22 +020035* no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33)
36 Instead of the cs_error() callback or the CS_CHECK() macro, please use
37 Linux-style checking of return values, and -- if necessary -- debug
38 messages using "dev_dbg()" or "pr_debug()".
39
Dominik Brodowski91284222009-10-18 23:32:33 +020040* New CIS tuple access (as of 2.6.33)
41 Instead of pcmcia_get_{first,next}_tuple(), pcmcia_get_tuple_data() and
42 pcmcia_parse_tuple(), a driver shall use "pcmcia_get_tuple()" if it is
43 only interested in one (raw) tuple, or "pcmcia_loop_tuple()" if it is
44 interested in all tuples of one type. To decode the MAC from CISTPL_FUNCE,
45 a new helper "pcmcia_get_mac_from_cis()" was added.
46
Dominik Brodowskia804b572008-07-29 08:38:30 +020047* New configuration loop helper (as of 2.6.28)
48 By calling pcmcia_loop_config(), a driver can iterate over all available
49 configuration options. During a driver's probe() phase, one doesn't need
50 to use pcmcia_get_{first,next}_tuple, pcmcia_get_tuple_data and
51 pcmcia_parse_tuple directly in most if not all cases.
52
Dominik Brodowski5f2a71f2006-01-15 09:32:39 +010053* New release helper (as of 2.6.17)
54 Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's
55 necessary now is calling pcmcia_disable_device. As there is no valid
Dominik Brodowski50db3fd2006-01-15 10:05:19 +010056 reason left to call pcmcia_release_io and pcmcia_release_irq, the
57 exports for them were removed.
Dominik Brodowski5f2a71f2006-01-15 09:32:39 +010058
Dominik Brodowskif8cfa612005-11-14 21:25:51 +010059* Unify detach and REMOVAL event code, as well as attach and INSERTION
60 code (as of 2.6.16)
61 void (*remove) (struct pcmcia_device *dev);
62 int (*probe) (struct pcmcia_device *dev);
Dominik Brodowskicc3b4862005-11-14 21:23:14 +010063
Dominik Brodowski98e4c282005-11-14 21:21:18 +010064* Move suspend, resume and reset out of event handler (as of 2.6.16)
65 int (*suspend) (struct pcmcia_device *dev);
66 int (*resume) (struct pcmcia_device *dev);
67 should be initialized in struct pcmcia_driver, and handle
68 (SUSPEND == RESET_PHYSICAL) and (RESUME == CARD_RESET) events
69
Dominik Brodowskic6fd7182005-07-12 13:58:15 -070070* event handler initialization in struct pcmcia_driver (as of 2.6.13)
71 The event handler is notified of all events, and must be initialized
72 as the event() callback in the driver's struct pcmcia_driver.
73
74* pcmcia/version.h should not be used (as of 2.6.13)
75 This file will be removed eventually.
76
77* in-kernel device<->driver matching (as of 2.6.13)
Dominik Brodowski5085cb22005-06-27 16:28:45 -070078 PCMCIA devices and their correct drivers can now be matched in
79 kernelspace. See 'devicetable.txt' for details.
80
81* Device model integration (as of 2.6.11)
82 A struct pcmcia_device is registered with the device model core,
83 and can be used (e.g. for SET_NETDEV_DEV) by using
84 handle_to_dev(client_handle_t * handle).
85
Olof Johansson906da802008-02-04 22:27:35 -080086* Convert internal I/O port addresses to unsigned int (as of 2.6.11)
87 ioaddr_t should be replaced by unsigned int in PCMCIA card drivers.
Dominik Brodowski5085cb22005-06-27 16:28:45 -070088
89* irq_mask and irq_list parameters (as of 2.6.11)
90 The irq_mask and irq_list parameters should no longer be used in
91 PCMCIA card drivers. Instead, it is the job of the PCMCIA core to
92 determine which IRQ should be used. Therefore, link->irq.IRQInfo2
93 is ignored.
94
95* client->PendingEvents is gone (as of 2.6.11)
96 client->PendingEvents is no longer available.
97
98* client->Attributes are gone (as of 2.6.11)
99 client->Attributes is unused, therefore it is removed from all
100 PCMCIA card drivers
101
102* core functions no longer available (as of 2.6.11)
103 The following functions have been removed from the kernel source
104 because they are unused by all in-kernel drivers, and no external
105 driver was reported to rely on them:
106 pcmcia_get_first_region()
107 pcmcia_get_next_region()
108 pcmcia_modify_window()
109 pcmcia_set_event_mask()
110 pcmcia_get_first_window()
111 pcmcia_get_next_window()
112
113* device list iteration upon module removal (as of 2.6.10)
114 It is no longer necessary to iterate on the driver's internal
115 client list and call the ->detach() function upon module removal.
116
117* Resource management. (as of 2.6.8)
118 Although the PCMCIA subsystem will allocate resources for cards,
119 it no longer marks these resources busy. This means that driver
120 authors are now responsible for claiming your resources as per
121 other drivers in Linux. You should use request_region() to mark
122 your IO regions in-use, and request_mem_region() to mark your
123 memory regions in-use. The name argument should be a pointer to
124 your driver name. Eg, for pcnet_cs, name should point to the
125 string "pcnet_cs".
Dominik Brodowski661d04c2005-07-28 01:07:26 -0700126
127* CardServices is gone
128 CardServices() in 2.4 is just a big switch statement to call various
129 services. In 2.6, all of those entry points are exported and called
130 directly (except for pcmcia_report_error(), just use cs_error() instead).
131
132* struct pcmcia_driver
133 You need to use struct pcmcia_driver and pcmcia_{un,}register_driver
134 instead of {un,}register_pccard_driver