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