diff mbox series

[8/8] docs: counter: add edge_capture_unit_* attributes

Message ID 20211017013343.3385923-9-david@lechnology.com (mailing list archive)
State Changes Requested
Headers show
Series counter: ti-eqep: implement features for speed measurement | expand

Commit Message

David Lechner Oct. 17, 2021, 1:33 a.m. UTC
This adds documentation for new counter subsystem edge_capture_unit_*
sysfs attributes.

Signed-off-by: David Lechner <david@lechnology.com>
---
 Documentation/ABI/testing/sysfs-bus-counter | 37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

William Breathitt Gray Oct. 27, 2021, 8:26 a.m. UTC | #1
On Sat, Oct 16, 2021 at 08:33:43PM -0500, David Lechner wrote:
> This adds documentation for new counter subsystem edge_capture_unit_*
> sysfs attributes.
> 
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
>  Documentation/ABI/testing/sysfs-bus-counter | 37 +++++++++++++++++++++
>  1 file changed, 37 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-counter b/Documentation/ABI/testing/sysfs-bus-counter
> index 78bb1a501007..6c192c8c2b55 100644
> --- a/Documentation/ABI/testing/sysfs-bus-counter
> +++ b/Documentation/ABI/testing/sysfs-bus-counter
> @@ -59,6 +59,7 @@ What:		/sys/bus/counter/devices/counterX/countY/error_noise_available
>  What:		/sys/bus/counter/devices/counterX/countY/function_available
>  What:		/sys/bus/counter/devices/counterX/countY/prescaler_available
>  What:		/sys/bus/counter/devices/counterX/countY/signalZ_action_available
> +What:		/sys/bus/counter/devices/counterX/edge_capture_unit_prescaler_available
>  What:		/sys/bus/counter/devices/counterX/latch_mode_available
>  What:		/sys/bus/counter/devices/counterX/signalY/index_polarity_available
>  What:		/sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
> @@ -230,6 +231,10 @@ What:		/sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
>  What:		/sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
>  What:		/sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
>  What:		/sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
> +What:		/sys/bus/counter/devices/edge_capture_unit_enable_component_id
> +What:		/sys/bus/counter/devices/edge_capture_unit_latched_period_component_id
> +What:		/sys/bus/counter/devices/edge_capture_unit_max_period_component_id
> +What:		/sys/bus/counter/devices/edge_capture_unit_prescaler_component_id
>  What:		/sys/bus/counter/devices/latch_mode_component_id
>  What:		/sys/bus/counter/devices/unit_timer_enable_component_id
>  What:		/sys/bus/counter/devices/unit_timer_period_component_id
> @@ -249,6 +254,38 @@ Description:
>  		shorter or equal to configured value are ignored. Value 0 means
>  		filter is disabled.
>  
> +What:		/sys/bus/counter/devices/edge_capture_unit_enable
> +KernelVersion:	5.16
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Read/write attribute that starts or stops the Edge Capture Unit.
> +		Valid values are boolean.
> +
> +What:		/sys/bus/counter/devices/edge_capture_unit_latched_period
> +KernelVersion:	5.16
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Latched period of the Edge Capture Unit represented as a string.
> +		The value is latched in based on the trigger selected by the
> +		counterX/latch_mode attribute. Units are nanoseconds.
> +
> +What:		/sys/bus/counter/devices/edge_capture_unit_max_period
> +KernelVersion:	5.16
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Read/write attribute that selects the maximum period that can
> +		be measured by the Edge Capture Unit. Units are nanoseconds.
> +
> +What:		/sys/bus/counter/devices/edge_capture_unit_prescaler
> +KernelVersion:	5.16
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Read/write attribute that selects the how the
> +		counterX/countY/count value is scaled coming in to the Edge
> +		Capture Unit. This acts like a clock divider, e.g. if a value
> +		of 4 is selected, the Edge Capture Unit will measure the period
> +		between every 4 counts.
> +

I'd like to see that naming for this made more generic if possible so
that other drivers can use these extensions in the future. For example,
instead of the "edge_capture_unit_*" prefix, perhaps "latched_count_*"
would be appropriate. Would this be feasible?

William Breathitt Gray

>  What:		/sys/bus/counter/devices/counterX/events_queue_size
>  KernelVersion:	5.16
>  Contact:	linux-iio@vger.kernel.org
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-counter b/Documentation/ABI/testing/sysfs-bus-counter
index 78bb1a501007..6c192c8c2b55 100644
--- a/Documentation/ABI/testing/sysfs-bus-counter
+++ b/Documentation/ABI/testing/sysfs-bus-counter
@@ -59,6 +59,7 @@  What:		/sys/bus/counter/devices/counterX/countY/error_noise_available
 What:		/sys/bus/counter/devices/counterX/countY/function_available
 What:		/sys/bus/counter/devices/counterX/countY/prescaler_available
 What:		/sys/bus/counter/devices/counterX/countY/signalZ_action_available
+What:		/sys/bus/counter/devices/counterX/edge_capture_unit_prescaler_available
 What:		/sys/bus/counter/devices/counterX/latch_mode_available
 What:		/sys/bus/counter/devices/counterX/signalY/index_polarity_available
 What:		/sys/bus/counter/devices/counterX/signalY/synchronous_mode_available
@@ -230,6 +231,10 @@  What:		/sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
 What:		/sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
 What:		/sys/bus/counter/devices/counterX/signalY/index_polarity_component_id
 What:		/sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id
+What:		/sys/bus/counter/devices/edge_capture_unit_enable_component_id
+What:		/sys/bus/counter/devices/edge_capture_unit_latched_period_component_id
+What:		/sys/bus/counter/devices/edge_capture_unit_max_period_component_id
+What:		/sys/bus/counter/devices/edge_capture_unit_prescaler_component_id
 What:		/sys/bus/counter/devices/latch_mode_component_id
 What:		/sys/bus/counter/devices/unit_timer_enable_component_id
 What:		/sys/bus/counter/devices/unit_timer_period_component_id
@@ -249,6 +254,38 @@  Description:
 		shorter or equal to configured value are ignored. Value 0 means
 		filter is disabled.
 
+What:		/sys/bus/counter/devices/edge_capture_unit_enable
+KernelVersion:	5.16
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Read/write attribute that starts or stops the Edge Capture Unit.
+		Valid values are boolean.
+
+What:		/sys/bus/counter/devices/edge_capture_unit_latched_period
+KernelVersion:	5.16
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Latched period of the Edge Capture Unit represented as a string.
+		The value is latched in based on the trigger selected by the
+		counterX/latch_mode attribute. Units are nanoseconds.
+
+What:		/sys/bus/counter/devices/edge_capture_unit_max_period
+KernelVersion:	5.16
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Read/write attribute that selects the maximum period that can
+		be measured by the Edge Capture Unit. Units are nanoseconds.
+
+What:		/sys/bus/counter/devices/edge_capture_unit_prescaler
+KernelVersion:	5.16
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Read/write attribute that selects the how the
+		counterX/countY/count value is scaled coming in to the Edge
+		Capture Unit. This acts like a clock divider, e.g. if a value
+		of 4 is selected, the Edge Capture Unit will measure the period
+		between every 4 counts.
+
 What:		/sys/bus/counter/devices/counterX/events_queue_size
 KernelVersion:	5.16
 Contact:	linux-iio@vger.kernel.org