1 What: /sys/bus/counter/devices/counterX/cascade_counts_enable
3 Contact: linux-iio@vger.kernel.org
5 Indicates the cascading of Counts on Counter X.
7 Valid attribute values are boolean.
9 What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select
11 Contact: linux-iio@vger.kernel.org
13 Selects the external clock pin for phase counting mode of
17 MTCLKA and MTCLKB pins are selected for the external
21 MTCLKC and MTCLKD pins are selected for the external
24 What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_available
26 Contact: linux-iio@vger.kernel.org
28 Discrete set of available values for the respective device
29 configuration are listed in this file.
31 What: /sys/bus/counter/devices/counterX/countY/count
33 Contact: linux-iio@vger.kernel.org
35 Count data of Count Y represented as a string.
37 What: /sys/bus/counter/devices/counterX/countY/capture
39 Contact: linux-iio@vger.kernel.org
41 Historical capture of the Count Y count data.
43 What: /sys/bus/counter/devices/counterX/countY/ceiling
45 Contact: linux-iio@vger.kernel.org
47 Count value ceiling for Count Y. This is the upper limit for the
50 What: /sys/bus/counter/devices/counterX/countY/floor
52 Contact: linux-iio@vger.kernel.org
54 Count value floor for Count Y. This is the lower limit for the
57 What: /sys/bus/counter/devices/counterX/countY/count_mode
59 Contact: linux-iio@vger.kernel.org
61 Count mode for channel Y. The ceiling and floor values for
62 Count Y are used by the count mode where required. The following
63 count modes are available:
66 Counting is continuous in either direction.
69 An upper or lower limit is set, mimicking limit switches
70 in the mechanical counterpart. The upper limit is set to
71 the Count Y ceiling value, while the lower limit is set
72 to the Count Y floor value. The counter freezes at
73 count = ceiling when counting up, and at count = floor
74 when counting down. At either of these limits, the
75 counting is resumed only when the count direction is
79 The counter is disabled whenever a counter overflow or
80 underflow takes place. The counter is re-enabled when a
81 new count value is loaded to the counter via a preset
82 operation or direct write.
85 A count value boundary is set between the Count Y floor
86 value and the Count Y ceiling value. The counter is
87 reset to the Count Y floor value at count = ceiling when
88 counting up, while the counter is set to the Count Y
89 ceiling value at count = floor when counting down; the
90 counter does not freeze at the boundary points, but
91 counts continuously throughout.
93 interrupt on terminal count:
94 The output signal is initially low, and will remain low
95 until the counter reaches zero. The output signal then
96 goes high and remains high until a new preset value is
99 hardware retriggerable one-shot:
100 The output signal is initially high. The output signal
101 will go low by a trigger input signal, and will remain
102 low until the counter reaches zero. The output will then
103 go high and remain high until the next trigger. A
104 trigger results in loading the counter to the preset
105 value and setting the output signal low, thus starting
109 The output signal is initially high. When the counter
110 has decremented to 1, the output signal goes low for one
111 clock pulse. The output signal then goes high again, the
112 counter is reloaded to the preset value, and the process
113 repeats in a periodic manner as such.
116 The output signal is initially high.
118 If the initial count is even, the counter is decremented
119 by two on succeeding clock pulses. When the count
120 expires, the output signal changes value and the
121 counter is reloaded to the preset value. The process
122 repeats in periodic manner as such.
124 If the initial count is odd, the initial count minus one
125 (an even number) is loaded and then is decremented by
126 two on succeeding clock pulses. One clock pulse after
127 the count expires, the output signal goes low and the
128 counter is reloaded to the preset value minus one.
129 Succeeding clock pulses decrement the count by two. When
130 the count expires, the output goes high again and the
131 counter is reloaded to the preset value minus one. The
132 process repeats in a periodic manner as such.
134 software triggered strobe:
135 The output signal is initially high. When the count
136 expires, the output will go low for one clock pulse and
137 then go high again. The counting sequence is "triggered"
138 by setting the preset value.
140 hardware triggered strobe:
141 The output signal is initially high. Counting is started
142 by a trigger input signal. When the count expires, the
143 output signal will go low for one clock pulse and then
144 go high again. A trigger results in loading the counter
147 What: /sys/bus/counter/devices/counterX/countY/count_mode_available
148 What: /sys/bus/counter/devices/counterX/countY/error_noise_available
149 What: /sys/bus/counter/devices/counterX/countY/function_available
150 What: /sys/bus/counter/devices/counterX/countY/prescaler_available
151 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available
153 Contact: linux-iio@vger.kernel.org
155 Discrete set of available values for the respective Count Y
156 configuration are listed in this file. Values are delimited by
159 What: /sys/bus/counter/devices/counterX/countY/direction
161 Contact: linux-iio@vger.kernel.org
163 Read-only attribute that indicates the count direction of Count
164 Y. Two count directions are available: forward and backward.
166 Some counter devices are able to determine the direction of
167 their counting. For example, quadrature encoding counters can
168 determine the direction of movement by evaluating the leading
169 phase of the respective A and B quadrature encoding signals.
170 This attribute exposes such count directions.
172 What: /sys/bus/counter/devices/counterX/countY/enable
174 Contact: linux-iio@vger.kernel.org
176 Whether channel Y counter is enabled. Valid attribute values are
179 This attribute is intended to serve as a pause/unpause mechanism
180 for Count Y. Suppose a counter device is used to count the total
181 movement of a conveyor belt: this attribute allows an operator
182 to temporarily pause the counter, service the conveyor belt,
183 and then finally unpause the counter to continue where it had
186 What: /sys/bus/counter/devices/counterX/countY/error_noise
188 Contact: linux-iio@vger.kernel.org
190 Read-only attribute that indicates whether excessive noise is
191 present at the channel Y counter inputs.
193 What: /sys/bus/counter/devices/counterX/countY/function
195 Contact: linux-iio@vger.kernel.org
197 Count function mode of Count Y; count function evaluation is
198 triggered by conditions specified by the Count Y signalZ_action
199 attributes. The following count functions are available:
202 Accumulated count is incremented.
205 Accumulated count is decremented.
208 Rising edges on signal A updates the respective count.
209 The input level of signal B determines direction.
212 If direction is forward, rising edges on quadrature pair
213 signal A updates the respective count; if the direction
214 is backward, falling edges on quadrature pair signal A
215 updates the respective count. Quadrature encoding
216 determines the direction.
219 If direction is forward, rising edges on quadrature pair
220 signal B updates the respective count; if the direction
221 is backward, falling edges on quadrature pair signal B
222 updates the respective count. Quadrature encoding
223 determines the direction.
226 Any state transition on quadrature pair signal A updates
227 the respective count. Quadrature encoding determines the
231 Any state transition on quadrature pair signal B updates
232 the respective count. Quadrature encoding determines the
236 Any state transition on either quadrature pair signals
237 updates the respective count. Quadrature encoding
238 determines the direction.
240 What: /sys/bus/counter/devices/counterX/countY/name
242 Contact: linux-iio@vger.kernel.org
244 Read-only attribute that indicates the device-specific name of
245 Count Y. If possible, this should match the name of the
246 respective channel as it appears in the device datasheet.
248 What: /sys/bus/counter/devices/counterX/countY/prescaler
250 Contact: linux-iio@vger.kernel.org
252 Configure the prescaler value associated with Count Y.
253 On the FlexTimer, the counter clock source passes through a
254 prescaler (i.e. a counter). This acts like a clock
257 What: /sys/bus/counter/devices/counterX/countY/preset
259 Contact: linux-iio@vger.kernel.org
261 If the counter device supports preset registers -- registers
262 used to load counter channels to a set count upon device-defined
263 preset operation trigger events -- the preset count for channel
264 Y is provided by this attribute.
266 What: /sys/bus/counter/devices/counterX/countY/preset_enable
268 Contact: linux-iio@vger.kernel.org
270 Whether channel Y counter preset operation is enabled. Valid
271 attribute values are boolean.
273 What: /sys/bus/counter/devices/counterX/countY/signalZ_action
275 Contact: linux-iio@vger.kernel.org
277 Action mode of Count Y for Signal Z. This attribute indicates
278 the condition of Signal Z that triggers the count function
279 evaluation for Count Y. The following action modes are
283 Signal does not trigger the count function. In
284 Pulse-Direction count function mode, this Signal is
285 evaluated as Direction.
288 Low state transitions to high state.
291 High state transitions to low state.
294 Any state transition.
296 What: /sys/bus/counter/devices/counterX/countY/num_overflows
298 Contact: linux-iio@vger.kernel.org
300 This attribute indicates the number of overflows of count Y.
302 What: /sys/bus/counter/devices/counterX/cascade_counts_enable_component_id
303 What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_component_id
304 What: /sys/bus/counter/devices/counterX/countY/capture_component_id
305 What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id
306 What: /sys/bus/counter/devices/counterX/countY/floor_component_id
307 What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id
308 What: /sys/bus/counter/devices/counterX/countY/direction_component_id
309 What: /sys/bus/counter/devices/counterX/countY/enable_component_id
310 What: /sys/bus/counter/devices/counterX/countY/error_noise_component_id
311 What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id
312 What: /sys/bus/counter/devices/counterX/countY/preset_component_id
313 What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id
314 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
315 What: /sys/bus/counter/devices/counterX/countY/num_overflows_component_id
316 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id
317 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
318 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
319 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
320 What: /sys/bus/counter/devices/counterX/signalY/polarity_component_id
321 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
322 What: /sys/bus/counter/devices/counterX/signalY/frequency_component_id
324 Contact: linux-iio@vger.kernel.org
326 Read-only attribute that indicates the component ID of the
327 respective extension or Synapse.
329 What: /sys/bus/counter/devices/counterX/countY/spike_filter_ns
331 Contact: linux-iio@vger.kernel.org
333 If the counter device supports programmable spike filter this
334 attribute indicates the value in nanoseconds where noise pulses
335 shorter or equal to configured value are ignored. Value 0 means
338 What: /sys/bus/counter/devices/counterX/events_queue_size
340 Contact: linux-iio@vger.kernel.org
342 Size of the Counter events queue in number of struct
343 counter_event data structures. The number of elements will be
344 rounded-up to a power of 2.
346 What: /sys/bus/counter/devices/counterX/name
348 Contact: linux-iio@vger.kernel.org
350 Read-only attribute that indicates the device-specific name of
351 the Counter. This should match the name of the device as it
352 appears in its respective datasheet.
354 What: /sys/bus/counter/devices/counterX/num_counts
356 Contact: linux-iio@vger.kernel.org
358 Read-only attribute that indicates the total number of Counts
359 belonging to the Counter.
361 What: /sys/bus/counter/devices/counterX/num_signals
363 Contact: linux-iio@vger.kernel.org
365 Read-only attribute that indicates the total number of Signals
366 belonging to the Counter.
368 What: /sys/bus/counter/devices/counterX/signalY/cable_fault
370 Contact: linux-iio@vger.kernel.org
372 Read-only attribute that indicates whether a differential
373 encoder cable fault (not connected or loose wires) is detected
374 for the respective channel of Signal Y. Valid attribute values
375 are boolean. Detection must first be enabled via the
376 corresponding cable_fault_enable attribute.
378 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable
380 Contact: linux-iio@vger.kernel.org
382 Whether detection of differential encoder cable faults for the
383 respective channel of Signal Y is enabled. Valid attribute
386 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler
388 Contact: linux-iio@vger.kernel.org
390 Filter clock factor for input Signal Y. This prescaler value
391 affects the inputs of both quadrature pair signals.
393 What: /sys/bus/counter/devices/counterX/signalY/index_polarity
395 Contact: linux-iio@vger.kernel.org
397 Active level of index input Signal Y; irrelevant in
398 non-synchronous load mode.
400 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_available
401 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
403 Contact: linux-iio@vger.kernel.org
405 Discrete set of available values for the respective Signal Y
406 configuration are listed in this file.
408 What: /sys/bus/counter/devices/counterX/signalY/polarity
410 Contact: linux-iio@vger.kernel.org
412 Active level of Signal Y. The following polarity values are
416 Signal high state considered active level (rising edge).
419 Signal low state considered active level (falling edge).
421 What: /sys/bus/counter/devices/counterX/signalY/name
423 Contact: linux-iio@vger.kernel.org
425 Read-only attribute that indicates the device-specific name of
426 Signal Y. If possible, this should match the name of the
427 respective signal as it appears in the device datasheet.
429 What: /sys/bus/counter/devices/counterX/signalY/signal
431 Contact: linux-iio@vger.kernel.org
433 Signal level state of Signal Y. The following signal level
434 states are available:
442 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode
444 Contact: linux-iio@vger.kernel.org
446 Configure the counter associated with Signal Y for
447 non-synchronous or synchronous load mode. Synchronous load mode
448 cannot be selected in non-quadrature (Pulse-Direction) clock
452 A logic low level is the active level at this index
453 input. The index function (as enabled via preset_enable)
454 is performed directly on the active level of the index
458 Intended for interfacing with encoder Index output in
459 quadrature clock mode. The active level is configured
460 via index_polarity. The index function (as enabled via
461 preset_enable) is performed synchronously with the
462 quadrature clock on the active level of the index input.
464 What: /sys/bus/counter/devices/counterX/signalY/frequency
466 Contact: linux-iio@vger.kernel.org
468 Read-only attribute that indicates the signal Y frequency, in Hz.