sysfs-bus-counter 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. What: /sys/bus/counter/devices/counterX/countY/count
  2. KernelVersion: 5.2
  3. Contact: linux-iio@vger.kernel.org
  4. Description:
  5. Count data of Count Y represented as a string.
  6. What: /sys/bus/counter/devices/counterX/countY/ceiling
  7. KernelVersion: 5.2
  8. Contact: linux-iio@vger.kernel.org
  9. Description:
  10. Count value ceiling for Count Y. This is the upper limit for the
  11. respective counter.
  12. What: /sys/bus/counter/devices/counterX/countY/floor
  13. KernelVersion: 5.2
  14. Contact: linux-iio@vger.kernel.org
  15. Description:
  16. Count value floor for Count Y. This is the lower limit for the
  17. respective counter.
  18. What: /sys/bus/counter/devices/counterX/countY/count_mode
  19. KernelVersion: 5.2
  20. Contact: linux-iio@vger.kernel.org
  21. Description:
  22. Count mode for channel Y. The ceiling and floor values for
  23. Count Y are used by the count mode where required. The following
  24. count modes are available:
  25. normal:
  26. Counting is continuous in either direction.
  27. range limit:
  28. An upper or lower limit is set, mimicking limit switches
  29. in the mechanical counterpart. The upper limit is set to
  30. the Count Y ceiling value, while the lower limit is set
  31. to the Count Y floor value. The counter freezes at
  32. count = ceiling when counting up, and at count = floor
  33. when counting down. At either of these limits, the
  34. counting is resumed only when the count direction is
  35. reversed.
  36. non-recycle:
  37. The counter is disabled whenever a counter overflow or
  38. underflow takes place. The counter is re-enabled when a
  39. new count value is loaded to the counter via a preset
  40. operation or direct write.
  41. modulo-n:
  42. A count value boundary is set between the Count Y floor
  43. value and the Count Y ceiling value. The counter is
  44. reset to the Count Y floor value at count = ceiling when
  45. counting up, while the counter is set to the Count Y
  46. ceiling value at count = floor when counting down; the
  47. counter does not freeze at the boundary points, but
  48. counts continuously throughout.
  49. What: /sys/bus/counter/devices/counterX/countY/count_mode_available
  50. What: /sys/bus/counter/devices/counterX/countY/error_noise_available
  51. What: /sys/bus/counter/devices/counterX/countY/function_available
  52. What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available
  53. KernelVersion: 5.2
  54. Contact: linux-iio@vger.kernel.org
  55. Description:
  56. Discrete set of available values for the respective Count Y
  57. configuration are listed in this file. Values are delimited by
  58. newline characters.
  59. What: /sys/bus/counter/devices/counterX/countY/direction
  60. KernelVersion: 5.2
  61. Contact: linux-iio@vger.kernel.org
  62. Description:
  63. Read-only attribute that indicates the count direction of Count
  64. Y. Two count directions are available: forward and backward.
  65. Some counter devices are able to determine the direction of
  66. their counting. For example, quadrature encoding counters can
  67. determine the direction of movement by evaluating the leading
  68. phase of the respective A and B quadrature encoding signals.
  69. This attribute exposes such count directions.
  70. What: /sys/bus/counter/devices/counterX/countY/enable
  71. KernelVersion: 5.2
  72. Contact: linux-iio@vger.kernel.org
  73. Description:
  74. Whether channel Y counter is enabled. Valid attribute values are
  75. boolean.
  76. This attribute is intended to serve as a pause/unpause mechanism
  77. for Count Y. Suppose a counter device is used to count the total
  78. movement of a conveyor belt: this attribute allows an operator
  79. to temporarily pause the counter, service the conveyor belt,
  80. and then finally unpause the counter to continue where it had
  81. left off.
  82. What: /sys/bus/counter/devices/counterX/countY/error_noise
  83. KernelVersion: 5.2
  84. Contact: linux-iio@vger.kernel.org
  85. Description:
  86. Read-only attribute that indicates whether excessive noise is
  87. present at the channel Y counter inputs.
  88. What: /sys/bus/counter/devices/counterX/countY/function
  89. KernelVersion: 5.2
  90. Contact: linux-iio@vger.kernel.org
  91. Description:
  92. Count function mode of Count Y; count function evaluation is
  93. triggered by conditions specified by the Count Y signalZ_action
  94. attributes. The following count functions are available:
  95. increase:
  96. Accumulated count is incremented.
  97. decrease:
  98. Accumulated count is decremented.
  99. pulse-direction:
  100. Rising edges on signal A updates the respective count.
  101. The input level of signal B determines direction.
  102. quadrature x1 a:
  103. If direction is forward, rising edges on quadrature pair
  104. signal A updates the respective count; if the direction
  105. is backward, falling edges on quadrature pair signal A
  106. updates the respective count. Quadrature encoding
  107. determines the direction.
  108. quadrature x1 b:
  109. If direction is forward, rising edges on quadrature pair
  110. signal B updates the respective count; if the direction
  111. is backward, falling edges on quadrature pair signal B
  112. updates the respective count. Quadrature encoding
  113. determines the direction.
  114. quadrature x2 a:
  115. Any state transition on quadrature pair signal A updates
  116. the respective count. Quadrature encoding determines the
  117. direction.
  118. quadrature x2 b:
  119. Any state transition on quadrature pair signal B updates
  120. the respective count. Quadrature encoding determines the
  121. direction.
  122. quadrature x4:
  123. Any state transition on either quadrature pair signals
  124. updates the respective count. Quadrature encoding
  125. determines the direction.
  126. What: /sys/bus/counter/devices/counterX/countY/name
  127. KernelVersion: 5.2
  128. Contact: linux-iio@vger.kernel.org
  129. Description:
  130. Read-only attribute that indicates the device-specific name of
  131. Count Y. If possible, this should match the name of the
  132. respective channel as it appears in the device datasheet.
  133. What: /sys/bus/counter/devices/counterX/countY/preset
  134. KernelVersion: 5.2
  135. Contact: linux-iio@vger.kernel.org
  136. Description:
  137. If the counter device supports preset registers -- registers
  138. used to load counter channels to a set count upon device-defined
  139. preset operation trigger events -- the preset count for channel
  140. Y is provided by this attribute.
  141. What: /sys/bus/counter/devices/counterX/countY/preset_enable
  142. KernelVersion: 5.2
  143. Contact: linux-iio@vger.kernel.org
  144. Description:
  145. Whether channel Y counter preset operation is enabled. Valid
  146. attribute values are boolean.
  147. What: /sys/bus/counter/devices/counterX/countY/signalZ_action
  148. KernelVersion: 5.2
  149. Contact: linux-iio@vger.kernel.org
  150. Description:
  151. Action mode of Count Y for Signal Z. This attribute indicates
  152. the condition of Signal Z that triggers the count function
  153. evaluation for Count Y. The following action modes are
  154. available:
  155. none:
  156. Signal does not trigger the count function. In
  157. Pulse-Direction count function mode, this Signal is
  158. evaluated as Direction.
  159. rising edge:
  160. Low state transitions to high state.
  161. falling edge:
  162. High state transitions to low state.
  163. both edges:
  164. Any state transition.
  165. What: /sys/bus/counter/devices/counterX/name
  166. KernelVersion: 5.2
  167. Contact: linux-iio@vger.kernel.org
  168. Description:
  169. Read-only attribute that indicates the device-specific name of
  170. the Counter. This should match the name of the device as it
  171. appears in its respective datasheet.
  172. What: /sys/bus/counter/devices/counterX/num_counts
  173. KernelVersion: 5.2
  174. Contact: linux-iio@vger.kernel.org
  175. Description:
  176. Read-only attribute that indicates the total number of Counts
  177. belonging to the Counter.
  178. What: /sys/bus/counter/devices/counterX/num_signals
  179. KernelVersion: 5.2
  180. Contact: linux-iio@vger.kernel.org
  181. Description:
  182. Read-only attribute that indicates the total number of Signals
  183. belonging to the Counter.
  184. What: /sys/bus/counter/devices/counterX/signalY/signal
  185. KernelVersion: 5.2
  186. Contact: linux-iio@vger.kernel.org
  187. Description:
  188. Signal data of Signal Y represented as a string.
  189. What: /sys/bus/counter/devices/counterX/signalY/name
  190. KernelVersion: 5.2
  191. Contact: linux-iio@vger.kernel.org
  192. Description:
  193. Read-only attribute that indicates the device-specific name of
  194. Signal Y. If possible, this should match the name of the
  195. respective signal as it appears in the device datasheet.