blob: 7fac2c268d9a9050e06d7248bcc33dbdf30978bb [file] [log] [blame]
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -04001What: /sys/bus/iio/devices/iio:deviceX/in_count_count_mode_available
2What: /sys/bus/iio/devices/iio:deviceX/in_count_noise_error_available
3What: /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available
4What: /sys/bus/iio/devices/iio:deviceX/in_index_index_polarity_available
5What: /sys/bus/iio/devices/iio:deviceX/in_index_synchronous_mode_available
William Breathitt Grayb061f1a2017-02-08 09:01:45 -05006KernelVersion: 4.10
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -04007Contact: linux-iio@vger.kernel.org
8Description:
9 Discrete set of available values for the respective counter
10 configuration are listed in this file.
11
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -040012What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_mode
William Breathitt Grayb061f1a2017-02-08 09:01:45 -050013KernelVersion: 4.10
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -040014Contact: linux-iio@vger.kernel.org
15Description:
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.
19
20 Normal:
21 Counting is continuous in either direction.
22
23 Range Limit:
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.
31
32 Non-recycle:
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.
37
38 Modulo-N:
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.
45
46What: /sys/bus/iio/devices/iio:deviceX/in_countY_noise_error
William Breathitt Grayb061f1a2017-02-08 09:01:45 -050047KernelVersion: 4.10
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -040048Contact: linux-iio@vger.kernel.org
49Description:
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.
53
54What: /sys/bus/iio/devices/iio:deviceX/in_countY_preset
William Breathitt Grayb061f1a2017-02-08 09:01:45 -050055KernelVersion: 4.10
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -040056Contact: linux-iio@vger.kernel.org
57Description:
58 If the counter device supports preset registers, the preset
59 count for channel Y is provided by this attribute.
60
61What: /sys/bus/iio/devices/iio:deviceX/in_countY_quadrature_mode
William Breathitt Grayb061f1a2017-02-08 09:01:45 -050062KernelVersion: 4.10
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -040063Contact: linux-iio@vger.kernel.org
64Description:
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.
71
72 Non-quadrature:
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.
77
78 Quadrature:
79 Encoder A and B inputs are digitally filtered and
80 decoded for UP/DN clock.
81
82What: /sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index
William Breathitt Grayb061f1a2017-02-08 09:01:45 -050083KernelVersion: 4.10
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -040084Contact: linux-iio@vger.kernel.org
85Description:
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.
89
90What: /sys/bus/iio/devices/iio:deviceX/in_indexY_index_polarity
William Breathitt Grayb061f1a2017-02-08 09:01:45 -050091KernelVersion: 4.10
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -040092Contact: linux-iio@vger.kernel.org
93Description:
94 Active level of channel Y index input; irrelevant in
95 non-synchronous load mode.
96
97What: /sys/bus/iio/devices/iio:deviceX/in_indexY_synchronous_mode
William Breathitt Grayb061f1a2017-02-08 09:01:45 -050098KernelVersion: 4.10
William Breathitt Gray28e5d3b2016-09-28 14:00:01 -040099Contact: linux-iio@vger.kernel.org
100Description:
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.
104
105 Non-synchronous:
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.
110
111 Synchronous:
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
117 input.