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