Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
0002 
0003 .. _remote_controllers_sysfs_nodes:
0004 
0005 *******************************
0006 Remote Controller's sysfs nodes
0007 *******************************
0008 
0009 As defined at ``Documentation/ABI/testing/sysfs-class-rc``, those are
0010 the sysfs nodes that control the Remote Controllers:
0011 
0012 
0013 .. _sys_class_rc:
0014 
0015 /sys/class/rc/
0016 ==============
0017 
0018 The ``/sys/class/rc/`` class sub-directory belongs to the Remote
0019 Controller core and provides a sysfs interface for configuring infrared
0020 remote controller receivers.
0021 
0022 
0023 .. _sys_class_rc_rcN:
0024 
0025 /sys/class/rc/rcN/
0026 ==================
0027 
0028 A ``/sys/class/rc/rcN`` directory is created for each remote control
0029 receiver device where N is the number of the receiver.
0030 
0031 
0032 .. _sys_class_rc_rcN_protocols:
0033 
0034 /sys/class/rc/rcN/protocols
0035 ===========================
0036 
0037 Reading this file returns a list of available protocols, something like::
0038 
0039         rc5 [rc6] nec jvc [sony]
0040 
0041 Enabled protocols are shown in [] brackets.
0042 
0043 Writing "+proto" will add a protocol to the list of enabled protocols.
0044 
0045 Writing "-proto" will remove a protocol from the list of enabled
0046 protocols.
0047 
0048 Writing "proto" will enable only "proto".
0049 
0050 Writing "none" will disable all protocols.
0051 
0052 Write fails with ``EINVAL`` if an invalid protocol combination or unknown
0053 protocol name is used.
0054 
0055 
0056 .. _sys_class_rc_rcN_filter:
0057 
0058 /sys/class/rc/rcN/filter
0059 ========================
0060 
0061 Sets the scancode filter expected value.
0062 
0063 Use in combination with ``/sys/class/rc/rcN/filter_mask`` to set the
0064 expected value of the bits set in the filter mask. If the hardware
0065 supports it then scancodes which do not match the filter will be
0066 ignored. Otherwise the write will fail with an error.
0067 
0068 This value may be reset to 0 if the current protocol is altered.
0069 
0070 
0071 .. _sys_class_rc_rcN_filter_mask:
0072 
0073 /sys/class/rc/rcN/filter_mask
0074 =============================
0075 
0076 Sets the scancode filter mask of bits to compare. Use in combination
0077 with ``/sys/class/rc/rcN/filter`` to set the bits of the scancode which
0078 should be compared against the expected value. A value of 0 disables the
0079 filter to allow all valid scancodes to be processed.
0080 
0081 If the hardware supports it then scancodes which do not match the filter
0082 will be ignored. Otherwise the write will fail with an error.
0083 
0084 This value may be reset to 0 if the current protocol is altered.
0085 
0086 
0087 .. _sys_class_rc_rcN_wakeup_protocols:
0088 
0089 /sys/class/rc/rcN/wakeup_protocols
0090 ==================================
0091 
0092 Reading this file returns a list of available protocols to use for the
0093 wakeup filter, something like::
0094 
0095         rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce
0096 
0097 Note that protocol variants are listed, so ``nec``, ``sony``, ``rc-5``, ``rc-6``
0098 have their different bit length encodings listed if available.
0099 
0100 Note that all protocol variants are listed.
0101 
0102 The enabled wakeup protocol is shown in [] brackets.
0103 
0104 Only one protocol can be selected at a time.
0105 
0106 Writing "proto" will use "proto" for wakeup events.
0107 
0108 Writing "none" will disable wakeup.
0109 
0110 Write fails with ``EINVAL`` if an invalid protocol combination or unknown
0111 protocol name is used, or if wakeup is not supported by the hardware.
0112 
0113 
0114 .. _sys_class_rc_rcN_wakeup_filter:
0115 
0116 /sys/class/rc/rcN/wakeup_filter
0117 ===============================
0118 
0119 Sets the scancode wakeup filter expected value. Use in combination with
0120 ``/sys/class/rc/rcN/wakeup_filter_mask`` to set the expected value of
0121 the bits set in the wakeup filter mask to trigger a system wake event.
0122 
0123 If the hardware supports it and wakeup_filter_mask is not 0 then
0124 scancodes which match the filter will wake the system from e.g. suspend
0125 to RAM or power off. Otherwise the write will fail with an error.
0126 
0127 This value may be reset to 0 if the wakeup protocol is altered.
0128 
0129 
0130 .. _sys_class_rc_rcN_wakeup_filter_mask:
0131 
0132 /sys/class/rc/rcN/wakeup_filter_mask
0133 ====================================
0134 
0135 Sets the scancode wakeup filter mask of bits to compare. Use in
0136 combination with ``/sys/class/rc/rcN/wakeup_filter`` to set the bits of
0137 the scancode which should be compared against the expected value to
0138 trigger a system wake event.
0139 
0140 If the hardware supports it and wakeup_filter_mask is not 0 then
0141 scancodes which match the filter will wake the system from e.g. suspend
0142 to RAM or power off. Otherwise the write will fail with an error.
0143 
0144 This value may be reset to 0 if the wakeup protocol is altered.