1 What: /sys/bus/iio/devices/iio:deviceX/in_count_count_mode_available
2 What: /sys/bus/iio/devices/iio:deviceX/in_count_noise_error_available
3 What: /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available
4 What: /sys/bus/iio/devices/iio:deviceX/in_index_index_polarity_available
5 What: /sys/bus/iio/devices/iio:deviceX/in_index_synchronous_mode_available
7 Contact: linux-iio@vger.kernel.org
9 Discrete set of available values for the respective counter
10 configuration are listed in this file.
12 What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_mode
14 Contact: linux-iio@vger.kernel.org
16 Count mode for channel Y. Four count modes are available:
17 normal, range limit, non-recycle, and modulo-n. The preset value
18 for channel Y is used by the count mode where required.
21 Counting is continuous in either direction.
24 An upper or lower limit is set, mimicking limit switches
25 in the mechanical counterpart. The upper limit is set to
26 the preset value, while the lower limit is set to 0. The
27 counter freezes at count = preset when counting up, and
28 at count = 0 when counting down. At either of these
29 limits, the counting is resumed only when the count
30 direction is reversed.
33 Counter is disabled whenever a 24-bit count overflow or
34 underflow takes place. The counter is re-enabled when a
35 new count value is loaded to the counter via a preset
36 operation or write to raw.
39 A count boundary is set between 0 and the preset value.
40 The counter is reset to 0 at count = preset when
41 counting up, while the counter is set to the preset
42 value at count = 0 when counting down; the counter does
43 not freeze at the bundary points, but counts
44 continuously throughout.
46 What: /sys/bus/iio/devices/iio:deviceX/in_countY_noise_error
48 Contact: linux-iio@vger.kernel.org
50 Read-only attribute that indicates whether excessive noise is
51 present at the channel Y count inputs in quadrature clock mode;
52 irrelevant in non-quadrature clock mode.
54 What: /sys/bus/iio/devices/iio:deviceX/in_countY_preset
56 Contact: linux-iio@vger.kernel.org
58 If the counter device supports preset registers, the preset
59 count for channel Y is provided by this attribute.
61 What: /sys/bus/iio/devices/iio:deviceX/in_countY_quadrature_mode
63 Contact: linux-iio@vger.kernel.org
65 Configure channel Y counter for non-quadrature or quadrature
66 clock mode. Selecting non-quadrature clock mode will disable
67 synchronous load mode. In quadrature clock mode, the channel Y
68 scale attribute selects the encoder phase division (scale of 1
69 selects full-cycle, scale of 0.5 selects half-cycle, scale of
70 0.25 selects quarter-cycle) processed by the channel Y counter.
73 The filter and decoder circuit are bypassed. Encoder A
74 input serves as the count input and B as the UP/DOWN
75 direction control input, with B = 1 selecting UP Count
76 mode and B = 0 selecting Down Count mode.
79 Encoder A and B inputs are digitally filtered and
80 decoded for UP/DN clock.
82 What: /sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index
84 Contact: linux-iio@vger.kernel.org
86 Whether to set channel Y counter with channel Y preset value
87 when channel Y index input is active, or continuously count.
88 Valid attribute values are boolean.
90 What: /sys/bus/iio/devices/iio:deviceX/in_indexY_index_polarity
92 Contact: linux-iio@vger.kernel.org
94 Active level of channel Y index input; irrelevant in
95 non-synchronous load mode.
97 What: /sys/bus/iio/devices/iio:deviceX/in_indexY_synchronous_mode
99 Contact: linux-iio@vger.kernel.org
101 Configure channel Y counter for non-synchronous or synchronous
102 load mode. Synchronous load mode cannot be selected in
103 non-quadrature clock mode.
106 A logic low level is the active level at this index
107 input. The index function (as enabled via
108 set_to_preset_on_index) is performed directly on the
109 active level of the index input.
112 Intended for interfacing with encoder Index output in
113 quadrature clock mode. The active level is configured
114 via index_polarity. The index function (as enabled via
115 set_to_preset_on_index) is performed synchronously with
116 the quadrature clock on the active level of the index