1.. -*- coding: utf-8; mode: rst -*- 2 3.. _remote_controllers_sysfs_nodes: 4 5******************************* 6Remote Controller's sysfs nodes 7******************************* 8 9As defined at ``Documentation/ABI/testing/sysfs-class-rc``, those are 10the sysfs nodes that control the Remote Controllers: 11 12 13.. _sys_class_rc: 14 15/sys/class/rc/ 16============== 17 18The ``/sys/class/rc/`` class sub-directory belongs to the Remote 19Controller core and provides a sysfs interface for configuring infrared 20remote controller receivers. 21 22 23.. _sys_class_rc_rcN: 24 25/sys/class/rc/rcN/ 26================== 27 28A ``/sys/class/rc/rcN`` directory is created for each remote control 29receiver 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 37Reading this file returns a list of available protocols, something like: 38 39``rc5 [rc6] nec jvc [sony]`` 40 41Enabled protocols are shown in [] brackets. 42 43Writing "+proto" will add a protocol to the list of enabled protocols. 44 45Writing "-proto" will remove a protocol from the list of enabled 46protocols. 47 48Writing "proto" will enable only "proto". 49 50Writing "none" will disable all protocols. 51 52Write fails with ``EINVAL`` if an invalid protocol combination or unknown 53protocol name is used. 54 55 56.. _sys_class_rc_rcN_filter: 57 58/sys/class/rc/rcN/filter 59======================== 60 61Sets the scancode filter expected value. 62 63Use in combination with ``/sys/class/rc/rcN/filter_mask`` to set the 64expected value of the bits set in the filter mask. If the hardware 65supports it then scancodes which do not match the filter will be 66ignored. Otherwise the write will fail with an error. 67 68This 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 76Sets the scancode filter mask of bits to compare. Use in combination 77with ``/sys/class/rc/rcN/filter`` to set the bits of the scancode which 78should be compared against the expected value. A value of 0 disables the 79filter to allow all valid scancodes to be processed. 80 81If the hardware supports it then scancodes which do not match the filter 82will be ignored. Otherwise the write will fail with an error. 83 84This 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 92Reading this file returns a list of available protocols to use for the 93wakeup filter, something like: 94 95``rc5 rc6 nec jvc [sony]`` 96 97The enabled wakeup protocol is shown in [] brackets. 98 99Writing "+proto" will add a protocol to the list of enabled wakeup 100protocols. 101 102Writing "-proto" will remove a protocol from the list of enabled wakeup 103protocols. 104 105Writing "proto" will use "proto" for wakeup events. 106 107Writing "none" will disable wakeup. 108 109Write fails with ``EINVAL`` if an invalid protocol combination or unknown 110protocol 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 118Sets the scancode wakeup filter expected value. Use in combination with 119``/sys/class/rc/rcN/wakeup_filter_mask`` to set the expected value of 120the bits set in the wakeup filter mask to trigger a system wake event. 121 122If the hardware supports it and wakeup_filter_mask is not 0 then 123scancodes which match the filter will wake the system from e.g. suspend 124to RAM or power off. Otherwise the write will fail with an error. 125 126This 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 134Sets the scancode wakeup filter mask of bits to compare. Use in 135combination with ``/sys/class/rc/rcN/wakeup_filter`` to set the bits of 136the scancode which should be compared against the expected value to 137trigger a system wake event. 138 139If the hardware supports it and wakeup_filter_mask is not 0 then 140scancodes which match the filter will wake the system from e.g. suspend 141to RAM or power off. Otherwise the write will fail with an error. 142 143This value may be reset to 0 if the wakeup protocol is altered. 144