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