summaryrefslogtreecommitdiffstats
path: root/Documentation/rfkill.txt
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-05-17 05:38:02 -0400
committerJonathan Corbet <corbet@lwn.net>2017-07-14 15:58:02 -0400
commit317a8455f18383bf339c3ff0e461c5d9fdcb0b3d (patch)
treeec27dece87baa106ee386df334851fc9a71fffd6 /Documentation/rfkill.txt
parent620b470bb41c9620875f9b7e3fe2d70a7602a6b6 (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.txt43
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===============================
1rfkill - RF kill switch support 2rfkill - RF kill switch support
2=============================== 3===============================
3 4
41. Introduction
52. Implementation details
63. Kernel API
74. Userspace support
8 5
6.. contents::
7 :depth: 2
9 8
101. Introduction 9Introduction
10============
11 11
12The rfkill subsystem provides a generic interface to disabling any radio 12The rfkill subsystem provides a generic interface to disabling any radio
13transmitter in the system. When a transmitter is blocked, it shall not 13transmitter in the system. When a transmitter is blocked, it shall not
@@ -21,17 +21,24 @@ aircraft.
21The rfkill subsystem has a concept of "hard" and "soft" block, which 21The rfkill subsystem has a concept of "hard" and "soft" block, which
22differ little in their meaning (block == transmitters off) but rather in 22differ little in their meaning (block == transmitters off) but rather in
23whether they can be changed or not: 23whether 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
28The rfkill subsystem has two parameters, rfkill.default_state and 32The rfkill subsystem has two parameters, rfkill.default_state and
29rfkill.master_switch_mode, which are documented in admin-guide/kernel-parameters.rst. 33rfkill.master_switch_mode, which are documented in
34admin-guide/kernel-parameters.rst.
30 35
31 36
322. Implementation details 37Implementation details
38======================
33 39
34The rfkill subsystem is composed of three main components: 40The 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
55keeps track of soft and hard block separately. 62keeps track of soft and hard block separately.
56 63
57 64
583. Kernel API 65Kernel API
66==========
59 67
60 68
61Drivers for radio transmitters normally implement an rfkill driver. 69Drivers for radio transmitters normally implement an rfkill driver.
@@ -69,7 +77,7 @@ For some platforms, it is possible that the hardware state changes during
69suspend/hibernation, in which case it will be necessary to update the rfkill 77suspend/hibernation, in which case it will be necessary to update the rfkill
70core with the current state is at resume time. 78core with the current state is at resume time.
71 79
72To create an rfkill driver, driver's Kconfig needs to have 80To 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
87according to the switch state (LED_FULL when blocked, LED_OFF otherwise). 95according to the switch state (LED_FULL when blocked, LED_OFF otherwise).
88 96
89 97
905. Userspace support 98Userspace support
99=================
91 100
92The recommended userspace interface to use is /dev/rfkill, which is a misc 101The recommended userspace interface to use is /dev/rfkill, which is a misc
93character device that allows userspace to obtain and set the state of rfkill 102character device that allows userspace to obtain and set the state of rfkill
@@ -112,11 +121,11 @@ rfkill core framework.
112Additionally, each rfkill device is registered in sysfs and emits uevents. 121Additionally, each rfkill device is registered in sysfs and emits uevents.
113 122
114rfkill devices issue uevents (with an action of "change"), with the following 123rfkill devices issue uevents (with an action of "change"), with the following
115environment variables set: 124environment variables set::
116 125
117RFKILL_NAME 126 RFKILL_NAME
118RFKILL_STATE 127 RFKILL_STATE
119RFKILL_TYPE 128 RFKILL_TYPE
120 129
121The contents of these variables corresponds to the "name", "state" and 130The contents of these variables corresponds to the "name", "state" and
122"type" sysfs files explained above. 131"type" sysfs files explained above.