blob: ba676520b9530e7c6d955ef0cdd6e68a2fd93823 [file] [log] [blame]
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -04001What: /sys/bus/iio/devices/iio:deviceX/in_count_count_direction_available
2What: /sys/bus/iio/devices/iio:deviceX/in_count_count_mode_available
3What: /sys/bus/iio/devices/iio:deviceX/in_count_noise_error_available
4What: /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available
5What: /sys/bus/iio/devices/iio:deviceX/in_index_index_polarity_available
6What: /sys/bus/iio/devices/iio:deviceX/in_index_synchronous_mode_available
7KernelVersion: 4.9
8Contact: linux-iio@vger.kernel.org
9Description:
10 Discrete set of available values for the respective counter
11 configuration are listed in this file.
12
13What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_direction
14KernelVersion: 4.9
15Contact: linux-iio@vger.kernel.org
16Description:
17 Read-only attribute that indicates whether the counter for
18 channel Y is counting up or down.
19
20What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_mode
21KernelVersion: 4.9
22Contact: linux-iio@vger.kernel.org
23Description:
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.
27
28 Normal:
29 Counting is continuous in either direction.
30
31 Range Limit:
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.
39
40 Non-recycle:
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.
45
46 Modulo-N:
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.
53
54What: /sys/bus/iio/devices/iio:deviceX/in_countY_noise_error
55KernelVersion: 4.9
56Contact: linux-iio@vger.kernel.org
57Description:
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.
61
62What: /sys/bus/iio/devices/iio:deviceX/in_countY_preset
63KernelVersion: 4.9
64Contact: linux-iio@vger.kernel.org
65Description:
66 If the counter device supports preset registers, the preset
67 count for channel Y is provided by this attribute.
68
69What: /sys/bus/iio/devices/iio:deviceX/in_countY_quadrature_mode
70KernelVersion: 4.9
71Contact: linux-iio@vger.kernel.org
72Description:
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.
79
80 Non-quadrature:
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.
85
86 Quadrature:
87 Encoder A and B inputs are digitally filtered and
88 decoded for UP/DN clock.
89
90What: /sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index
91KernelVersion: 4.9
92Contact: linux-iio@vger.kernel.org
93Description:
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.
97
98What: /sys/bus/iio/devices/iio:deviceX/in_indexY_index_polarity
99KernelVersion: 4.9
100Contact: linux-iio@vger.kernel.org
101Description:
102 Active level of channel Y index input; irrelevant in
103 non-synchronous load mode.
104
105What: /sys/bus/iio/devices/iio:deviceX/in_indexY_synchronous_mode
106KernelVersion: 4.9
107Contact: linux-iio@vger.kernel.org
108Description:
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.
112
113 Non-synchronous:
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.
118
119 Synchronous:
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
125 input.