Merge tag 'pci-v4.21-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / rc / rc-sysfs-nodes.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _remote_controllers_sysfs_nodes:
11
12 *******************************
13 Remote Controller's sysfs nodes
14 *******************************
15
16 As defined at ``Documentation/ABI/testing/sysfs-class-rc``, those are
17 the sysfs nodes that control the Remote Controllers:
18
19
20 .. _sys_class_rc:
21
22 /sys/class/rc/
23 ==============
24
25 The ``/sys/class/rc/`` class sub-directory belongs to the Remote
26 Controller core and provides a sysfs interface for configuring infrared
27 remote controller receivers.
28
29
30 .. _sys_class_rc_rcN:
31
32 /sys/class/rc/rcN/
33 ==================
34
35 A ``/sys/class/rc/rcN`` directory is created for each remote control
36 receiver device where N is the number of the receiver.
37
38
39 .. _sys_class_rc_rcN_protocols:
40
41 /sys/class/rc/rcN/protocols
42 ===========================
43
44 Reading this file returns a list of available protocols, something like::
45
46         rc5 [rc6] nec jvc [sony]
47
48 Enabled protocols are shown in [] brackets.
49
50 Writing "+proto" will add a protocol to the list of enabled protocols.
51
52 Writing "-proto" will remove a protocol from the list of enabled
53 protocols.
54
55 Writing "proto" will enable only "proto".
56
57 Writing "none" will disable all protocols.
58
59 Write fails with ``EINVAL`` if an invalid protocol combination or unknown
60 protocol name is used.
61
62
63 .. _sys_class_rc_rcN_filter:
64
65 /sys/class/rc/rcN/filter
66 ========================
67
68 Sets the scancode filter expected value.
69
70 Use in combination with ``/sys/class/rc/rcN/filter_mask`` to set the
71 expected value of the bits set in the filter mask. If the hardware
72 supports it then scancodes which do not match the filter will be
73 ignored. Otherwise the write will fail with an error.
74
75 This value may be reset to 0 if the current protocol is altered.
76
77
78 .. _sys_class_rc_rcN_filter_mask:
79
80 /sys/class/rc/rcN/filter_mask
81 =============================
82
83 Sets the scancode filter mask of bits to compare. Use in combination
84 with ``/sys/class/rc/rcN/filter`` to set the bits of the scancode which
85 should be compared against the expected value. A value of 0 disables the
86 filter to allow all valid scancodes to be processed.
87
88 If the hardware supports it then scancodes which do not match the filter
89 will be ignored. Otherwise the write will fail with an error.
90
91 This value may be reset to 0 if the current protocol is altered.
92
93
94 .. _sys_class_rc_rcN_wakeup_protocols:
95
96 /sys/class/rc/rcN/wakeup_protocols
97 ==================================
98
99 Reading this file returns a list of available protocols to use for the
100 wakeup filter, something like::
101
102         rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce
103
104 Note that protocol variants are listed, so ``nec``, ``sony``, ``rc-5``, ``rc-6``
105 have their different bit length encodings listed if available.
106
107 Note that all protocol variants are listed.
108
109 The enabled wakeup protocol is shown in [] brackets.
110
111 Only one protocol can be selected at a time.
112
113 Writing "proto" will use "proto" for wakeup events.
114
115 Writing "none" will disable wakeup.
116
117 Write fails with ``EINVAL`` if an invalid protocol combination or unknown
118 protocol name is used, or if wakeup is not supported by the hardware.
119
120
121 .. _sys_class_rc_rcN_wakeup_filter:
122
123 /sys/class/rc/rcN/wakeup_filter
124 ===============================
125
126 Sets the scancode wakeup filter expected value. Use in combination with
127 ``/sys/class/rc/rcN/wakeup_filter_mask`` to set the expected value of
128 the bits set in the wakeup filter mask to trigger a system wake event.
129
130 If the hardware supports it and wakeup_filter_mask is not 0 then
131 scancodes which match the filter will wake the system from e.g. suspend
132 to RAM or power off. Otherwise the write will fail with an error.
133
134 This value may be reset to 0 if the wakeup protocol is altered.
135
136
137 .. _sys_class_rc_rcN_wakeup_filter_mask:
138
139 /sys/class/rc/rcN/wakeup_filter_mask
140 ====================================
141
142 Sets the scancode wakeup filter mask of bits to compare. Use in
143 combination with ``/sys/class/rc/rcN/wakeup_filter`` to set the bits of
144 the scancode which should be compared against the expected value to
145 trigger a system wake event.
146
147 If the hardware supports it and wakeup_filter_mask is not 0 then
148 scancodes which match the filter will wake the system from e.g. suspend
149 to RAM or power off. Otherwise the write will fail with an error.
150
151 This value may be reset to 0 if the wakeup protocol is altered.