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/ceiling
9 Contact: linux-iio@vger.kernel.org
11 Count value ceiling for Count Y. This is the upper limit for the
14 What: /sys/bus/counter/devices/counterX/countY/floor
16 Contact: linux-iio@vger.kernel.org
18 Count value floor for Count Y. This is the lower limit for the
21 What: /sys/bus/counter/devices/counterX/countY/count_mode
23 Contact: linux-iio@vger.kernel.org
25 Count mode for channel Y. The ceiling and floor values for
26 Count Y are used by the count mode where required. The following
27 count modes are available:
30 Counting is continuous in either direction.
33 An upper or lower limit is set, mimicking limit switches
34 in the mechanical counterpart. The upper limit is set to
35 the Count Y ceiling value, while the lower limit is set
36 to the Count Y floor value. The counter freezes at
37 count = ceiling when counting up, and at count = floor
38 when counting down. At either of these limits, the
39 counting is resumed only when the count direction is
43 The counter is disabled whenever a counter overflow or
44 underflow takes place. The counter is re-enabled when a
45 new count value is loaded to the counter via a preset
46 operation or direct write.
49 A count value boundary is set between the Count Y floor
50 value and the Count Y ceiling value. The counter is
51 reset to the Count Y floor value at count = ceiling when
52 counting up, while the counter is set to the Count Y
53 ceiling value at count = floor when counting down; the
54 counter does not freeze at the boundary points, but
55 counts continuously throughout.
57 What: /sys/bus/counter/devices/counterX/countY/count_mode_available
58 What: /sys/bus/counter/devices/counterX/countY/error_noise_available
59 What: /sys/bus/counter/devices/counterX/countY/function_available
60 What: /sys/bus/counter/devices/counterX/countY/prescaler_available
61 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available
63 Contact: linux-iio@vger.kernel.org
65 Discrete set of available values for the respective Count Y
66 configuration are listed in this file. Values are delimited by
69 What: /sys/bus/counter/devices/counterX/countY/direction
71 Contact: linux-iio@vger.kernel.org
73 Read-only attribute that indicates the count direction of Count
74 Y. Two count directions are available: forward and backward.
76 Some counter devices are able to determine the direction of
77 their counting. For example, quadrature encoding counters can
78 determine the direction of movement by evaluating the leading
79 phase of the respective A and B quadrature encoding signals.
80 This attribute exposes such count directions.
82 What: /sys/bus/counter/devices/counterX/countY/enable
84 Contact: linux-iio@vger.kernel.org
86 Whether channel Y counter is enabled. Valid attribute values are
89 This attribute is intended to serve as a pause/unpause mechanism
90 for Count Y. Suppose a counter device is used to count the total
91 movement of a conveyor belt: this attribute allows an operator
92 to temporarily pause the counter, service the conveyor belt,
93 and then finally unpause the counter to continue where it had
96 What: /sys/bus/counter/devices/counterX/countY/error_noise
98 Contact: linux-iio@vger.kernel.org
100 Read-only attribute that indicates whether excessive noise is
101 present at the channel Y counter inputs.
103 What: /sys/bus/counter/devices/counterX/countY/function
105 Contact: linux-iio@vger.kernel.org
107 Count function mode of Count Y; count function evaluation is
108 triggered by conditions specified by the Count Y signalZ_action
109 attributes. The following count functions are available:
112 Accumulated count is incremented.
115 Accumulated count is decremented.
118 Rising edges on signal A updates the respective count.
119 The input level of signal B determines direction.
122 If direction is forward, rising edges on quadrature pair
123 signal A updates the respective count; if the direction
124 is backward, falling edges on quadrature pair signal A
125 updates the respective count. Quadrature encoding
126 determines the direction.
129 If direction is forward, rising edges on quadrature pair
130 signal B updates the respective count; if the direction
131 is backward, falling edges on quadrature pair signal B
132 updates the respective count. Quadrature encoding
133 determines the direction.
136 Any state transition on quadrature pair signal A updates
137 the respective count. Quadrature encoding determines the
141 Any state transition on quadrature pair signal B updates
142 the respective count. Quadrature encoding determines the
146 Any state transition on either quadrature pair signals
147 updates the respective count. Quadrature encoding
148 determines the direction.
150 What: /sys/bus/counter/devices/counterX/countY/name
152 Contact: linux-iio@vger.kernel.org
154 Read-only attribute that indicates the device-specific name of
155 Count Y. If possible, this should match the name of the
156 respective channel as it appears in the device datasheet.
158 What: /sys/bus/counter/devices/counterX/countY/prescaler
160 Contact: linux-iio@vger.kernel.org
162 Configure the prescaler value associated with Count Y.
163 On the FlexTimer, the counter clock source passes through a
164 prescaler (i.e. a counter). This acts like a clock
167 What: /sys/bus/counter/devices/counterX/countY/preset
169 Contact: linux-iio@vger.kernel.org
171 If the counter device supports preset registers -- registers
172 used to load counter channels to a set count upon device-defined
173 preset operation trigger events -- the preset count for channel
174 Y is provided by this attribute.
176 What: /sys/bus/counter/devices/counterX/countY/preset_enable
178 Contact: linux-iio@vger.kernel.org
180 Whether channel Y counter preset operation is enabled. Valid
181 attribute values are boolean.
183 What: /sys/bus/counter/devices/counterX/countY/signalZ_action
185 Contact: linux-iio@vger.kernel.org
187 Action mode of Count Y for Signal Z. This attribute indicates
188 the condition of Signal Z that triggers the count function
189 evaluation for Count Y. The following action modes are
193 Signal does not trigger the count function. In
194 Pulse-Direction count function mode, this Signal is
195 evaluated as Direction.
198 Low state transitions to high state.
201 High state transitions to low state.
204 Any state transition.
206 What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id
207 What: /sys/bus/counter/devices/counterX/countY/floor_component_id
208 What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id
209 What: /sys/bus/counter/devices/counterX/countY/direction_component_id
210 What: /sys/bus/counter/devices/counterX/countY/enable_component_id
211 What: /sys/bus/counter/devices/counterX/countY/error_noise_component_id
212 What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id
213 What: /sys/bus/counter/devices/counterX/countY/preset_component_id
214 What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id
215 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
216 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id
217 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
218 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
219 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
220 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
222 Contact: linux-iio@vger.kernel.org
224 Read-only attribute that indicates the component ID of the
225 respective extension or Synapse.
227 What: /sys/bus/counter/devices/counterX/countY/spike_filter_ns
229 Contact: linux-iio@vger.kernel.org
231 If the counter device supports programmable spike filter this
232 attribute indicates the value in nanoseconds where noise pulses
233 shorter or equal to configured value are ignored. Value 0 means
236 What: /sys/bus/counter/devices/counterX/events_queue_size
238 Contact: linux-iio@vger.kernel.org
240 Size of the Counter events queue in number of struct
241 counter_event data structures. The number of elements will be
242 rounded-up to a power of 2.
244 What: /sys/bus/counter/devices/counterX/name
246 Contact: linux-iio@vger.kernel.org
248 Read-only attribute that indicates the device-specific name of
249 the Counter. This should match the name of the device as it
250 appears in its respective datasheet.
252 What: /sys/bus/counter/devices/counterX/num_counts
254 Contact: linux-iio@vger.kernel.org
256 Read-only attribute that indicates the total number of Counts
257 belonging to the Counter.
259 What: /sys/bus/counter/devices/counterX/num_signals
261 Contact: linux-iio@vger.kernel.org
263 Read-only attribute that indicates the total number of Signals
264 belonging to the Counter.
266 What: /sys/bus/counter/devices/counterX/signalY/cable_fault
268 Contact: linux-iio@vger.kernel.org
270 Read-only attribute that indicates whether a differential
271 encoder cable fault (not connected or loose wires) is detected
272 for the respective channel of Signal Y. Valid attribute values
273 are boolean. Detection must first be enabled via the
274 corresponding cable_fault_enable attribute.
276 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable
278 Contact: linux-iio@vger.kernel.org
280 Whether detection of differential encoder cable faults for the
281 respective channel of Signal Y is enabled. Valid attribute
284 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler
286 Contact: linux-iio@vger.kernel.org
288 Filter clock factor for input Signal Y. This prescaler value
289 affects the inputs of both quadrature pair signals.
291 What: /sys/bus/counter/devices/counterX/signalY/index_polarity
293 Contact: linux-iio@vger.kernel.org
295 Active level of index input Signal Y; irrelevant in
296 non-synchronous load mode.
298 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_available
299 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
301 Contact: linux-iio@vger.kernel.org
303 Discrete set of available values for the respective Signal Y
304 configuration are listed in this file.
306 What: /sys/bus/counter/devices/counterX/signalY/name
308 Contact: linux-iio@vger.kernel.org
310 Read-only attribute that indicates the device-specific name of
311 Signal Y. If possible, this should match the name of the
312 respective signal as it appears in the device datasheet.
314 What: /sys/bus/counter/devices/counterX/signalY/signal
316 Contact: linux-iio@vger.kernel.org
318 Signal level state of Signal Y. The following signal level
319 states are available:
327 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode
329 Contact: linux-iio@vger.kernel.org
331 Configure the counter associated with Signal Y for
332 non-synchronous or synchronous load mode. Synchronous load mode
333 cannot be selected in non-quadrature (Pulse-Direction) clock
337 A logic low level is the active level at this index
338 input. The index function (as enabled via preset_enable)
339 is performed directly on the active level of the index
343 Intended for interfacing with encoder Index output in
344 quadrature clock mode. The active level is configured
345 via index_polarity. The index function (as enabled via
346 preset_enable) is performed synchronously with the
347 quadrature clock on the active level of the index input.