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******************************* 13Remote Controller's sysfs nodes 14******************************* 15 16As defined at ``Documentation/ABI/testing/sysfs-class-rc``, those are 17the sysfs nodes that control the Remote Controllers: 18 19 20.. _sys_class_rc: 21 22/sys/class/rc/ 23============== 24 25The ``/sys/class/rc/`` class sub-directory belongs to the Remote 26Controller core and provides a sysfs interface for configuring infrared 27remote controller receivers. 28 29 30.. _sys_class_rc_rcN: 31 32/sys/class/rc/rcN/ 33================== 34 35A ``/sys/class/rc/rcN`` directory is created for each remote control 36receiver 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 44Reading this file returns a list of available protocols, something like:: 45 46 rc5 [rc6] nec jvc [sony] 47 48Enabled protocols are shown in [] brackets. 49 50Writing "+proto" will add a protocol to the list of enabled protocols. 51 52Writing "-proto" will remove a protocol from the list of enabled 53protocols. 54 55Writing "proto" will enable only "proto". 56 57Writing "none" will disable all protocols. 58 59Write fails with ``EINVAL`` if an invalid protocol combination or unknown 60protocol name is used. 61 62 63.. _sys_class_rc_rcN_filter: 64 65/sys/class/rc/rcN/filter 66======================== 67 68Sets the scancode filter expected value. 69 70Use in combination with ``/sys/class/rc/rcN/filter_mask`` to set the 71expected value of the bits set in the filter mask. If the hardware 72supports it then scancodes which do not match the filter will be 73ignored. Otherwise the write will fail with an error. 74 75This 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 83Sets the scancode filter mask of bits to compare. Use in combination 84with ``/sys/class/rc/rcN/filter`` to set the bits of the scancode which 85should be compared against the expected value. A value of 0 disables the 86filter to allow all valid scancodes to be processed. 87 88If the hardware supports it then scancodes which do not match the filter 89will be ignored. Otherwise the write will fail with an error. 90 91This 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 99Reading this file returns a list of available protocols to use for the 100wakeup 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 104Note that protocol variants are listed, so ``nec``, ``sony``, ``rc-5``, ``rc-6`` 105have their different bit length encodings listed if available. 106 107Note that all protocol variants are listed. 108 109The enabled wakeup protocol is shown in [] brackets. 110 111Only one protocol can be selected at a time. 112 113Writing "proto" will use "proto" for wakeup events. 114 115Writing "none" will disable wakeup. 116 117Write fails with ``EINVAL`` if an invalid protocol combination or unknown 118protocol 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 126Sets the scancode wakeup filter expected value. Use in combination with 127``/sys/class/rc/rcN/wakeup_filter_mask`` to set the expected value of 128the bits set in the wakeup filter mask to trigger a system wake event. 129 130If the hardware supports it and wakeup_filter_mask is not 0 then 131scancodes which match the filter will wake the system from e.g. suspend 132to RAM or power off. Otherwise the write will fail with an error. 133 134This 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 142Sets the scancode wakeup filter mask of bits to compare. Use in 143combination with ``/sys/class/rc/rcN/wakeup_filter`` to set the bits of 144the scancode which should be compared against the expected value to 145trigger a system wake event. 146 147If the hardware supports it and wakeup_filter_mask is not 0 then 148scancodes which match the filter will wake the system from e.g. suspend 149to RAM or power off. Otherwise the write will fail with an error. 150 151This value may be reset to 0 if the wakeup protocol is altered. 152