0001 What: /sys/bus/counter/devices/counterX/countY/count
0002 KernelVersion: 5.2
0003 Contact: linux-iio@vger.kernel.org
0004 Description:
0005 Count data of Count Y represented as a string.
0006
0007 What: /sys/bus/counter/devices/counterX/countY/ceiling
0008 KernelVersion: 5.2
0009 Contact: linux-iio@vger.kernel.org
0010 Description:
0011 Count value ceiling for Count Y. This is the upper limit for the
0012 respective counter.
0013
0014 What: /sys/bus/counter/devices/counterX/countY/floor
0015 KernelVersion: 5.2
0016 Contact: linux-iio@vger.kernel.org
0017 Description:
0018 Count value floor for Count Y. This is the lower limit for the
0019 respective counter.
0020
0021 What: /sys/bus/counter/devices/counterX/countY/count_mode
0022 KernelVersion: 5.2
0023 Contact: linux-iio@vger.kernel.org
0024 Description:
0025 Count mode for channel Y. The ceiling and floor values for
0026 Count Y are used by the count mode where required. The following
0027 count modes are available:
0028
0029 normal:
0030 Counting is continuous in either direction.
0031
0032 range limit:
0033 An upper or lower limit is set, mimicking limit switches
0034 in the mechanical counterpart. The upper limit is set to
0035 the Count Y ceiling value, while the lower limit is set
0036 to the Count Y floor value. The counter freezes at
0037 count = ceiling when counting up, and at count = floor
0038 when counting down. At either of these limits, the
0039 counting is resumed only when the count direction is
0040 reversed.
0041
0042 non-recycle:
0043 The counter is disabled whenever a counter overflow or
0044 underflow takes place. The counter is re-enabled when a
0045 new count value is loaded to the counter via a preset
0046 operation or direct write.
0047
0048 modulo-n:
0049 A count value boundary is set between the Count Y floor
0050 value and the Count Y ceiling value. The counter is
0051 reset to the Count Y floor value at count = ceiling when
0052 counting up, while the counter is set to the Count Y
0053 ceiling value at count = floor when counting down; the
0054 counter does not freeze at the boundary points, but
0055 counts continuously throughout.
0056
0057 What: /sys/bus/counter/devices/counterX/countY/count_mode_available
0058 What: /sys/bus/counter/devices/counterX/countY/error_noise_available
0059 What: /sys/bus/counter/devices/counterX/countY/function_available
0060 What: /sys/bus/counter/devices/counterX/countY/prescaler_available
0061 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_available
0062 KernelVersion: 5.2
0063 Contact: linux-iio@vger.kernel.org
0064 Description:
0065 Discrete set of available values for the respective Count Y
0066 configuration are listed in this file. Values are delimited by
0067 newline characters.
0068
0069 What: /sys/bus/counter/devices/counterX/countY/direction
0070 KernelVersion: 5.2
0071 Contact: linux-iio@vger.kernel.org
0072 Description:
0073 Read-only attribute that indicates the count direction of Count
0074 Y. Two count directions are available: forward and backward.
0075
0076 Some counter devices are able to determine the direction of
0077 their counting. For example, quadrature encoding counters can
0078 determine the direction of movement by evaluating the leading
0079 phase of the respective A and B quadrature encoding signals.
0080 This attribute exposes such count directions.
0081
0082 What: /sys/bus/counter/devices/counterX/countY/enable
0083 KernelVersion: 5.2
0084 Contact: linux-iio@vger.kernel.org
0085 Description:
0086 Whether channel Y counter is enabled. Valid attribute values are
0087 boolean.
0088
0089 This attribute is intended to serve as a pause/unpause mechanism
0090 for Count Y. Suppose a counter device is used to count the total
0091 movement of a conveyor belt: this attribute allows an operator
0092 to temporarily pause the counter, service the conveyor belt,
0093 and then finally unpause the counter to continue where it had
0094 left off.
0095
0096 What: /sys/bus/counter/devices/counterX/countY/error_noise
0097 KernelVersion: 5.2
0098 Contact: linux-iio@vger.kernel.org
0099 Description:
0100 Read-only attribute that indicates whether excessive noise is
0101 present at the channel Y counter inputs.
0102
0103 What: /sys/bus/counter/devices/counterX/countY/function
0104 KernelVersion: 5.2
0105 Contact: linux-iio@vger.kernel.org
0106 Description:
0107 Count function mode of Count Y; count function evaluation is
0108 triggered by conditions specified by the Count Y signalZ_action
0109 attributes. The following count functions are available:
0110
0111 increase:
0112 Accumulated count is incremented.
0113
0114 decrease:
0115 Accumulated count is decremented.
0116
0117 pulse-direction:
0118 Rising edges on signal A updates the respective count.
0119 The input level of signal B determines direction.
0120
0121 quadrature x1 a:
0122 If direction is forward, rising edges on quadrature pair
0123 signal A updates the respective count; if the direction
0124 is backward, falling edges on quadrature pair signal A
0125 updates the respective count. Quadrature encoding
0126 determines the direction.
0127
0128 quadrature x1 b:
0129 If direction is forward, rising edges on quadrature pair
0130 signal B updates the respective count; if the direction
0131 is backward, falling edges on quadrature pair signal B
0132 updates the respective count. Quadrature encoding
0133 determines the direction.
0134
0135 quadrature x2 a:
0136 Any state transition on quadrature pair signal A updates
0137 the respective count. Quadrature encoding determines the
0138 direction.
0139
0140 quadrature x2 b:
0141 Any state transition on quadrature pair signal B updates
0142 the respective count. Quadrature encoding determines the
0143 direction.
0144
0145 quadrature x4:
0146 Any state transition on either quadrature pair signals
0147 updates the respective count. Quadrature encoding
0148 determines the direction.
0149
0150 What: /sys/bus/counter/devices/counterX/countY/name
0151 KernelVersion: 5.2
0152 Contact: linux-iio@vger.kernel.org
0153 Description:
0154 Read-only attribute that indicates the device-specific name of
0155 Count Y. If possible, this should match the name of the
0156 respective channel as it appears in the device datasheet.
0157
0158 What: /sys/bus/counter/devices/counterX/countY/prescaler
0159 KernelVersion: 5.2
0160 Contact: linux-iio@vger.kernel.org
0161 Description:
0162 Configure the prescaler value associated with Count Y.
0163 On the FlexTimer, the counter clock source passes through a
0164 prescaler (i.e. a counter). This acts like a clock
0165 divider.
0166
0167 What: /sys/bus/counter/devices/counterX/countY/preset
0168 KernelVersion: 5.2
0169 Contact: linux-iio@vger.kernel.org
0170 Description:
0171 If the counter device supports preset registers -- registers
0172 used to load counter channels to a set count upon device-defined
0173 preset operation trigger events -- the preset count for channel
0174 Y is provided by this attribute.
0175
0176 What: /sys/bus/counter/devices/counterX/countY/preset_enable
0177 KernelVersion: 5.2
0178 Contact: linux-iio@vger.kernel.org
0179 Description:
0180 Whether channel Y counter preset operation is enabled. Valid
0181 attribute values are boolean.
0182
0183 What: /sys/bus/counter/devices/counterX/countY/signalZ_action
0184 KernelVersion: 5.2
0185 Contact: linux-iio@vger.kernel.org
0186 Description:
0187 Action mode of Count Y for Signal Z. This attribute indicates
0188 the condition of Signal Z that triggers the count function
0189 evaluation for Count Y. The following action modes are
0190 available:
0191
0192 none:
0193 Signal does not trigger the count function. In
0194 Pulse-Direction count function mode, this Signal is
0195 evaluated as Direction.
0196
0197 rising edge:
0198 Low state transitions to high state.
0199
0200 falling edge:
0201 High state transitions to low state.
0202
0203 both edges:
0204 Any state transition.
0205
0206 What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id
0207 What: /sys/bus/counter/devices/counterX/countY/floor_component_id
0208 What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id
0209 What: /sys/bus/counter/devices/counterX/countY/direction_component_id
0210 What: /sys/bus/counter/devices/counterX/countY/enable_component_id
0211 What: /sys/bus/counter/devices/counterX/countY/error_noise_component_id
0212 What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id
0213 What: /sys/bus/counter/devices/counterX/countY/preset_component_id
0214 What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id
0215 What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
0216 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id
0217 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
0218 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
0219 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
0220 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
0221 KernelVersion: 5.16
0222 Contact: linux-iio@vger.kernel.org
0223 Description:
0224 Read-only attribute that indicates the component ID of the
0225 respective extension or Synapse.
0226
0227 What: /sys/bus/counter/devices/counterX/countY/spike_filter_ns
0228 KernelVersion: 5.14
0229 Contact: linux-iio@vger.kernel.org
0230 Description:
0231 If the counter device supports programmable spike filter this
0232 attribute indicates the value in nanoseconds where noise pulses
0233 shorter or equal to configured value are ignored. Value 0 means
0234 filter is disabled.
0235
0236 What: /sys/bus/counter/devices/counterX/events_queue_size
0237 KernelVersion: 5.16
0238 Contact: linux-iio@vger.kernel.org
0239 Description:
0240 Size of the Counter events queue in number of struct
0241 counter_event data structures. The number of elements will be
0242 rounded-up to a power of 2.
0243
0244 What: /sys/bus/counter/devices/counterX/name
0245 KernelVersion: 5.2
0246 Contact: linux-iio@vger.kernel.org
0247 Description:
0248 Read-only attribute that indicates the device-specific name of
0249 the Counter. This should match the name of the device as it
0250 appears in its respective datasheet.
0251
0252 What: /sys/bus/counter/devices/counterX/num_counts
0253 KernelVersion: 5.2
0254 Contact: linux-iio@vger.kernel.org
0255 Description:
0256 Read-only attribute that indicates the total number of Counts
0257 belonging to the Counter.
0258
0259 What: /sys/bus/counter/devices/counterX/num_signals
0260 KernelVersion: 5.2
0261 Contact: linux-iio@vger.kernel.org
0262 Description:
0263 Read-only attribute that indicates the total number of Signals
0264 belonging to the Counter.
0265
0266 What: /sys/bus/counter/devices/counterX/signalY/cable_fault
0267 KernelVersion: 5.7
0268 Contact: linux-iio@vger.kernel.org
0269 Description:
0270 Read-only attribute that indicates whether a differential
0271 encoder cable fault (not connected or loose wires) is detected
0272 for the respective channel of Signal Y. Valid attribute values
0273 are boolean. Detection must first be enabled via the
0274 corresponding cable_fault_enable attribute.
0275
0276 What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable
0277 KernelVersion: 5.7
0278 Contact: linux-iio@vger.kernel.org
0279 Description:
0280 Whether detection of differential encoder cable faults for the
0281 respective channel of Signal Y is enabled. Valid attribute
0282 values are boolean.
0283
0284 What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler
0285 KernelVersion: 5.7
0286 Contact: linux-iio@vger.kernel.org
0287 Description:
0288 Filter clock factor for input Signal Y. This prescaler value
0289 affects the inputs of both quadrature pair signals.
0290
0291 What: /sys/bus/counter/devices/counterX/signalY/index_polarity
0292 KernelVersion: 5.2
0293 Contact: linux-iio@vger.kernel.org
0294 Description:
0295 Active level of index input Signal Y; irrelevant in
0296 non-synchronous load mode.
0297
0298 What: /sys/bus/counter/devices/counterX/signalY/index_polarity_available
0299 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
0300 KernelVersion: 5.2
0301 Contact: linux-iio@vger.kernel.org
0302 Description:
0303 Discrete set of available values for the respective Signal Y
0304 configuration are listed in this file.
0305
0306 What: /sys/bus/counter/devices/counterX/signalY/name
0307 KernelVersion: 5.2
0308 Contact: linux-iio@vger.kernel.org
0309 Description:
0310 Read-only attribute that indicates the device-specific name of
0311 Signal Y. If possible, this should match the name of the
0312 respective signal as it appears in the device datasheet.
0313
0314 What: /sys/bus/counter/devices/counterX/signalY/signal
0315 KernelVersion: 5.2
0316 Contact: linux-iio@vger.kernel.org
0317 Description:
0318 Signal level state of Signal Y. The following signal level
0319 states are available:
0320
0321 low:
0322 Low level state.
0323
0324 high:
0325 High level state.
0326
0327 What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode
0328 KernelVersion: 5.2
0329 Contact: linux-iio@vger.kernel.org
0330 Description:
0331 Configure the counter associated with Signal Y for
0332 non-synchronous or synchronous load mode. Synchronous load mode
0333 cannot be selected in non-quadrature (Pulse-Direction) clock
0334 mode.
0335
0336 non-synchronous:
0337 A logic low level is the active level at this index
0338 input. The index function (as enabled via preset_enable)
0339 is performed directly on the active level of the index
0340 input.
0341
0342 synchronous:
0343 Intended for interfacing with encoder Index output in
0344 quadrature clock mode. The active level is configured
0345 via index_polarity. The index function (as enabled via
0346 preset_enable) is performed synchronously with the
0347 quadrature clock on the active level of the index input.