Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | What: /sys/class/rc/ |
| 2 | Date: Apr 2010 |
| 3 | KernelVersion: 2.6.35 |
| 4 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 5 | Description: |
| 6 | The rc/ class sub-directory belongs to the Remote Controller |
| 7 | core and provides a sysfs interface for configuring infrared |
| 8 | remote controller receivers. |
| 9 | |
| 10 | What: /sys/class/rc/rcN/ |
| 11 | Date: Apr 2010 |
| 12 | KernelVersion: 2.6.35 |
| 13 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 14 | Description: |
| 15 | A /sys/class/rc/rcN directory is created for each remote |
| 16 | control receiver device where N is the number of the receiver. |
| 17 | |
| 18 | What: /sys/class/rc/rcN/protocols |
| 19 | Date: Jun 2010 |
| 20 | KernelVersion: 2.6.36 |
| 21 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 22 | Description: |
| 23 | Reading this file returns a list of available protocols, |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 24 | something like:: |
| 25 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 26 | "rc5 [rc6] nec jvc [sony]" |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 27 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 28 | Enabled protocols are shown in [] brackets. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 29 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 30 | Writing "+proto" will add a protocol to the list of enabled |
| 31 | protocols. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 32 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 33 | Writing "-proto" will remove a protocol from the list of enabled |
| 34 | protocols. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 35 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 36 | Writing "proto" will enable only "proto". |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 37 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 38 | Writing "none" will disable all protocols. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 39 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 40 | Write fails with EINVAL if an invalid protocol combination or |
| 41 | unknown protocol name is used. |
| 42 | |
| 43 | What: /sys/class/rc/rcN/filter |
| 44 | Date: Jan 2014 |
| 45 | KernelVersion: 3.15 |
| 46 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 47 | Description: |
| 48 | Sets the scancode filter expected value. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 49 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 50 | Use in combination with /sys/class/rc/rcN/filter_mask to set the |
| 51 | expected value of the bits set in the filter mask. |
| 52 | If the hardware supports it then scancodes which do not match |
| 53 | the filter will be ignored. Otherwise the write will fail with |
| 54 | an error. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 55 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 56 | This value may be reset to 0 if the current protocol is altered. |
| 57 | |
| 58 | What: /sys/class/rc/rcN/filter_mask |
| 59 | Date: Jan 2014 |
| 60 | KernelVersion: 3.15 |
| 61 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 62 | Description: |
| 63 | Sets the scancode filter mask of bits to compare. |
| 64 | Use in combination with /sys/class/rc/rcN/filter to set the bits |
| 65 | of the scancode which should be compared against the expected |
| 66 | value. A value of 0 disables the filter to allow all valid |
| 67 | scancodes to be processed. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 68 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 69 | If the hardware supports it then scancodes which do not match |
| 70 | the filter will be ignored. Otherwise the write will fail with |
| 71 | an error. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 72 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 73 | This value may be reset to 0 if the current protocol is altered. |
| 74 | |
| 75 | What: /sys/class/rc/rcN/wakeup_protocols |
| 76 | Date: Feb 2017 |
| 77 | KernelVersion: 4.11 |
| 78 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 79 | Description: |
| 80 | Reading this file returns a list of available protocols to use |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 81 | for the wakeup filter, something like:: |
| 82 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 83 | "rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce" |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 84 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 85 | Note that protocol variants are listed, so "nec", "sony", |
| 86 | "rc-5", "rc-6" have their different bit length encodings |
| 87 | listed if available. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 88 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 89 | The enabled wakeup protocol is shown in [] brackets. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 90 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 91 | Only one protocol can be selected at a time. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 92 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 93 | Writing "proto" will use "proto" for wakeup events. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 94 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 95 | Writing "none" will disable wakeup. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 96 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 97 | Write fails with EINVAL if an invalid protocol combination or |
| 98 | unknown protocol name is used, or if wakeup is not supported by |
| 99 | the hardware. |
| 100 | |
| 101 | What: /sys/class/rc/rcN/wakeup_filter |
| 102 | Date: Jan 2014 |
| 103 | KernelVersion: 3.15 |
| 104 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 105 | Description: |
| 106 | Sets the scancode wakeup filter expected value. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 107 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 108 | Use in combination with /sys/class/rc/rcN/wakeup_filter_mask to |
| 109 | set the expected value of the bits set in the wakeup filter mask |
| 110 | to trigger a system wake event. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 111 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 112 | If the hardware supports it and wakeup_filter_mask is not 0 then |
| 113 | scancodes which match the filter will wake the system from e.g. |
| 114 | suspend to RAM or power off. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 115 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 116 | Otherwise the write will fail with an error. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 117 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 118 | This value may be reset to 0 if the wakeup protocol is altered. |
| 119 | |
| 120 | What: /sys/class/rc/rcN/wakeup_filter_mask |
| 121 | Date: Jan 2014 |
| 122 | KernelVersion: 3.15 |
| 123 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 124 | Description: |
| 125 | Sets the scancode wakeup filter mask of bits to compare. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 126 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 127 | Use in combination with /sys/class/rc/rcN/wakeup_filter to set |
| 128 | the bits of the scancode which should be compared against the |
| 129 | expected value to trigger a system wake event. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 130 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 131 | If the hardware supports it and wakeup_filter_mask is not 0 then |
| 132 | scancodes which match the filter will wake the system from e.g. |
| 133 | suspend to RAM or power off. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 134 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 135 | Otherwise the write will fail with an error. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 136 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 137 | This value may be reset to 0 if the wakeup protocol is altered. |