1 What: /sys/bus/counter/devices/counterX/countY/count
3 Contact: linux-iio@vger.kernel.org
5 Count data of Count Y represented as a string.
7 What: /sys/bus/counter/devices/counterX/countY/capture
9 Contact: linux-iio@vger.kernel.org
11 Historical capture of the Count Y count data.
13 What: /sys/bus/counter/devices/counterX/countY/ceiling
15 Contact: linux-iio@vger.kernel.org
17 Count value ceiling for Count Y. This is the upper limit for the
20 What: /sys/bus/counter/devices/counterX/countY/floor
22 Contact: linux-iio@vger.kernel.org
24 Count value floor for Count Y. This is the lower limit for the
27 What: /sys/bus/counter/devices/counterX/countY/count_mode
29 Contact: linux-iio@vger.kernel.org
31 Count mode for channel Y. The ceiling and floor values for
32 Count Y are used by the count mode where required. The following
33 count modes are available:
36 Counting is continuous in either direction.
39 An upper or lower limit is set, mimicking limit switches
40 in the mechanical counterpart. The upper limit is set to
41 the Count Y ceiling value, while the lower limit is set
42 to the Count Y floor value. The counter freezes at
43 count = ceiling when counting up, and at count = floor
44 when counting down. At either of these limits, the
45 counting is resumed only when the count direction is
49 The counter is disabled whenever a counter overflow or
50 underflow takes place. The counter is re-enabled when a
51 new count value is loaded to the counter via a preset
52 operation or direct write.
55 A count value boundary is set between the Count Y floor
56 value and the Count Y ceiling value. The counter is
57 reset to the Count Y floor value at count = ceiling when
58 counting up, while the counter is set to the Count Y
59 ceiling value at count = floor when counting down; the
60 counter does not freeze at the boundary points, but
61 counts continuously throughout.
63 What: /sys/bus/counter/devices/counterX/countY/count_mode_available
64 What: /sys/bus/counter/devices/counterX/countY/error_noise_available
65 What: /sys/bus/counter/devices/counterX/countY/function_available
66 What: /sys/bus/counter/devices/counterX/countY/prescaler_available
67 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available
69 Contact: linux-iio@vger.kernel.org
71 Discrete set of available values for the respective Count Y
72 configuration are listed in this file. Values are delimited by
75 What: /sys/bus/counter/devices/counterX/countY/direction
77 Contact: linux-iio@vger.kernel.org
79 Read-only attribute that indicates the count direction of Count
80 Y. Two count directions are available: forward and backward.
82 Some counter devices are able to determine the direction of
83 their counting. For example, quadrature encoding counters can
84 determine the direction of movement by evaluating the leading
85 phase of the respective A and B quadrature encoding signals.
86 This attribute exposes such count directions.
88 What: /sys/bus/counter/devices/counterX/countY/enable
90 Contact: linux-iio@vger.kernel.org
92 Whether channel Y counter is enabled. Valid attribute values are
95 This attribute is intended to serve as a pause/unpause mechanism
96 for Count Y. Suppose a counter device is used to count the total
97 movement of a conveyor belt: this attribute allows an operator
98 to temporarily pause the counter, service the conveyor belt,
99 and then finally unpause the counter to continue where it had
102 What: /sys/bus/counter/devices/counterX/countY/error_noise
104 Contact: linux-iio@vger.kernel.org
106 Read-only attribute that indicates whether excessive noise is
107 present at the channel Y counter inputs.
109 What: /sys/bus/counter/devices/counterX/countY/function
111 Contact: linux-iio@vger.kernel.org
113 Count function mode of Count Y; count function evaluation is
114 triggered by conditions specified by the Count Y signalZ_action
115 attributes. The following count functions are available:
118 Accumulated count is incremented.
121 Accumulated count is decremented.
124 Rising edges on signal A updates the respective count.
125 The input level of signal B determines direction.
128 If direction is forward, rising edges on quadrature pair
129 signal A updates the respective count; if the direction
130 is backward, falling edges on quadrature pair signal A
131 updates the respective count. Quadrature encoding
132 determines the direction.
135 If direction is forward, rising edges on quadrature pair
136 signal B updates the respective count; if the direction
137 is backward, falling edges on quadrature pair signal B
138 updates the respective count. Quadrature encoding
139 determines the direction.
142 Any state transition on quadrature pair signal A updates
143 the respective count. Quadrature encoding determines the
147 Any state transition on quadrature pair signal B updates
148 the respective count. Quadrature encoding determines the
152 Any state transition on either quadrature pair signals
153 updates the respective count. Quadrature encoding
154 determines the direction.
156 What: /sys/bus/counter/devices/counterX/countY/name
158 Contact: linux-iio@vger.kernel.org
160 Read-only attribute that indicates the device-specific name of
161 Count Y. If possible, this should match the name of the
162 respective channel as it appears in the device datasheet.
164 What: /sys/bus/counter/devices/counterX/countY/prescaler
166 Contact: linux-iio@vger.kernel.org
168 Configure the prescaler value associated with Count Y.
169 On the FlexTimer, the counter clock source passes through a
170 prescaler (i.e. a counter). This acts like a clock
173 What: /sys/bus/counter/devices/counterX/countY/preset
175 Contact: linux-iio@vger.kernel.org
177 If the counter device supports preset registers -- registers
178 used to load counter channels to a set count upon device-defined
179 preset operation trigger events -- the preset count for channel
180 Y is provided by this attribute.
182 What: /sys/bus/counter/devices/counterX/countY/preset_enable
184 Contact: linux-iio@vger.kernel.org
186 Whether channel Y counter preset operation is enabled. Valid
187 attribute values are boolean.
189 What: /sys/bus/counter/devices/counterX/countY/signalZ_action
191 Contact: linux-iio@vger.kernel.org
193 Action mode of Count Y for Signal Z. This attribute indicates
194 the condition of Signal Z that triggers the count function
195 evaluation for Count Y. The following action modes are
199 Signal does not trigger the count function. In
200 Pulse-Direction count function mode, this Signal is
201 evaluated as Direction.
204 Low state transitions to high state.
207 High state transitions to low state.
210 Any state transition.
212 What: /sys/bus/counter/devices/counterX/countY/num_overflows
214 Contact: linux-iio@vger.kernel.org
216 This attribute indicates the number of overflows of count Y.
218 What: /sys/bus/counter/devices/counterX/countY/capture_component_id
219 What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id
220 What: /sys/bus/counter/devices/counterX/countY/floor_component_id
221 What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id
222 What: /sys/bus/counter/devices/counterX/countY/direction_component_id
223 What: /sys/bus/counter/devices/counterX/countY/enable_component_id
224 What: /sys/bus/counter/devices/counterX/countY/error_noise_component_id
225 What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id
226 What: /sys/bus/counter/devices/counterX/countY/preset_component_id
227 What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id
228 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
229 What: /sys/bus/counter/devices/counterX/countY/num_overflows_component_id
230 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id
231 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
232 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
233 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
234 What: /sys/bus/counter/devices/counterX/signalY/polarity_component_id
235 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
236 What: /sys/bus/counter/devices/counterX/signalY/frequency_component_id
238 Contact: linux-iio@vger.kernel.org
240 Read-only attribute that indicates the component ID of the
241 respective extension or Synapse.
243 What: /sys/bus/counter/devices/counterX/countY/spike_filter_ns
245 Contact: linux-iio@vger.kernel.org
247 If the counter device supports programmable spike filter this
248 attribute indicates the value in nanoseconds where noise pulses
249 shorter or equal to configured value are ignored. Value 0 means
252 What: /sys/bus/counter/devices/counterX/events_queue_size
254 Contact: linux-iio@vger.kernel.org
256 Size of the Counter events queue in number of struct
257 counter_event data structures. The number of elements will be
258 rounded-up to a power of 2.
260 What: /sys/bus/counter/devices/counterX/name
262 Contact: linux-iio@vger.kernel.org
264 Read-only attribute that indicates the device-specific name of
265 the Counter. This should match the name of the device as it
266 appears in its respective datasheet.
268 What: /sys/bus/counter/devices/counterX/num_counts
270 Contact: linux-iio@vger.kernel.org
272 Read-only attribute that indicates the total number of Counts
273 belonging to the Counter.
275 What: /sys/bus/counter/devices/counterX/num_signals
277 Contact: linux-iio@vger.kernel.org
279 Read-only attribute that indicates the total number of Signals
280 belonging to the Counter.
282 What: /sys/bus/counter/devices/counterX/signalY/cable_fault
284 Contact: linux-iio@vger.kernel.org
286 Read-only attribute that indicates whether a differential
287 encoder cable fault (not connected or loose wires) is detected
288 for the respective channel of Signal Y. Valid attribute values
289 are boolean. Detection must first be enabled via the
290 corresponding cable_fault_enable attribute.
292 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable
294 Contact: linux-iio@vger.kernel.org
296 Whether detection of differential encoder cable faults for the
297 respective channel of Signal Y is enabled. Valid attribute
300 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler
302 Contact: linux-iio@vger.kernel.org
304 Filter clock factor for input Signal Y. This prescaler value
305 affects the inputs of both quadrature pair signals.
307 What: /sys/bus/counter/devices/counterX/signalY/index_polarity
309 Contact: linux-iio@vger.kernel.org
311 Active level of index input Signal Y; irrelevant in
312 non-synchronous load mode.
314 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_available
315 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
317 Contact: linux-iio@vger.kernel.org
319 Discrete set of available values for the respective Signal Y
320 configuration are listed in this file.
322 What: /sys/bus/counter/devices/counterX/signalY/polarity
324 Contact: linux-iio@vger.kernel.org
326 Active level of Signal Y. The following polarity values are
330 Signal high state considered active level (rising edge).
333 Signal low state considered active level (falling edge).
335 What: /sys/bus/counter/devices/counterX/signalY/name
337 Contact: linux-iio@vger.kernel.org
339 Read-only attribute that indicates the device-specific name of
340 Signal Y. If possible, this should match the name of the
341 respective signal as it appears in the device datasheet.
343 What: /sys/bus/counter/devices/counterX/signalY/signal
345 Contact: linux-iio@vger.kernel.org
347 Signal level state of Signal Y. The following signal level
348 states are available:
356 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode
358 Contact: linux-iio@vger.kernel.org
360 Configure the counter associated with Signal Y for
361 non-synchronous or synchronous load mode. Synchronous load mode
362 cannot be selected in non-quadrature (Pulse-Direction) clock
366 A logic low level is the active level at this index
367 input. The index function (as enabled via preset_enable)
368 is performed directly on the active level of the index
372 Intended for interfacing with encoder Index output in
373 quadrature clock mode. The active level is configured
374 via index_polarity. The index function (as enabled via
375 preset_enable) is performed synchronously with the
376 quadrature clock on the active level of the index input.
378 What: /sys/bus/counter/devices/counterX/signalY/frequency
380 Contact: linux-iio@vger.kernel.org
382 Read-only attribute that indicates the signal Y frequency, in Hz.