William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 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 |
William Breathitt Gray | b061f1a | 2017-02-08 09:01:45 -0500 | [diff] [blame] | 6 | KernelVersion: 4.10 |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 7 | Contact: linux-iio@vger.kernel.org |
| 8 | Description: |
| 9 | Discrete set of available values for the respective counter |
| 10 | configuration are listed in this file. |
| 11 | |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 12 | What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_mode |
William Breathitt Gray | b061f1a | 2017-02-08 09:01:45 -0500 | [diff] [blame] | 13 | KernelVersion: 4.10 |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 14 | Contact: linux-iio@vger.kernel.org |
| 15 | Description: |
| 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 | |
| 46 | What: /sys/bus/iio/devices/iio:deviceX/in_countY_noise_error |
William Breathitt Gray | b061f1a | 2017-02-08 09:01:45 -0500 | [diff] [blame] | 47 | KernelVersion: 4.10 |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 48 | Contact: linux-iio@vger.kernel.org |
| 49 | Description: |
| 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 | |
| 54 | What: /sys/bus/iio/devices/iio:deviceX/in_countY_preset |
William Breathitt Gray | b061f1a | 2017-02-08 09:01:45 -0500 | [diff] [blame] | 55 | KernelVersion: 4.10 |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 56 | Contact: linux-iio@vger.kernel.org |
| 57 | Description: |
| 58 | If the counter device supports preset registers, the preset |
| 59 | count for channel Y is provided by this attribute. |
| 60 | |
| 61 | What: /sys/bus/iio/devices/iio:deviceX/in_countY_quadrature_mode |
William Breathitt Gray | b061f1a | 2017-02-08 09:01:45 -0500 | [diff] [blame] | 62 | KernelVersion: 4.10 |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 63 | Contact: linux-iio@vger.kernel.org |
| 64 | Description: |
| 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 | |
| 82 | What: /sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index |
William Breathitt Gray | b061f1a | 2017-02-08 09:01:45 -0500 | [diff] [blame] | 83 | KernelVersion: 4.10 |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 84 | Contact: linux-iio@vger.kernel.org |
| 85 | Description: |
| 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 | |
| 90 | What: /sys/bus/iio/devices/iio:deviceX/in_indexY_index_polarity |
William Breathitt Gray | b061f1a | 2017-02-08 09:01:45 -0500 | [diff] [blame] | 91 | KernelVersion: 4.10 |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 92 | Contact: linux-iio@vger.kernel.org |
| 93 | Description: |
| 94 | Active level of channel Y index input; irrelevant in |
| 95 | non-synchronous load mode. |
| 96 | |
| 97 | What: /sys/bus/iio/devices/iio:deviceX/in_indexY_synchronous_mode |
William Breathitt Gray | b061f1a | 2017-02-08 09:01:45 -0500 | [diff] [blame] | 98 | KernelVersion: 4.10 |
William Breathitt Gray | 28e5d3b | 2016-09-28 14:00:01 -0400 | [diff] [blame] | 99 | Contact: linux-iio@vger.kernel.org |
| 100 | Description: |
| 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. |