1What:		/sys/bus/counter/devices/counterX/countY/count
2KernelVersion:	5.2
3Contact:	[email protected]
4Description:
5		Count data of Count Y represented as a string.
6
7What:		/sys/bus/counter/devices/counterX/countY/ceiling
8KernelVersion:	5.2
9Contact:	[email protected]
10Description:
11		Count value ceiling for Count Y. This is the upper limit for the
12		respective counter.
13
14What:		/sys/bus/counter/devices/counterX/countY/floor
15KernelVersion:	5.2
16Contact:	[email protected]
17Description:
18		Count value floor for Count Y. This is the lower limit for the
19		respective counter.
20
21What:		/sys/bus/counter/devices/counterX/countY/count_mode
22KernelVersion:	5.2
23Contact:	[email protected]
24Description:
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:
28
29		normal:
30			Counting is continuous in either direction.
31
32		range limit:
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
40			reversed.
41
42		non-recycle:
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.
47
48		modulo-n:
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.
56
57What:		/sys/bus/counter/devices/counterX/countY/count_mode_available
58What:		/sys/bus/counter/devices/counterX/countY/error_noise_available
59What:		/sys/bus/counter/devices/counterX/countY/function_available
60What:		/sys/bus/counter/devices/counterX/countY/prescaler_available
61What:		/sys/bus/counter/devices/counterX/countY/signalZ_action_available
62KernelVersion:	5.2
63Contact:	[email protected]
64Description:
65		Discrete set of available values for the respective Count Y
66		configuration are listed in this file. Values are delimited by
67		newline characters.
68
69What:		/sys/bus/counter/devices/counterX/countY/direction
70KernelVersion:	5.2
71Contact:	[email protected]
72Description:
73		Read-only attribute that indicates the count direction of Count
74		Y. Two count directions are available: forward and backward.
75
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.
81
82What:		/sys/bus/counter/devices/counterX/countY/enable
83KernelVersion:	5.2
84Contact:	[email protected]
85Description:
86		Whether channel Y counter is enabled. Valid attribute values are
87		boolean.
88
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
94		left off.
95
96What:		/sys/bus/counter/devices/counterX/countY/error_noise
97KernelVersion:	5.2
98Contact:	[email protected]
99Description:
100		Read-only attribute that indicates whether excessive noise is
101		present at the channel Y counter inputs.
102
103What:		/sys/bus/counter/devices/counterX/countY/function
104KernelVersion:	5.2
105Contact:	[email protected]
106Description:
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:
110
111		increase:
112			Accumulated count is incremented.
113
114		decrease:
115			Accumulated count is decremented.
116
117		pulse-direction:
118			Rising edges on signal A updates the respective count.
119			The input level of signal B determines direction.
120
121		quadrature x1 a:
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.
127
128		quadrature x1 b:
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.
134
135		quadrature x2 a:
136			Any state transition on quadrature pair signal A updates
137			the respective count. Quadrature encoding determines the
138			direction.
139
140		quadrature x2 b:
141			Any state transition on quadrature pair signal B updates
142			the respective count. Quadrature encoding determines the
143			direction.
144
145		quadrature x4:
146			Any state transition on either quadrature pair signals
147			updates	the respective count. Quadrature encoding
148			determines the direction.
149
150What:		/sys/bus/counter/devices/counterX/countY/name
151KernelVersion:	5.2
152Contact:	[email protected]
153Description:
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.
157
158What:		/sys/bus/counter/devices/counterX/countY/prescaler
159KernelVersion:	5.2
160Contact:	[email protected]
161Description:
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
165		divider.
166
167What:		/sys/bus/counter/devices/counterX/countY/preset
168KernelVersion:	5.2
169Contact:	[email protected]
170Description:
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.
175
176What:		/sys/bus/counter/devices/counterX/countY/preset_enable
177KernelVersion:	5.2
178Contact:	[email protected]
179Description:
180		Whether channel Y counter preset operation is enabled. Valid
181		attribute values are boolean.
182
183What:		/sys/bus/counter/devices/counterX/countY/signalZ_action
184KernelVersion:	5.2
185Contact:	[email protected]
186Description:
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
190		available:
191
192		none:
193			Signal does not trigger the count function. In
194			Pulse-Direction count function mode, this Signal is
195			evaluated as Direction.
196
197		rising edge:
198			Low state transitions to high state.
199
200		falling edge:
201			High state transitions to low state.
202
203		both edges:
204			Any state transition.
205
206What:		/sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
207KernelVersion:	5.16
208Contact:	[email protected]
209Description:
210		Read-only attribute that indicates the component ID of the
211		respective Synapse of Count Y for Signal Z.
212
213What:		/sys/bus/counter/devices/counterX/countY/spike_filter_ns
214KernelVersion:	5.14
215Contact:	[email protected]
216Description:
217		If the counter device supports programmable spike filter this
218		attribute indicates the value in nanoseconds where noise pulses
219		shorter or equal to configured value are ignored. Value 0 means
220		filter is disabled.
221
222What:		/sys/bus/counter/devices/counterX/name
223KernelVersion:	5.2
224Contact:	[email protected]
225Description:
226		Read-only attribute that indicates the device-specific name of
227		the Counter. This should match the name of the device as it
228		appears in its respective datasheet.
229
230What:		/sys/bus/counter/devices/counterX/num_counts
231KernelVersion:	5.2
232Contact:	[email protected]
233Description:
234		Read-only attribute that indicates the total number of Counts
235		belonging to the Counter.
236
237What:		/sys/bus/counter/devices/counterX/num_signals
238KernelVersion:	5.2
239Contact:	[email protected]
240Description:
241		Read-only attribute that indicates the total number of Signals
242		belonging to the Counter.
243
244What:		/sys/bus/counter/devices/counterX/signalY/cable_fault
245KernelVersion:	5.7
246Contact:	[email protected]
247Description:
248		Read-only attribute that indicates whether a differential
249		encoder cable fault (not connected or loose wires) is detected
250		for the respective channel of Signal Y. Valid attribute values
251		are boolean. Detection must first be enabled via the
252		corresponding cable_fault_enable attribute.
253
254What:		/sys/bus/counter/devices/counterX/signalY/cable_fault_enable
255KernelVersion:	5.7
256Contact:	[email protected]
257Description:
258		Whether detection of differential encoder cable faults for the
259		respective channel of Signal Y is enabled. Valid attribute
260		values are boolean.
261
262What:		/sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler
263KernelVersion:	5.7
264Contact:	[email protected]
265Description:
266		Filter clock factor for input Signal Y. This prescaler value
267		affects the inputs of both quadrature pair signals.
268
269What:		/sys/bus/counter/devices/counterX/signalY/index_polarity
270KernelVersion:	5.2
271Contact:	[email protected]
272Description:
273		Active level of index input Signal Y; irrelevant in
274		non-synchronous load mode.
275
276What:		/sys/bus/counter/devices/counterX/signalY/index_polarity_available
277What:		/sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
278KernelVersion:	5.2
279Contact:	[email protected]
280Description:
281		Discrete set of available values for the respective Signal Y
282		configuration are listed in this file.
283
284What:		/sys/bus/counter/devices/counterX/signalY/name
285KernelVersion:	5.2
286Contact:	[email protected]
287Description:
288		Read-only attribute that indicates the device-specific name of
289		Signal Y. If possible, this should match the name of the
290		respective signal as it appears in the device datasheet.
291
292What:		/sys/bus/counter/devices/counterX/signalY/signal
293KernelVersion:	5.2
294Contact:	[email protected]
295Description:
296		Signal level state of Signal Y. The following signal level
297		states are available:
298
299		low:
300			Low level state.
301
302		high:
303			High level state.
304
305What:		/sys/bus/counter/devices/counterX/signalY/synchronous_mode
306KernelVersion:	5.2
307Contact:	[email protected]
308Description:
309		Configure the counter associated with Signal Y for
310		non-synchronous or synchronous load mode. Synchronous load mode
311		cannot be selected in non-quadrature (Pulse-Direction) clock
312		mode.
313
314		non-synchronous:
315			A logic low level is the active level at this index
316			input. The index function (as enabled via preset_enable)
317			is performed directly on the active level of the index
318			input.
319
320		synchronous:
321			Intended for interfacing with encoder Index output in
322			quadrature clock mode. The active level is configured
323			via index_polarity. The index function (as enabled via
324			preset_enable) is performed synchronously with the
325			quadrature clock on the active level of the index input.
326