| 1 |
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later |
| 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 |
rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce |
| 96 |
|
| 97 |
Note that protocol variants are listed, so ``nec``, ``sony``, ``rc-5``, ``rc-6`` |
| 98 |
have their different bit length encodings listed if available. |
| 99 |
|
| 100 |
Note that all protocol variants are listed. |
| 101 |
|
| 102 |
The enabled wakeup protocol is shown in [] brackets. |
| 103 |
|
| 104 |
Only one protocol can be selected at a time. |
| 105 |
|
| 106 |
Writing "proto" will use "proto" for wakeup events. |
| 107 |
|
| 108 |
Writing "none" will disable wakeup. |
| 109 |
|
| 110 |
Write fails with ``EINVAL`` if an invalid protocol combination or unknown |
| 111 |
protocol name is used, or if wakeup is not supported by the hardware. |
| 112 |
|
| 113 |
|
| 114 |
.. _sys_class_rc_rcN_wakeup_filter: |
| 115 |
|
| 116 |
/sys/class/rc/rcN/wakeup_filter |
| 117 |
=============================== |
| 118 |
|
| 119 |
Sets the scancode wakeup filter expected value. Use in combination with |
| 120 |
``/sys/class/rc/rcN/wakeup_filter_mask`` to set the expected value of |
| 121 |
the bits set in the wakeup filter mask to trigger a system wake event. |
| 122 |
|
| 123 |
If the hardware supports it and wakeup_filter_mask is not 0 then |
| 124 |
scancodes which match the filter will wake the system from e.g. suspend |
| 125 |
to RAM or power off. Otherwise the write will fail with an error. |
| 126 |
|
| 127 |
This value may be reset to 0 if the wakeup protocol is altered. |
| 128 |
|
| 129 |
|
| 130 |
.. _sys_class_rc_rcN_wakeup_filter_mask: |
| 131 |
|
| 132 |
/sys/class/rc/rcN/wakeup_filter_mask |
| 133 |
==================================== |
| 134 |
|
| 135 |
Sets the scancode wakeup filter mask of bits to compare. Use in |
| 136 |
combination with ``/sys/class/rc/rcN/wakeup_filter`` to set the bits of |
| 137 |
the scancode which should be compared against the expected value to |
| 138 |
trigger a system wake event. |
| 139 |
|
| 140 |
If the hardware supports it and wakeup_filter_mask is not 0 then |
| 141 |
scancodes which match the filter will wake the system from e.g. suspend |
| 142 |
to RAM or power off. Otherwise the write will fail with an error. |
| 143 |
|
| 144 |
This value may be reset to 0 if the wakeup protocol is altered. |