[PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
[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
cc3b4866
DB
3* Unify detach and REMOVAL event code (as of 2.6.16)
4 void (*remove) (struct pcmcia_device *dev);
5
98e4c28b
DB
6* Move suspend, resume and reset out of event handler (as of 2.6.16)
7 int (*suspend) (struct pcmcia_device *dev);
8 int (*resume) (struct pcmcia_device *dev);
9 should be initialized in struct pcmcia_driver, and handle
10 (SUSPEND == RESET_PHYSICAL) and (RESUME == CARD_RESET) events
11
c6fd7188
DB
12* event handler initialization in struct pcmcia_driver (as of 2.6.13)
13 The event handler is notified of all events, and must be initialized
14 as the event() callback in the driver's struct pcmcia_driver.
15
16* pcmcia/version.h should not be used (as of 2.6.13)
17 This file will be removed eventually.
18
19* in-kernel device<->driver matching (as of 2.6.13)
5085cb26
DB
20 PCMCIA devices and their correct drivers can now be matched in
21 kernelspace. See 'devicetable.txt' for details.
22
23* Device model integration (as of 2.6.11)
24 A struct pcmcia_device is registered with the device model core,
25 and can be used (e.g. for SET_NETDEV_DEV) by using
26 handle_to_dev(client_handle_t * handle).
27
28* Convert internal I/O port addresses to unsigned long (as of 2.6.11)
29 ioaddr_t should be replaced by kio_addr_t in PCMCIA card drivers.
30
31* irq_mask and irq_list parameters (as of 2.6.11)
32 The irq_mask and irq_list parameters should no longer be used in
33 PCMCIA card drivers. Instead, it is the job of the PCMCIA core to
34 determine which IRQ should be used. Therefore, link->irq.IRQInfo2
35 is ignored.
36
37* client->PendingEvents is gone (as of 2.6.11)
38 client->PendingEvents is no longer available.
39
40* client->Attributes are gone (as of 2.6.11)
41 client->Attributes is unused, therefore it is removed from all
42 PCMCIA card drivers
43
44* core functions no longer available (as of 2.6.11)
45 The following functions have been removed from the kernel source
46 because they are unused by all in-kernel drivers, and no external
47 driver was reported to rely on them:
48 pcmcia_get_first_region()
49 pcmcia_get_next_region()
50 pcmcia_modify_window()
51 pcmcia_set_event_mask()
52 pcmcia_get_first_window()
53 pcmcia_get_next_window()
54
55* device list iteration upon module removal (as of 2.6.10)
56 It is no longer necessary to iterate on the driver's internal
57 client list and call the ->detach() function upon module removal.
58
59* Resource management. (as of 2.6.8)
60 Although the PCMCIA subsystem will allocate resources for cards,
61 it no longer marks these resources busy. This means that driver
62 authors are now responsible for claiming your resources as per
63 other drivers in Linux. You should use request_region() to mark
64 your IO regions in-use, and request_mem_region() to mark your
65 memory regions in-use. The name argument should be a pointer to
66 your driver name. Eg, for pcnet_cs, name should point to the
67 string "pcnet_cs".
661d04c6
DB
68
69* CardServices is gone
70 CardServices() in 2.4 is just a big switch statement to call various
71 services. In 2.6, all of those entry points are exported and called
72 directly (except for pcmcia_report_error(), just use cs_error() instead).
73
74* struct pcmcia_driver
75 You need to use struct pcmcia_driver and pcmcia_{un,}register_driver
76 instead of {un,}register_pccard_driver