xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/sysfs-bus-iio-counter-104-quad-8 (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_count_count_mode_available
2*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_count_noise_error_available
3*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available
4*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_index_index_polarity_available
5*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_index_synchronous_mode_available
6*4882a593SmuzhiyunKernelVersion:	4.10
7*4882a593SmuzhiyunContact:	linux-iio@vger.kernel.org
8*4882a593SmuzhiyunDescription:
9*4882a593Smuzhiyun		This interface is deprecated; please use the Counter subsystem.
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun		Discrete set of available values for the respective counter
12*4882a593Smuzhiyun		configuration are listed in this file.
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_countY_count_mode
15*4882a593SmuzhiyunKernelVersion:	4.10
16*4882a593SmuzhiyunContact:	linux-iio@vger.kernel.org
17*4882a593SmuzhiyunDescription:
18*4882a593Smuzhiyun		This interface is deprecated; please use the Counter subsystem.
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun		Count mode for channel Y. Four count modes are available:
21*4882a593Smuzhiyun		normal, range limit, non-recycle, and modulo-n. The preset value
22*4882a593Smuzhiyun		for channel Y is used by the count mode where required.
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun		Normal:
25*4882a593Smuzhiyun			Counting is continuous in either direction.
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun		Range Limit:
28*4882a593Smuzhiyun			An upper or lower limit is set, mimicking limit switches
29*4882a593Smuzhiyun			in the mechanical counterpart. The upper limit is set to
30*4882a593Smuzhiyun			the preset value, while the lower limit is set to 0. The
31*4882a593Smuzhiyun			counter freezes at count = preset when counting up, and
32*4882a593Smuzhiyun			at count = 0 when counting down. At either of these
33*4882a593Smuzhiyun			limits, the counting is resumed only when the count
34*4882a593Smuzhiyun			direction is reversed.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun		Non-recycle:
37*4882a593Smuzhiyun			Counter is disabled whenever a 24-bit count overflow or
38*4882a593Smuzhiyun			underflow takes place. The counter is re-enabled when a
39*4882a593Smuzhiyun			new count value is loaded to the counter via a preset
40*4882a593Smuzhiyun			operation or write to raw.
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun		Modulo-N:
43*4882a593Smuzhiyun			A count boundary is set between 0 and the preset value.
44*4882a593Smuzhiyun			The counter is reset to 0 at count = preset when
45*4882a593Smuzhiyun			counting up, while the counter is set to the preset
46*4882a593Smuzhiyun			value at count = 0 when counting down; the counter does
47*4882a593Smuzhiyun			not freeze at the bundary points, but counts
48*4882a593Smuzhiyun			continuously throughout.
49*4882a593Smuzhiyun
50*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_countY_noise_error
51*4882a593SmuzhiyunKernelVersion:	4.10
52*4882a593SmuzhiyunContact:	linux-iio@vger.kernel.org
53*4882a593SmuzhiyunDescription:
54*4882a593Smuzhiyun		This interface is deprecated; please use the Counter subsystem.
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun		Read-only attribute that indicates whether excessive noise is
57*4882a593Smuzhiyun		present at the channel Y count inputs in quadrature clock mode;
58*4882a593Smuzhiyun		irrelevant in non-quadrature clock mode.
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_countY_preset
61*4882a593SmuzhiyunKernelVersion:	4.10
62*4882a593SmuzhiyunContact:	linux-iio@vger.kernel.org
63*4882a593SmuzhiyunDescription:
64*4882a593Smuzhiyun		This interface is deprecated; please use the Counter subsystem.
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun		If the counter device supports preset registers, the preset
67*4882a593Smuzhiyun		count for channel Y is provided by this attribute.
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_countY_quadrature_mode
70*4882a593SmuzhiyunKernelVersion:	4.10
71*4882a593SmuzhiyunContact:	linux-iio@vger.kernel.org
72*4882a593SmuzhiyunDescription:
73*4882a593Smuzhiyun		This interface is deprecated; please use the Counter subsystem.
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun		Configure channel Y counter for non-quadrature or quadrature
76*4882a593Smuzhiyun		clock mode. Selecting non-quadrature clock mode will disable
77*4882a593Smuzhiyun		synchronous load mode. In quadrature clock mode, the channel Y
78*4882a593Smuzhiyun		scale attribute selects the encoder phase division (scale of 1
79*4882a593Smuzhiyun		selects full-cycle, scale of 0.5 selects half-cycle, scale of
80*4882a593Smuzhiyun		0.25 selects quarter-cycle) processed by the channel Y counter.
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun		Non-quadrature:
83*4882a593Smuzhiyun			The filter and decoder circuit are bypassed. Encoder A
84*4882a593Smuzhiyun			input serves as the count input and B as the UP/DOWN
85*4882a593Smuzhiyun			direction control input, with B = 1 selecting UP Count
86*4882a593Smuzhiyun			mode and B = 0 selecting Down Count mode.
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun		Quadrature:
89*4882a593Smuzhiyun			Encoder A and B inputs are digitally filtered and
90*4882a593Smuzhiyun			decoded for UP/DN clock.
91*4882a593Smuzhiyun
92*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index
93*4882a593SmuzhiyunKernelVersion:	4.10
94*4882a593SmuzhiyunContact:	linux-iio@vger.kernel.org
95*4882a593SmuzhiyunDescription:
96*4882a593Smuzhiyun		This interface is deprecated; please use the Counter subsystem.
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun		Whether to set channel Y counter with channel Y preset value
99*4882a593Smuzhiyun		when channel Y index input is active, or continuously count.
100*4882a593Smuzhiyun		Valid attribute values are boolean.
101*4882a593Smuzhiyun
102*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_indexY_index_polarity
103*4882a593SmuzhiyunKernelVersion:	4.10
104*4882a593SmuzhiyunContact:	linux-iio@vger.kernel.org
105*4882a593SmuzhiyunDescription:
106*4882a593Smuzhiyun		This interface is deprecated; please use the Counter subsystem.
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun		Active level of channel Y index input; irrelevant in
109*4882a593Smuzhiyun		non-synchronous load mode.
110*4882a593Smuzhiyun
111*4882a593SmuzhiyunWhat:		/sys/bus/iio/devices/iio:deviceX/in_indexY_synchronous_mode
112*4882a593SmuzhiyunKernelVersion:	4.10
113*4882a593SmuzhiyunContact:	linux-iio@vger.kernel.org
114*4882a593SmuzhiyunDescription:
115*4882a593Smuzhiyun		This interface is deprecated; please use the Counter subsystem.
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun		Configure channel Y counter for non-synchronous or synchronous
118*4882a593Smuzhiyun		load mode. Synchronous load mode cannot be selected in
119*4882a593Smuzhiyun		non-quadrature clock mode.
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun		Non-synchronous:
122*4882a593Smuzhiyun			A logic low level is the active level at this index
123*4882a593Smuzhiyun			input. The index function (as enabled via
124*4882a593Smuzhiyun			set_to_preset_on_index) is performed directly on the
125*4882a593Smuzhiyun			active level of the index input.
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun		Synchronous:
128*4882a593Smuzhiyun			Intended for interfacing with encoder Index output in
129*4882a593Smuzhiyun			quadrature clock mode. The active level is configured
130*4882a593Smuzhiyun			via index_polarity. The index function (as enabled via
131*4882a593Smuzhiyun			set_to_preset_on_index) is performed synchronously with
132*4882a593Smuzhiyun			the quadrature clock on the active level of the index
133*4882a593Smuzhiyun			input.
134