1*4882a593Smuzhiyun.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun.. _remote_controllers_sysfs_nodes: 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun******************************* 6*4882a593SmuzhiyunRemote Controller's sysfs nodes 7*4882a593Smuzhiyun******************************* 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunAs defined at ``Documentation/ABI/testing/sysfs-class-rc``, those are 10*4882a593Smuzhiyunthe sysfs nodes that control the Remote Controllers: 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun.. _sys_class_rc: 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun/sys/class/rc/ 16*4882a593Smuzhiyun============== 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunThe ``/sys/class/rc/`` class sub-directory belongs to the Remote 19*4882a593SmuzhiyunController core and provides a sysfs interface for configuring infrared 20*4882a593Smuzhiyunremote controller receivers. 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun.. _sys_class_rc_rcN: 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun/sys/class/rc/rcN/ 26*4882a593Smuzhiyun================== 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunA ``/sys/class/rc/rcN`` directory is created for each remote control 29*4882a593Smuzhiyunreceiver device where N is the number of the receiver. 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun.. _sys_class_rc_rcN_protocols: 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun/sys/class/rc/rcN/protocols 35*4882a593Smuzhiyun=========================== 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunReading this file returns a list of available protocols, something like:: 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun rc5 [rc6] nec jvc [sony] 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunEnabled protocols are shown in [] brackets. 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunWriting "+proto" will add a protocol to the list of enabled protocols. 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunWriting "-proto" will remove a protocol from the list of enabled 46*4882a593Smuzhiyunprotocols. 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunWriting "proto" will enable only "proto". 49*4882a593Smuzhiyun 50*4882a593SmuzhiyunWriting "none" will disable all protocols. 51*4882a593Smuzhiyun 52*4882a593SmuzhiyunWrite fails with ``EINVAL`` if an invalid protocol combination or unknown 53*4882a593Smuzhiyunprotocol name is used. 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun.. _sys_class_rc_rcN_filter: 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun/sys/class/rc/rcN/filter 59*4882a593Smuzhiyun======================== 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunSets the scancode filter expected value. 62*4882a593Smuzhiyun 63*4882a593SmuzhiyunUse in combination with ``/sys/class/rc/rcN/filter_mask`` to set the 64*4882a593Smuzhiyunexpected value of the bits set in the filter mask. If the hardware 65*4882a593Smuzhiyunsupports it then scancodes which do not match the filter will be 66*4882a593Smuzhiyunignored. Otherwise the write will fail with an error. 67*4882a593Smuzhiyun 68*4882a593SmuzhiyunThis value may be reset to 0 if the current protocol is altered. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun.. _sys_class_rc_rcN_filter_mask: 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun/sys/class/rc/rcN/filter_mask 74*4882a593Smuzhiyun============================= 75*4882a593Smuzhiyun 76*4882a593SmuzhiyunSets the scancode filter mask of bits to compare. Use in combination 77*4882a593Smuzhiyunwith ``/sys/class/rc/rcN/filter`` to set the bits of the scancode which 78*4882a593Smuzhiyunshould be compared against the expected value. A value of 0 disables the 79*4882a593Smuzhiyunfilter to allow all valid scancodes to be processed. 80*4882a593Smuzhiyun 81*4882a593SmuzhiyunIf the hardware supports it then scancodes which do not match the filter 82*4882a593Smuzhiyunwill be ignored. Otherwise the write will fail with an error. 83*4882a593Smuzhiyun 84*4882a593SmuzhiyunThis value may be reset to 0 if the current protocol is altered. 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun.. _sys_class_rc_rcN_wakeup_protocols: 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun/sys/class/rc/rcN/wakeup_protocols 90*4882a593Smuzhiyun================================== 91*4882a593Smuzhiyun 92*4882a593SmuzhiyunReading this file returns a list of available protocols to use for the 93*4882a593Smuzhiyunwakeup filter, something like:: 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce 96*4882a593Smuzhiyun 97*4882a593SmuzhiyunNote that protocol variants are listed, so ``nec``, ``sony``, ``rc-5``, ``rc-6`` 98*4882a593Smuzhiyunhave their different bit length encodings listed if available. 99*4882a593Smuzhiyun 100*4882a593SmuzhiyunNote that all protocol variants are listed. 101*4882a593Smuzhiyun 102*4882a593SmuzhiyunThe enabled wakeup protocol is shown in [] brackets. 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunOnly one protocol can be selected at a time. 105*4882a593Smuzhiyun 106*4882a593SmuzhiyunWriting "proto" will use "proto" for wakeup events. 107*4882a593Smuzhiyun 108*4882a593SmuzhiyunWriting "none" will disable wakeup. 109*4882a593Smuzhiyun 110*4882a593SmuzhiyunWrite fails with ``EINVAL`` if an invalid protocol combination or unknown 111*4882a593Smuzhiyunprotocol name is used, or if wakeup is not supported by the hardware. 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun 114*4882a593Smuzhiyun.. _sys_class_rc_rcN_wakeup_filter: 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun/sys/class/rc/rcN/wakeup_filter 117*4882a593Smuzhiyun=============================== 118*4882a593Smuzhiyun 119*4882a593SmuzhiyunSets the scancode wakeup filter expected value. Use in combination with 120*4882a593Smuzhiyun``/sys/class/rc/rcN/wakeup_filter_mask`` to set the expected value of 121*4882a593Smuzhiyunthe bits set in the wakeup filter mask to trigger a system wake event. 122*4882a593Smuzhiyun 123*4882a593SmuzhiyunIf the hardware supports it and wakeup_filter_mask is not 0 then 124*4882a593Smuzhiyunscancodes which match the filter will wake the system from e.g. suspend 125*4882a593Smuzhiyunto RAM or power off. Otherwise the write will fail with an error. 126*4882a593Smuzhiyun 127*4882a593SmuzhiyunThis value may be reset to 0 if the wakeup protocol is altered. 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun 130*4882a593Smuzhiyun.. _sys_class_rc_rcN_wakeup_filter_mask: 131*4882a593Smuzhiyun 132*4882a593Smuzhiyun/sys/class/rc/rcN/wakeup_filter_mask 133*4882a593Smuzhiyun==================================== 134*4882a593Smuzhiyun 135*4882a593SmuzhiyunSets the scancode wakeup filter mask of bits to compare. Use in 136*4882a593Smuzhiyuncombination with ``/sys/class/rc/rcN/wakeup_filter`` to set the bits of 137*4882a593Smuzhiyunthe scancode which should be compared against the expected value to 138*4882a593Smuzhiyuntrigger a system wake event. 139*4882a593Smuzhiyun 140*4882a593SmuzhiyunIf the hardware supports it and wakeup_filter_mask is not 0 then 141*4882a593Smuzhiyunscancodes which match the filter will wake the system from e.g. suspend 142*4882a593Smuzhiyunto RAM or power off. Otherwise the write will fail with an error. 143*4882a593Smuzhiyun 144*4882a593SmuzhiyunThis value may be reset to 0 if the wakeup protocol is altered. 145