rc-sysfs-nodes.rst 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _remote_controllers_sysfs_nodes:
  3. *******************************
  4. Remote Controller's sysfs nodes
  5. *******************************
  6. As defined at ``Documentation/ABI/testing/sysfs-class-rc``, those are
  7. the sysfs nodes that control the Remote Controllers:
  8. .. _sys_class_rc:
  9. /sys/class/rc/
  10. ==============
  11. The ``/sys/class/rc/`` class sub-directory belongs to the Remote
  12. Controller core and provides a sysfs interface for configuring infrared
  13. remote controller receivers.
  14. .. _sys_class_rc_rcN:
  15. /sys/class/rc/rcN/
  16. ==================
  17. A ``/sys/class/rc/rcN`` directory is created for each remote control
  18. receiver device where N is the number of the receiver.
  19. .. _sys_class_rc_rcN_protocols:
  20. /sys/class/rc/rcN/protocols
  21. ===========================
  22. Reading this file returns a list of available protocols, something like:
  23. ``rc5 [rc6] nec jvc [sony]``
  24. Enabled protocols are shown in [] brackets.
  25. Writing "+proto" will add a protocol to the list of enabled protocols.
  26. Writing "-proto" will remove a protocol from the list of enabled
  27. protocols.
  28. Writing "proto" will enable only "proto".
  29. Writing "none" will disable all protocols.
  30. Write fails with ``EINVAL`` if an invalid protocol combination or unknown
  31. protocol name is used.
  32. .. _sys_class_rc_rcN_filter:
  33. /sys/class/rc/rcN/filter
  34. ========================
  35. Sets the scancode filter expected value.
  36. Use in combination with ``/sys/class/rc/rcN/filter_mask`` to set the
  37. expected value of the bits set in the filter mask. If the hardware
  38. supports it then scancodes which do not match the filter will be
  39. ignored. Otherwise the write will fail with an error.
  40. This value may be reset to 0 if the current protocol is altered.
  41. .. _sys_class_rc_rcN_filter_mask:
  42. /sys/class/rc/rcN/filter_mask
  43. =============================
  44. Sets the scancode filter mask of bits to compare. Use in combination
  45. with ``/sys/class/rc/rcN/filter`` to set the bits of the scancode which
  46. should be compared against the expected value. A value of 0 disables the
  47. filter to allow all valid scancodes to be processed.
  48. If the hardware supports it then scancodes which do not match the filter
  49. will be ignored. Otherwise the write will fail with an error.
  50. This value may be reset to 0 if the current protocol is altered.
  51. .. _sys_class_rc_rcN_wakeup_protocols:
  52. /sys/class/rc/rcN/wakeup_protocols
  53. ==================================
  54. Reading this file returns a list of available protocols to use for the
  55. wakeup filter, something like:
  56. ``rc5 rc6 nec jvc [sony]``
  57. The enabled wakeup protocol is shown in [] brackets.
  58. Writing "+proto" will add a protocol to the list of enabled wakeup
  59. protocols.
  60. Writing "-proto" will remove a protocol from the list of enabled wakeup
  61. protocols.
  62. Writing "proto" will use "proto" for wakeup events.
  63. Writing "none" will disable wakeup.
  64. Write fails with ``EINVAL`` if an invalid protocol combination or unknown
  65. protocol name is used, or if wakeup is not supported by the hardware.
  66. .. _sys_class_rc_rcN_wakeup_filter:
  67. /sys/class/rc/rcN/wakeup_filter
  68. ===============================
  69. Sets the scancode wakeup filter expected value. Use in combination with
  70. ``/sys/class/rc/rcN/wakeup_filter_mask`` to set the expected value of
  71. the bits set in the wakeup filter mask to trigger a system wake event.
  72. If the hardware supports it and wakeup_filter_mask is not 0 then
  73. scancodes which match the filter will wake the system from e.g. suspend
  74. to RAM or power off. Otherwise the write will fail with an error.
  75. This value may be reset to 0 if the wakeup protocol is altered.
  76. .. _sys_class_rc_rcN_wakeup_filter_mask:
  77. /sys/class/rc/rcN/wakeup_filter_mask
  78. ====================================
  79. Sets the scancode wakeup filter mask of bits to compare. Use in
  80. combination with ``/sys/class/rc/rcN/wakeup_filter`` to set the bits of
  81. the scancode which should be compared against the expected value to
  82. trigger a system wake event.
  83. If the hardware supports it and wakeup_filter_mask is not 0 then
  84. scancodes which match the filter will wake the system from e.g. suspend
  85. to RAM or power off. Otherwise the write will fail with an error.
  86. This value may be reset to 0 if the wakeup protocol is altered.