diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-05-17 05:38:02 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2017-07-14 15:58:02 -0400 |
commit | 317a8455f18383bf339c3ff0e461c5d9fdcb0b3d (patch) | |
tree | ec27dece87baa106ee386df334851fc9a71fffd6 /Documentation/rfkill.txt | |
parent | 620b470bb41c9620875f9b7e3fe2d70a7602a6b6 (diff) |
rfkill.txt: standardize document format
Each text file under Documentation follows a different
format. Some doesn't even have titles!
Change its representation to follow the adopted standard,
using ReST markups for it to be parseable by Sphinx:
- mark titles;
- comment contents index;
- mark literal blocks;
- adjust identation.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/rfkill.txt')
-rw-r--r-- | Documentation/rfkill.txt | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/Documentation/rfkill.txt b/Documentation/rfkill.txt index 8c174063b3f0..a289285d2412 100644 --- a/Documentation/rfkill.txt +++ b/Documentation/rfkill.txt | |||
@@ -1,13 +1,13 @@ | |||
1 | =============================== | ||
1 | rfkill - RF kill switch support | 2 | rfkill - RF kill switch support |
2 | =============================== | 3 | =============================== |
3 | 4 | ||
4 | 1. Introduction | ||
5 | 2. Implementation details | ||
6 | 3. Kernel API | ||
7 | 4. Userspace support | ||
8 | 5 | ||
6 | .. contents:: | ||
7 | :depth: 2 | ||
9 | 8 | ||
10 | 1. Introduction | 9 | Introduction |
10 | ============ | ||
11 | 11 | ||
12 | The rfkill subsystem provides a generic interface to disabling any radio | 12 | The rfkill subsystem provides a generic interface to disabling any radio |
13 | transmitter in the system. When a transmitter is blocked, it shall not | 13 | transmitter in the system. When a transmitter is blocked, it shall not |
@@ -21,17 +21,24 @@ aircraft. | |||
21 | The rfkill subsystem has a concept of "hard" and "soft" block, which | 21 | The rfkill subsystem has a concept of "hard" and "soft" block, which |
22 | differ little in their meaning (block == transmitters off) but rather in | 22 | differ little in their meaning (block == transmitters off) but rather in |
23 | whether they can be changed or not: | 23 | whether they can be changed or not: |
24 | - hard block: read-only radio block that cannot be overridden by software | 24 | |
25 | - soft block: writable radio block (need not be readable) that is set by | 25 | - hard block |
26 | the system software. | 26 | read-only radio block that cannot be overridden by software |
27 | |||
28 | - soft block | ||
29 | writable radio block (need not be readable) that is set by | ||
30 | the system software. | ||
27 | 31 | ||
28 | The rfkill subsystem has two parameters, rfkill.default_state and | 32 | The rfkill subsystem has two parameters, rfkill.default_state and |
29 | rfkill.master_switch_mode, which are documented in admin-guide/kernel-parameters.rst. | 33 | rfkill.master_switch_mode, which are documented in |
34 | admin-guide/kernel-parameters.rst. | ||
30 | 35 | ||
31 | 36 | ||
32 | 2. Implementation details | 37 | Implementation details |
38 | ====================== | ||
33 | 39 | ||
34 | The rfkill subsystem is composed of three main components: | 40 | The rfkill subsystem is composed of three main components: |
41 | |||
35 | * the rfkill core, | 42 | * the rfkill core, |
36 | * the deprecated rfkill-input module (an input layer handler, being | 43 | * the deprecated rfkill-input module (an input layer handler, being |
37 | replaced by userspace policy code) and | 44 | replaced by userspace policy code) and |
@@ -55,7 +62,8 @@ use the return value of rfkill_set_hw_state() unless the hardware actually | |||
55 | keeps track of soft and hard block separately. | 62 | keeps track of soft and hard block separately. |
56 | 63 | ||
57 | 64 | ||
58 | 3. Kernel API | 65 | Kernel API |
66 | ========== | ||
59 | 67 | ||
60 | 68 | ||
61 | Drivers for radio transmitters normally implement an rfkill driver. | 69 | Drivers for radio transmitters normally implement an rfkill driver. |
@@ -69,7 +77,7 @@ For some platforms, it is possible that the hardware state changes during | |||
69 | suspend/hibernation, in which case it will be necessary to update the rfkill | 77 | suspend/hibernation, in which case it will be necessary to update the rfkill |
70 | core with the current state is at resume time. | 78 | core with the current state is at resume time. |
71 | 79 | ||
72 | To create an rfkill driver, driver's Kconfig needs to have | 80 | To create an rfkill driver, driver's Kconfig needs to have:: |
73 | 81 | ||
74 | depends on RFKILL || !RFKILL | 82 | depends on RFKILL || !RFKILL |
75 | 83 | ||
@@ -87,7 +95,8 @@ RFKill provides per-switch LED triggers, which can be used to drive LEDs | |||
87 | according to the switch state (LED_FULL when blocked, LED_OFF otherwise). | 95 | according to the switch state (LED_FULL when blocked, LED_OFF otherwise). |
88 | 96 | ||
89 | 97 | ||
90 | 5. Userspace support | 98 | Userspace support |
99 | ================= | ||
91 | 100 | ||
92 | The recommended userspace interface to use is /dev/rfkill, which is a misc | 101 | The recommended userspace interface to use is /dev/rfkill, which is a misc |
93 | character device that allows userspace to obtain and set the state of rfkill | 102 | character device that allows userspace to obtain and set the state of rfkill |
@@ -112,11 +121,11 @@ rfkill core framework. | |||
112 | Additionally, each rfkill device is registered in sysfs and emits uevents. | 121 | Additionally, each rfkill device is registered in sysfs and emits uevents. |
113 | 122 | ||
114 | rfkill devices issue uevents (with an action of "change"), with the following | 123 | rfkill devices issue uevents (with an action of "change"), with the following |
115 | environment variables set: | 124 | environment variables set:: |
116 | 125 | ||
117 | RFKILL_NAME | 126 | RFKILL_NAME |
118 | RFKILL_STATE | 127 | RFKILL_STATE |
119 | RFKILL_TYPE | 128 | RFKILL_TYPE |
120 | 129 | ||
121 | The contents of these variables corresponds to the "name", "state" and | 130 | The contents of these variables corresponds to the "name", "state" and |
122 | "type" sysfs files explained above. | 131 | "type" sysfs files explained above. |