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 What: /sys/bus/counter/devices/counterX/countY/count_mode_available
94 What: /sys/bus/counter/devices/counterX/countY/error_noise_available
95 What: /sys/bus/counter/devices/counterX/countY/function_available
96 What: /sys/bus/counter/devices/counterX/countY/prescaler_available
97 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available
99 Contact: linux-iio@vger.kernel.org
101 Discrete set of available values for the respective Count Y
102 configuration are listed in this file. Values are delimited by
105 What: /sys/bus/counter/devices/counterX/countY/direction
107 Contact: linux-iio@vger.kernel.org
109 Read-only attribute that indicates the count direction of Count
110 Y. Two count directions are available: forward and backward.
112 Some counter devices are able to determine the direction of
113 their counting. For example, quadrature encoding counters can
114 determine the direction of movement by evaluating the leading
115 phase of the respective A and B quadrature encoding signals.
116 This attribute exposes such count directions.
118 What: /sys/bus/counter/devices/counterX/countY/enable
120 Contact: linux-iio@vger.kernel.org
122 Whether channel Y counter is enabled. Valid attribute values are
125 This attribute is intended to serve as a pause/unpause mechanism
126 for Count Y. Suppose a counter device is used to count the total
127 movement of a conveyor belt: this attribute allows an operator
128 to temporarily pause the counter, service the conveyor belt,
129 and then finally unpause the counter to continue where it had
132 What: /sys/bus/counter/devices/counterX/countY/error_noise
134 Contact: linux-iio@vger.kernel.org
136 Read-only attribute that indicates whether excessive noise is
137 present at the channel Y counter inputs.
139 What: /sys/bus/counter/devices/counterX/countY/function
141 Contact: linux-iio@vger.kernel.org
143 Count function mode of Count Y; count function evaluation is
144 triggered by conditions specified by the Count Y signalZ_action
145 attributes. The following count functions are available:
148 Accumulated count is incremented.
151 Accumulated count is decremented.
154 Rising edges on signal A updates the respective count.
155 The input level of signal B determines direction.
158 If direction is forward, rising edges on quadrature pair
159 signal A updates the respective count; if the direction
160 is backward, falling edges on quadrature pair signal A
161 updates the respective count. Quadrature encoding
162 determines the direction.
165 If direction is forward, rising edges on quadrature pair
166 signal B updates the respective count; if the direction
167 is backward, falling edges on quadrature pair signal B
168 updates the respective count. Quadrature encoding
169 determines the direction.
172 Any state transition on quadrature pair signal A updates
173 the respective count. Quadrature encoding determines the
177 Any state transition on quadrature pair signal B updates
178 the respective count. Quadrature encoding determines the
182 Any state transition on either quadrature pair signals
183 updates the respective count. Quadrature encoding
184 determines the direction.
186 What: /sys/bus/counter/devices/counterX/countY/name
188 Contact: linux-iio@vger.kernel.org
190 Read-only attribute that indicates the device-specific name of
191 Count Y. If possible, this should match the name of the
192 respective channel as it appears in the device datasheet.
194 What: /sys/bus/counter/devices/counterX/countY/prescaler
196 Contact: linux-iio@vger.kernel.org
198 Configure the prescaler value associated with Count Y.
199 On the FlexTimer, the counter clock source passes through a
200 prescaler (i.e. a counter). This acts like a clock
203 What: /sys/bus/counter/devices/counterX/countY/preset
205 Contact: linux-iio@vger.kernel.org
207 If the counter device supports preset registers -- registers
208 used to load counter channels to a set count upon device-defined
209 preset operation trigger events -- the preset count for channel
210 Y is provided by this attribute.
212 What: /sys/bus/counter/devices/counterX/countY/preset_enable
214 Contact: linux-iio@vger.kernel.org
216 Whether channel Y counter preset operation is enabled. Valid
217 attribute values are boolean.
219 What: /sys/bus/counter/devices/counterX/countY/signalZ_action
221 Contact: linux-iio@vger.kernel.org
223 Action mode of Count Y for Signal Z. This attribute indicates
224 the condition of Signal Z that triggers the count function
225 evaluation for Count Y. The following action modes are
229 Signal does not trigger the count function. In
230 Pulse-Direction count function mode, this Signal is
231 evaluated as Direction.
234 Low state transitions to high state.
237 High state transitions to low state.
240 Any state transition.
242 What: /sys/bus/counter/devices/counterX/countY/num_overflows
244 Contact: linux-iio@vger.kernel.org
246 This attribute indicates the number of overflows of count Y.
248 What: /sys/bus/counter/devices/counterX/cascade_counts_enable_component_id
249 What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_component_id
250 What: /sys/bus/counter/devices/counterX/countY/capture_component_id
251 What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id
252 What: /sys/bus/counter/devices/counterX/countY/floor_component_id
253 What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id
254 What: /sys/bus/counter/devices/counterX/countY/direction_component_id
255 What: /sys/bus/counter/devices/counterX/countY/enable_component_id
256 What: /sys/bus/counter/devices/counterX/countY/error_noise_component_id
257 What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id
258 What: /sys/bus/counter/devices/counterX/countY/preset_component_id
259 What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id
260 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
261 What: /sys/bus/counter/devices/counterX/countY/num_overflows_component_id
262 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id
263 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
264 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
265 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
266 What: /sys/bus/counter/devices/counterX/signalY/polarity_component_id
267 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
268 What: /sys/bus/counter/devices/counterX/signalY/frequency_component_id
270 Contact: linux-iio@vger.kernel.org
272 Read-only attribute that indicates the component ID of the
273 respective extension or Synapse.
275 What: /sys/bus/counter/devices/counterX/countY/spike_filter_ns
277 Contact: linux-iio@vger.kernel.org
279 If the counter device supports programmable spike filter this
280 attribute indicates the value in nanoseconds where noise pulses
281 shorter or equal to configured value are ignored. Value 0 means
284 What: /sys/bus/counter/devices/counterX/events_queue_size
286 Contact: linux-iio@vger.kernel.org
288 Size of the Counter events queue in number of struct
289 counter_event data structures. The number of elements will be
290 rounded-up to a power of 2.
292 What: /sys/bus/counter/devices/counterX/name
294 Contact: linux-iio@vger.kernel.org
296 Read-only attribute that indicates the device-specific name of
297 the Counter. This should match the name of the device as it
298 appears in its respective datasheet.
300 What: /sys/bus/counter/devices/counterX/num_counts
302 Contact: linux-iio@vger.kernel.org
304 Read-only attribute that indicates the total number of Counts
305 belonging to the Counter.
307 What: /sys/bus/counter/devices/counterX/num_signals
309 Contact: linux-iio@vger.kernel.org
311 Read-only attribute that indicates the total number of Signals
312 belonging to the Counter.
314 What: /sys/bus/counter/devices/counterX/signalY/cable_fault
316 Contact: linux-iio@vger.kernel.org
318 Read-only attribute that indicates whether a differential
319 encoder cable fault (not connected or loose wires) is detected
320 for the respective channel of Signal Y. Valid attribute values
321 are boolean. Detection must first be enabled via the
322 corresponding cable_fault_enable attribute.
324 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable
326 Contact: linux-iio@vger.kernel.org
328 Whether detection of differential encoder cable faults for the
329 respective channel of Signal Y is enabled. Valid attribute
332 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler
334 Contact: linux-iio@vger.kernel.org
336 Filter clock factor for input Signal Y. This prescaler value
337 affects the inputs of both quadrature pair signals.
339 What: /sys/bus/counter/devices/counterX/signalY/index_polarity
341 Contact: linux-iio@vger.kernel.org
343 Active level of index input Signal Y; irrelevant in
344 non-synchronous load mode.
346 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_available
347 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
349 Contact: linux-iio@vger.kernel.org
351 Discrete set of available values for the respective Signal Y
352 configuration are listed in this file.
354 What: /sys/bus/counter/devices/counterX/signalY/polarity
356 Contact: linux-iio@vger.kernel.org
358 Active level of Signal Y. The following polarity values are
362 Signal high state considered active level (rising edge).
365 Signal low state considered active level (falling edge).
367 What: /sys/bus/counter/devices/counterX/signalY/name
369 Contact: linux-iio@vger.kernel.org
371 Read-only attribute that indicates the device-specific name of
372 Signal Y. If possible, this should match the name of the
373 respective signal as it appears in the device datasheet.
375 What: /sys/bus/counter/devices/counterX/signalY/signal
377 Contact: linux-iio@vger.kernel.org
379 Signal level state of Signal Y. The following signal level
380 states are available:
388 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode
390 Contact: linux-iio@vger.kernel.org
392 Configure the counter associated with Signal Y for
393 non-synchronous or synchronous load mode. Synchronous load mode
394 cannot be selected in non-quadrature (Pulse-Direction) clock
398 A logic low level is the active level at this index
399 input. The index function (as enabled via preset_enable)
400 is performed directly on the active level of the index
404 Intended for interfacing with encoder Index output in
405 quadrature clock mode. The active level is configured
406 via index_polarity. The index function (as enabled via
407 preset_enable) is performed synchronously with the
408 quadrature clock on the active level of the index input.
410 What: /sys/bus/counter/devices/counterX/signalY/frequency
412 Contact: linux-iio@vger.kernel.org
414 Read-only attribute that indicates the signal Y frequency, in Hz.