Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: pcmcia: convert docs to ReST and rename to *.rst

Convert the pcmcia docs to ReST format. Most of the changes here
are trivial.

The conversion is actually:
- add blank lines and identation in order to identify paragraphs;
- fix tables markups;
- add some lists markups;
- mark literal blocks;
- adjust title markups.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
3bdab16c 593733ab

+86 -36
+4
Documentation/pcmcia/devicetable.txt Documentation/pcmcia/devicetable.rst
··· 1 + ============ 2 + Device table 3 + ============ 4 + 1 5 Matching of PCMCIA devices to drivers is done using one or more of the 2 6 following criteria: 3 7
+23 -12
Documentation/pcmcia/driver-changes.txt Documentation/pcmcia/driver-changes.rst
··· 1 + ============== 2 + Driver changes 3 + ============== 4 + 1 5 This file details changes in 2.6 which affect PCMCIA card driver authors: 6 + 2 7 * pcmcia_loop_config() and autoconfiguration (as of 2.6.36) 3 - If struct pcmcia_device *p_dev->config_flags is set accordingly, 8 + If `struct pcmcia_device *p_dev->config_flags` is set accordingly, 4 9 pcmcia_loop_config() now sets up certain configuration values 5 10 automatically, though the driver may still override the settings 6 11 in the callback function. The following autoconfiguration options 7 12 are provided at the moment: 8 - CONF_AUTO_CHECK_VCC : check for matching Vcc 9 - CONF_AUTO_SET_VPP : set Vpp 10 - CONF_AUTO_AUDIO : auto-enable audio line, if required 11 - CONF_AUTO_SET_IO : set ioport resources (->resource[0,1]) 12 - CONF_AUTO_SET_IOMEM : set first iomem resource (->resource[2]) 13 + 14 + - CONF_AUTO_CHECK_VCC : check for matching Vcc 15 + - CONF_AUTO_SET_VPP : set Vpp 16 + - CONF_AUTO_AUDIO : auto-enable audio line, if required 17 + - CONF_AUTO_SET_IO : set ioport resources (->resource[0,1]) 18 + - CONF_AUTO_SET_IOMEM : set first iomem resource (->resource[2]) 13 19 14 20 * pcmcia_request_configuration -> pcmcia_enable_device (as of 2.6.36) 15 21 pcmcia_request_configuration() got renamed to pcmcia_enable_device(), ··· 25 19 26 20 * pcmcia_request_window changes (as of 2.6.36) 27 21 Instead of win_req_t, drivers are now requested to fill out 28 - struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four ioport 22 + `struct pcmcia_device *p_dev->resource[2,3,4,5]` for up to four ioport 29 23 ranges. After a call to pcmcia_request_window(), the regions found there 30 24 are reserved and may be used immediately -- until pcmcia_release_window() 31 25 is called. 32 26 33 27 * pcmcia_request_io changes (as of 2.6.36) 34 28 Instead of io_req_t, drivers are now requested to fill out 35 - struct pcmcia_device *p_dev->resource[0,1] for up to two ioport 29 + `struct pcmcia_device *p_dev->resource[0,1]` for up to two ioport 36 30 ranges. After a call to pcmcia_request_io(), the ports found there 37 31 are reserved, after calling pcmcia_request_configuration(), they may 38 32 be used. ··· 48 42 * New IRQ request rules (as of 2.6.35) 49 43 Instead of the old pcmcia_request_irq() interface, drivers may now 50 44 choose between: 51 - - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq. 45 + 46 + - calling request_irq/free_irq directly. Use the IRQ from `*p_dev->irq`. 52 47 - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will 53 48 clean up automatically on calls to pcmcia_disable_device() or 54 49 device ejection. ··· 79 72 exports for them were removed. 80 73 81 74 * Unify detach and REMOVAL event code, as well as attach and INSERTION 82 - code (as of 2.6.16) 75 + code (as of 2.6.16):: 76 + 83 77 void (*remove) (struct pcmcia_device *dev); 84 78 int (*probe) (struct pcmcia_device *dev); 85 79 86 - * Move suspend, resume and reset out of event handler (as of 2.6.16) 80 + * Move suspend, resume and reset out of event handler (as of 2.6.16):: 81 + 87 82 int (*suspend) (struct pcmcia_device *dev); 88 83 int (*resume) (struct pcmcia_device *dev); 84 + 89 85 should be initialized in struct pcmcia_driver, and handle 90 86 (SUSPEND == RESET_PHYSICAL) and (RESUME == CARD_RESET) events 91 87 ··· 127 117 * core functions no longer available (as of 2.6.11) 128 118 The following functions have been removed from the kernel source 129 119 because they are unused by all in-kernel drivers, and no external 130 - driver was reported to rely on them: 120 + driver was reported to rely on them:: 121 + 131 122 pcmcia_get_first_region() 132 123 pcmcia_get_next_region() 133 124 pcmcia_modify_window()
+9 -9
Documentation/pcmcia/driver.txt Documentation/pcmcia/driver.rst
··· 1 + ============= 1 2 PCMCIA Driver 2 - ------------- 3 - 3 + ============= 4 4 5 5 sysfs 6 6 ----- 7 7 8 8 New PCMCIA IDs may be added to a device driver pcmcia_device_id table at 9 - runtime as shown below: 9 + runtime as shown below:: 10 10 11 - echo "match_flags manf_id card_id func_id function device_no \ 12 - prod_id_hash[0] prod_id_hash[1] prod_id_hash[2] prod_id_hash[3]" > \ 13 - /sys/bus/pcmcia/drivers/{driver}/new_id 11 + echo "match_flags manf_id card_id func_id function device_no \ 12 + prod_id_hash[0] prod_id_hash[1] prod_id_hash[2] prod_id_hash[3]" > \ 13 + /sys/bus/pcmcia/drivers/{driver}/new_id 14 14 15 15 All fields are passed in as hexadecimal values (no leading 0x). 16 16 The meaning is described in the PCMCIA specification, the match_flags is ··· 22 22 23 23 A common use-case is to add a new device according to the manufacturer ID 24 24 and the card ID (form the manf_id and card_id file in the device tree). 25 - For this, just use: 25 + For this, just use:: 26 26 27 - echo "0x3 manf_id card_id 0 0 0 0 0 0 0" > \ 28 - /sys/bus/pcmcia/drivers/{driver}/new_id 27 + echo "0x3 manf_id card_id 0 0 0 0 0 0 0" > \ 28 + /sys/bus/pcmcia/drivers/{driver}/new_id 29 29 30 30 after loading the driver.
+20
Documentation/pcmcia/index.rst
··· 1 + :orphan: 2 + 3 + ====== 4 + pcmcia 5 + ====== 6 + 7 + .. toctree:: 8 + :maxdepth: 1 9 + 10 + driver 11 + devicetable 12 + locking 13 + driver-changes 14 + 15 + .. only:: subproject and html 16 + 17 + Indices 18 + ======= 19 + 20 + * :ref:`genindex`
+27 -12
Documentation/pcmcia/locking.txt Documentation/pcmcia/locking.rst
··· 1 + ======= 2 + Locking 3 + ======= 4 + 1 5 This file explains the locking and exclusion scheme used in the PCCARD 2 6 and PCMCIA subsystems. 3 7 ··· 9 5 A) Overview, Locking Hierarchy: 10 6 =============================== 11 7 12 - pcmcia_socket_list_rwsem - protects only the list of sockets 13 - - skt_mutex - serializes card insert / ejection 14 - - ops_mutex - serializes socket operation 8 + pcmcia_socket_list_rwsem 9 + - protects only the list of sockets 10 + 11 + - skt_mutex 12 + - serializes card insert / ejection 13 + 14 + - ops_mutex 15 + - serializes socket operation 15 16 16 17 17 18 B) Exclusion 18 19 ============ 19 20 20 21 The following functions and callbacks to struct pcmcia_socket must 21 - be called with "skt_mutex" held: 22 + be called with "skt_mutex" held:: 22 23 23 24 socket_detect_change() 24 25 send_event() ··· 40 31 struct pcmcia_callback *callback 41 32 42 33 The following functions and callbacks to struct pcmcia_socket must 43 - be called with "ops_mutex" held: 34 + be called with "ops_mutex" held:: 44 35 45 36 socket_reset() 46 37 socket_setup() ··· 48 39 struct pccard_operations *ops 49 40 struct pccard_resource_ops *resource_ops; 50 41 51 - Note that send_event() and struct pcmcia_callback *callback must not be 42 + Note that send_event() and `struct pcmcia_callback *callback` must not be 52 43 called with "ops_mutex" held. 53 44 54 45 ··· 69 60 The "main" struct pcmcia_socket is protected as follows (read-only fields 70 61 or single-use fields not mentioned): 71 62 72 - - by pcmcia_socket_list_rwsem: 63 + - by pcmcia_socket_list_rwsem:: 64 + 73 65 struct list_head socket_list; 74 66 75 - - by thread_lock: 67 + - by thread_lock:: 68 + 76 69 unsigned int thread_events; 77 70 78 - - by skt_mutex: 71 + - by skt_mutex:: 72 + 79 73 u_int suspended_state; 80 74 void (*tune_bridge); 81 75 struct pcmcia_callback *callback; 82 76 int resume_status; 83 77 84 - - by ops_mutex: 78 + - by ops_mutex:: 79 + 85 80 socket_state_t socket; 86 81 u_int state; 87 82 u_short lock_count; ··· 113 100 or single-use fields not mentioned): 114 101 115 102 116 - - by pcmcia_socket->ops_mutex: 103 + - by pcmcia_socket->ops_mutex:: 104 + 117 105 struct list_head socket_device_list; 118 106 struct config_t *function_config; 119 107 u16 _irq:1; ··· 125 111 u16 suspended:1; 126 112 u16 _removed:1; 127 113 128 - - by the PCMCIA driver: 114 + - by the PCMCIA driver:: 115 + 129 116 io_req_t io; 130 117 irq_req_t irq; 131 118 config_req_t conf;
+1 -1
drivers/pcmcia/ds.c
··· 67 67 "be 0x%x\n", p_drv->name, did->prod_id[i], 68 68 did->prod_id_hash[i], hash); 69 69 printk(KERN_DEBUG "pcmcia: see " 70 - "Documentation/pcmcia/devicetable.txt for " 70 + "Documentation/pcmcia/devicetable.rst for " 71 71 "details\n"); 72 72 } 73 73 did++;
+1 -1
include/pcmcia/ds.h
··· 39 39 struct net_device; 40 40 41 41 /* dynamic device IDs for PCMCIA device drivers. See 42 - * Documentation/pcmcia/driver.txt for details. 42 + * Documentation/pcmcia/driver.rst for details. 43 43 */ 44 44 struct pcmcia_dynids { 45 45 struct mutex lock;
+1 -1
include/pcmcia/ss.h
··· 190 190 unsigned int sysfs_events; 191 191 192 192 /* For the non-trivial interaction between these locks, 193 - * see Documentation/pcmcia/locking.txt */ 193 + * see Documentation/pcmcia/locking.rst */ 194 194 struct mutex skt_mutex; 195 195 struct mutex ops_mutex; 196 196