blob: adfb83e586752f87717a1cf31bcc8eec8fd27de8 [file] [log] [blame]
Dominik Brodowski5085cb22005-06-27 16:28:45 -07001This file details changes in 2.6 which affect PCMCIA card driver authors:
2
Dominik Brodowski91284222009-10-18 23:32:33 +02003* New CIS tuple access (as of 2.6.33)
4 Instead of pcmcia_get_{first,next}_tuple(), pcmcia_get_tuple_data() and
5 pcmcia_parse_tuple(), a driver shall use "pcmcia_get_tuple()" if it is
6 only interested in one (raw) tuple, or "pcmcia_loop_tuple()" if it is
7 interested in all tuples of one type. To decode the MAC from CISTPL_FUNCE,
8 a new helper "pcmcia_get_mac_from_cis()" was added.
9
Dominik Brodowskia804b572008-07-29 08:38:30 +020010* New configuration loop helper (as of 2.6.28)
11 By calling pcmcia_loop_config(), a driver can iterate over all available
12 configuration options. During a driver's probe() phase, one doesn't need
13 to use pcmcia_get_{first,next}_tuple, pcmcia_get_tuple_data and
14 pcmcia_parse_tuple directly in most if not all cases.
15
Dominik Brodowski5f2a71f2006-01-15 09:32:39 +010016* New release helper (as of 2.6.17)
17 Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's
18 necessary now is calling pcmcia_disable_device. As there is no valid
Dominik Brodowski50db3fd2006-01-15 10:05:19 +010019 reason left to call pcmcia_release_io and pcmcia_release_irq, the
20 exports for them were removed.
Dominik Brodowski5f2a71f2006-01-15 09:32:39 +010021
Dominik Brodowskif8cfa612005-11-14 21:25:51 +010022* Unify detach and REMOVAL event code, as well as attach and INSERTION
23 code (as of 2.6.16)
24 void (*remove) (struct pcmcia_device *dev);
25 int (*probe) (struct pcmcia_device *dev);
Dominik Brodowskicc3b4862005-11-14 21:23:14 +010026
Dominik Brodowski98e4c282005-11-14 21:21:18 +010027* Move suspend, resume and reset out of event handler (as of 2.6.16)
28 int (*suspend) (struct pcmcia_device *dev);
29 int (*resume) (struct pcmcia_device *dev);
30 should be initialized in struct pcmcia_driver, and handle
31 (SUSPEND == RESET_PHYSICAL) and (RESUME == CARD_RESET) events
32
Dominik Brodowskic6fd7182005-07-12 13:58:15 -070033* event handler initialization in struct pcmcia_driver (as of 2.6.13)
34 The event handler is notified of all events, and must be initialized
35 as the event() callback in the driver's struct pcmcia_driver.
36
37* pcmcia/version.h should not be used (as of 2.6.13)
38 This file will be removed eventually.
39
40* in-kernel device<->driver matching (as of 2.6.13)
Dominik Brodowski5085cb22005-06-27 16:28:45 -070041 PCMCIA devices and their correct drivers can now be matched in
42 kernelspace. See 'devicetable.txt' for details.
43
44* Device model integration (as of 2.6.11)
45 A struct pcmcia_device is registered with the device model core,
46 and can be used (e.g. for SET_NETDEV_DEV) by using
47 handle_to_dev(client_handle_t * handle).
48
Olof Johansson906da802008-02-04 22:27:35 -080049* Convert internal I/O port addresses to unsigned int (as of 2.6.11)
50 ioaddr_t should be replaced by unsigned int in PCMCIA card drivers.
Dominik Brodowski5085cb22005-06-27 16:28:45 -070051
52* irq_mask and irq_list parameters (as of 2.6.11)
53 The irq_mask and irq_list parameters should no longer be used in
54 PCMCIA card drivers. Instead, it is the job of the PCMCIA core to
55 determine which IRQ should be used. Therefore, link->irq.IRQInfo2
56 is ignored.
57
58* client->PendingEvents is gone (as of 2.6.11)
59 client->PendingEvents is no longer available.
60
61* client->Attributes are gone (as of 2.6.11)
62 client->Attributes is unused, therefore it is removed from all
63 PCMCIA card drivers
64
65* core functions no longer available (as of 2.6.11)
66 The following functions have been removed from the kernel source
67 because they are unused by all in-kernel drivers, and no external
68 driver was reported to rely on them:
69 pcmcia_get_first_region()
70 pcmcia_get_next_region()
71 pcmcia_modify_window()
72 pcmcia_set_event_mask()
73 pcmcia_get_first_window()
74 pcmcia_get_next_window()
75
76* device list iteration upon module removal (as of 2.6.10)
77 It is no longer necessary to iterate on the driver's internal
78 client list and call the ->detach() function upon module removal.
79
80* Resource management. (as of 2.6.8)
81 Although the PCMCIA subsystem will allocate resources for cards,
82 it no longer marks these resources busy. This means that driver
83 authors are now responsible for claiming your resources as per
84 other drivers in Linux. You should use request_region() to mark
85 your IO regions in-use, and request_mem_region() to mark your
86 memory regions in-use. The name argument should be a pointer to
87 your driver name. Eg, for pcnet_cs, name should point to the
88 string "pcnet_cs".
Dominik Brodowski661d04c2005-07-28 01:07:26 -070089
90* CardServices is gone
91 CardServices() in 2.4 is just a big switch statement to call various
92 services. In 2.6, all of those entry points are exported and called
93 directly (except for pcmcia_report_error(), just use cs_error() instead).
94
95* struct pcmcia_driver
96 You need to use struct pcmcia_driver and pcmcia_{un,}register_driver
97 instead of {un,}register_pccard_driver