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