18c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/count
28c2ecf20Sopenharmony_ciKernelVersion:	5.2
38c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
48c2ecf20Sopenharmony_ciDescription:
58c2ecf20Sopenharmony_ci		Count data of Count Y represented as a string.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/ceiling
88c2ecf20Sopenharmony_ciKernelVersion:	5.2
98c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
108c2ecf20Sopenharmony_ciDescription:
118c2ecf20Sopenharmony_ci		Count value ceiling for Count Y. This is the upper limit for the
128c2ecf20Sopenharmony_ci		respective counter.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/floor
158c2ecf20Sopenharmony_ciKernelVersion:	5.2
168c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
178c2ecf20Sopenharmony_ciDescription:
188c2ecf20Sopenharmony_ci		Count value floor for Count Y. This is the lower limit for the
198c2ecf20Sopenharmony_ci		respective counter.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/count_mode
228c2ecf20Sopenharmony_ciKernelVersion:	5.2
238c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
248c2ecf20Sopenharmony_ciDescription:
258c2ecf20Sopenharmony_ci		Count mode for channel Y. The ceiling and floor values for
268c2ecf20Sopenharmony_ci		Count Y are used by the count mode where required. The following
278c2ecf20Sopenharmony_ci		count modes are available:
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci		normal:
308c2ecf20Sopenharmony_ci			Counting is continuous in either direction.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci		range limit:
338c2ecf20Sopenharmony_ci			An upper or lower limit is set, mimicking limit switches
348c2ecf20Sopenharmony_ci			in the mechanical counterpart. The upper limit is set to
358c2ecf20Sopenharmony_ci			the Count Y ceiling value, while the lower limit is set
368c2ecf20Sopenharmony_ci			to the Count Y floor value. The counter freezes at
378c2ecf20Sopenharmony_ci			count = ceiling when counting up, and at count = floor
388c2ecf20Sopenharmony_ci			when counting down. At either of these limits, the
398c2ecf20Sopenharmony_ci			counting is resumed only when the count direction is
408c2ecf20Sopenharmony_ci			reversed.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci		non-recycle:
438c2ecf20Sopenharmony_ci			The counter is disabled whenever a counter overflow or
448c2ecf20Sopenharmony_ci			underflow takes place. The counter is re-enabled when a
458c2ecf20Sopenharmony_ci			new count value is loaded to the counter via a preset
468c2ecf20Sopenharmony_ci			operation or direct write.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci		modulo-n:
498c2ecf20Sopenharmony_ci			A count value boundary is set between the Count Y floor
508c2ecf20Sopenharmony_ci			value and the Count Y ceiling value. The counter is
518c2ecf20Sopenharmony_ci			reset to the Count Y floor value at count = ceiling when
528c2ecf20Sopenharmony_ci			counting up, while the counter is set to the Count Y
538c2ecf20Sopenharmony_ci			ceiling value at count = floor when counting down; the
548c2ecf20Sopenharmony_ci			counter does not freeze at the boundary points, but
558c2ecf20Sopenharmony_ci			counts continuously throughout.
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/count_mode_available
588c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/error_noise_available
598c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/function_available
608c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/signalZ_action_available
618c2ecf20Sopenharmony_ciKernelVersion:	5.2
628c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
638c2ecf20Sopenharmony_ciDescription:
648c2ecf20Sopenharmony_ci		Discrete set of available values for the respective Count Y
658c2ecf20Sopenharmony_ci		configuration are listed in this file. Values are delimited by
668c2ecf20Sopenharmony_ci		newline characters.
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/direction
698c2ecf20Sopenharmony_ciKernelVersion:	5.2
708c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
718c2ecf20Sopenharmony_ciDescription:
728c2ecf20Sopenharmony_ci		Read-only attribute that indicates the count direction of Count
738c2ecf20Sopenharmony_ci		Y. Two count directions are available: forward and backward.
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci		Some counter devices are able to determine the direction of
768c2ecf20Sopenharmony_ci		their counting. For example, quadrature encoding counters can
778c2ecf20Sopenharmony_ci		determine the direction of movement by evaluating the leading
788c2ecf20Sopenharmony_ci		phase of the respective A and B quadrature encoding signals.
798c2ecf20Sopenharmony_ci		This attribute exposes such count directions.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/enable
828c2ecf20Sopenharmony_ciKernelVersion:	5.2
838c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
848c2ecf20Sopenharmony_ciDescription:
858c2ecf20Sopenharmony_ci		Whether channel Y counter is enabled. Valid attribute values are
868c2ecf20Sopenharmony_ci		boolean.
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci		This attribute is intended to serve as a pause/unpause mechanism
898c2ecf20Sopenharmony_ci		for Count Y. Suppose a counter device is used to count the total
908c2ecf20Sopenharmony_ci		movement of a conveyor belt: this attribute allows an operator
918c2ecf20Sopenharmony_ci		to temporarily pause the counter, service the conveyor belt,
928c2ecf20Sopenharmony_ci		and then finally unpause the counter to continue where it had
938c2ecf20Sopenharmony_ci		left off.
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/error_noise
968c2ecf20Sopenharmony_ciKernelVersion:	5.2
978c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
988c2ecf20Sopenharmony_ciDescription:
998c2ecf20Sopenharmony_ci		Read-only attribute that indicates whether excessive noise is
1008c2ecf20Sopenharmony_ci		present at the channel Y counter inputs.
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/function
1038c2ecf20Sopenharmony_ciKernelVersion:	5.2
1048c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
1058c2ecf20Sopenharmony_ciDescription:
1068c2ecf20Sopenharmony_ci		Count function mode of Count Y; count function evaluation is
1078c2ecf20Sopenharmony_ci		triggered by conditions specified by the Count Y signalZ_action
1088c2ecf20Sopenharmony_ci		attributes. The following count functions are available:
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci		increase:
1118c2ecf20Sopenharmony_ci			Accumulated count is incremented.
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci		decrease:
1148c2ecf20Sopenharmony_ci			Accumulated count is decremented.
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci		pulse-direction:
1178c2ecf20Sopenharmony_ci			Rising edges on signal A updates the respective count.
1188c2ecf20Sopenharmony_ci			The input level of signal B determines direction.
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ci		quadrature x1 a:
1218c2ecf20Sopenharmony_ci			If direction is forward, rising edges on quadrature pair
1228c2ecf20Sopenharmony_ci			signal A updates the respective count; if the direction
1238c2ecf20Sopenharmony_ci			is backward, falling edges on quadrature pair signal A
1248c2ecf20Sopenharmony_ci			updates the respective count. Quadrature encoding
1258c2ecf20Sopenharmony_ci			determines the direction.
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ci		quadrature x1 b:
1288c2ecf20Sopenharmony_ci			If direction is forward, rising edges on quadrature pair
1298c2ecf20Sopenharmony_ci			signal B updates the respective count; if the direction
1308c2ecf20Sopenharmony_ci			is backward, falling edges on quadrature pair signal B
1318c2ecf20Sopenharmony_ci			updates the respective count. Quadrature encoding
1328c2ecf20Sopenharmony_ci			determines the direction.
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci		quadrature x2 a:
1358c2ecf20Sopenharmony_ci			Any state transition on quadrature pair signal A updates
1368c2ecf20Sopenharmony_ci			the respective count. Quadrature encoding determines the
1378c2ecf20Sopenharmony_ci			direction.
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ci		quadrature x2 b:
1408c2ecf20Sopenharmony_ci			Any state transition on quadrature pair signal B updates
1418c2ecf20Sopenharmony_ci			the respective count. Quadrature encoding determines the
1428c2ecf20Sopenharmony_ci			direction.
1438c2ecf20Sopenharmony_ci
1448c2ecf20Sopenharmony_ci		quadrature x4:
1458c2ecf20Sopenharmony_ci			Any state transition on either quadrature pair signals
1468c2ecf20Sopenharmony_ci			updates	the respective count. Quadrature encoding
1478c2ecf20Sopenharmony_ci			determines the direction.
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/name
1508c2ecf20Sopenharmony_ciKernelVersion:	5.2
1518c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
1528c2ecf20Sopenharmony_ciDescription:
1538c2ecf20Sopenharmony_ci		Read-only attribute that indicates the device-specific name of
1548c2ecf20Sopenharmony_ci		Count Y. If possible, this should match the name of the
1558c2ecf20Sopenharmony_ci		respective channel as it appears in the device datasheet.
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/preset
1588c2ecf20Sopenharmony_ciKernelVersion:	5.2
1598c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
1608c2ecf20Sopenharmony_ciDescription:
1618c2ecf20Sopenharmony_ci		If the counter device supports preset registers -- registers
1628c2ecf20Sopenharmony_ci		used to load counter channels to a set count upon device-defined
1638c2ecf20Sopenharmony_ci		preset operation trigger events -- the preset count for channel
1648c2ecf20Sopenharmony_ci		Y is provided by this attribute.
1658c2ecf20Sopenharmony_ci
1668c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/preset_enable
1678c2ecf20Sopenharmony_ciKernelVersion:	5.2
1688c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
1698c2ecf20Sopenharmony_ciDescription:
1708c2ecf20Sopenharmony_ci		Whether channel Y counter preset operation is enabled. Valid
1718c2ecf20Sopenharmony_ci		attribute values are boolean.
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/countY/signalZ_action
1748c2ecf20Sopenharmony_ciKernelVersion:	5.2
1758c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
1768c2ecf20Sopenharmony_ciDescription:
1778c2ecf20Sopenharmony_ci		Action mode of Count Y for Signal Z. This attribute indicates
1788c2ecf20Sopenharmony_ci		the condition of Signal Z that triggers the count function
1798c2ecf20Sopenharmony_ci		evaluation for Count Y. The following action modes are
1808c2ecf20Sopenharmony_ci		available:
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_ci		none:
1838c2ecf20Sopenharmony_ci			Signal does not trigger the count function. In
1848c2ecf20Sopenharmony_ci			Pulse-Direction count function mode, this Signal is
1858c2ecf20Sopenharmony_ci			evaluated as Direction.
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci		rising edge:
1888c2ecf20Sopenharmony_ci			Low state transitions to high state.
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci		falling edge:
1918c2ecf20Sopenharmony_ci			High state transitions to low state.
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ci		both edges:
1948c2ecf20Sopenharmony_ci			Any state transition.
1958c2ecf20Sopenharmony_ci
1968c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/name
1978c2ecf20Sopenharmony_ciKernelVersion:	5.2
1988c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
1998c2ecf20Sopenharmony_ciDescription:
2008c2ecf20Sopenharmony_ci		Read-only attribute that indicates the device-specific name of
2018c2ecf20Sopenharmony_ci		the Counter. This should match the name of the device as it
2028c2ecf20Sopenharmony_ci		appears in its respective datasheet.
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/num_counts
2058c2ecf20Sopenharmony_ciKernelVersion:	5.2
2068c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
2078c2ecf20Sopenharmony_ciDescription:
2088c2ecf20Sopenharmony_ci		Read-only attribute that indicates the total number of Counts
2098c2ecf20Sopenharmony_ci		belonging to the Counter.
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/num_signals
2128c2ecf20Sopenharmony_ciKernelVersion:	5.2
2138c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
2148c2ecf20Sopenharmony_ciDescription:
2158c2ecf20Sopenharmony_ci		Read-only attribute that indicates the total number of Signals
2168c2ecf20Sopenharmony_ci		belonging to the Counter.
2178c2ecf20Sopenharmony_ci
2188c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/signalY/signal
2198c2ecf20Sopenharmony_ciKernelVersion:	5.2
2208c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
2218c2ecf20Sopenharmony_ciDescription:
2228c2ecf20Sopenharmony_ci		Signal data of Signal Y represented as a string.
2238c2ecf20Sopenharmony_ci
2248c2ecf20Sopenharmony_ciWhat:		/sys/bus/counter/devices/counterX/signalY/name
2258c2ecf20Sopenharmony_ciKernelVersion:	5.2
2268c2ecf20Sopenharmony_ciContact:	linux-iio@vger.kernel.org
2278c2ecf20Sopenharmony_ciDescription:
2288c2ecf20Sopenharmony_ci		Read-only attribute that indicates the device-specific name of
2298c2ecf20Sopenharmony_ci		Signal Y. If possible, this should match the name of the
2308c2ecf20Sopenharmony_ci		respective signal as it appears in the device datasheet.
231