From: William Breathitt Gray <william.gray@linaro.org>
To: Julien Panis <jpanis@baylibre.com>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, mranostay@ti.com
Subject: Re: [PATCH v5 2/3] Documentation: ABI: sysfs-bus-counter: add capture items
Date: Sun, 21 Aug 2022 18:43:04 -0400 [thread overview]
Message-ID: <YwK0+BNSo4X2KA29@fedora> (raw)
In-Reply-To: <20220817141620.256481-3-jpanis@baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 4106 bytes --]
On Wed, Aug 17, 2022 at 04:16:19PM +0200, Julien Panis wrote:
> This commit adds capture items to counter ABI file
> (e.g. TI ECAP used in capture operating mode).
>
> Signed-off-by: Julien Panis <jpanis@baylibre.com>
> ---
> Documentation/ABI/testing/sysfs-bus-counter | 49 +++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-counter b/Documentation/ABI/testing/sysfs-bus-counter
> index 06c2b3e27e0b..52ddec7cc76a 100644
> --- a/Documentation/ABI/testing/sysfs-bus-counter
> +++ b/Documentation/ABI/testing/sysfs-bus-counter
> @@ -203,6 +203,24 @@ Description:
> both edges:
> Any state transition.
>
> +What: /sys/bus/counter/devices/counterX/countY/count_cumul
> +KernelVersion: 6.0
> +Contact: jpanis@baylibre.com
> +Description:
> + Read-only attribute that indicates the raw cumulated count
> + since count Y start, computed as follow:
> + count_cumul = (max_counter_val + 1) * nb_counter_overflows
Implement this instead as "num_overflows" (COUNTER_COMP_COUNT_U64) and
"ceiling" (COUNTER_COMP_CEILING). You need to expose the count ceiling
anyway and a new "num_overflows" attribute would be useful for other
drivers as well.
> +What: /sys/bus/counter/devices/counterX/countY/captureZ
> +KernelVersion: 6.0
> +Contact: jpanis@baylibre.com
> +Description:
> + Read-only attributes that indicate the last raw timestamp captured
> + for the respective capture Z register.
> + Raw timestamp can be converted to nanoseconds as follow:
> + time_ns = 10^9 * (captureZ + count_cumul) / frequency
> + count_cumul and frequency parameters are described in this document.
Rework this description to make it more general: remove the nanoseconds
conversion formula and references to timestamps. The concept of a
capture is general enough that it could be provided by counter devices
that are not necessarily timestamping. Instead this description should
simply state that this attribute is a historical capture of the Count Y
count data where Z (if present) is the respective capture buffer element
offset.
> What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id
> What: /sys/bus/counter/devices/counterX/countY/floor_component_id
> What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id
> @@ -213,6 +231,8 @@ What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id
> What: /sys/bus/counter/devices/counterX/countY/preset_component_id
> What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id
> What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id
> +What: /sys/bus/counter/devices/counterX/countY/count_cumul_component_id
> +What: /sys/bus/counter/devices/counterX/countY/captureZ_component_id
> What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id
> What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id
> What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id
> @@ -345,3 +365,32 @@ Description:
> via index_polarity. The index function (as enabled via
> preset_enable) is performed synchronously with the
> quadrature clock on the active level of the index input.
> +
> +What: /sys/bus/counter/devices/counterX/signalY/polarityZ
> +KernelVersion: 6.0
> +Contact: jpanis@baylibre.com
> +Description:
> + Capture modules include N timestamp capture registers.
> + For all N sequenced timestamp capture events
> + (1->2->3->...->N->1->...), edge polarity can be selected.
> + The following polarities are available:
> +
> + rising edge:
> + Low state transitions to high state.
> +
> + falling edge:
> + High state transitions to low state.
Other drivers could use "polarity" for signals that are not related to
captures, so remove the language referencing timestamping and generalize
it to simply refer to selecting the Signal Y edge polarity where Z (if
present) is the respective polarity sequence position.
William Breathitt Gray
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-08-21 22:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 14:16 [PATCH v5 0/3] ECAP support on TI AM62x SoC Julien Panis
2022-08-17 14:16 ` [PATCH v5 1/3] dt-bindings: counter: add ti,am62-ecap-capture.yaml Julien Panis
2022-08-17 14:16 ` [PATCH v5 2/3] Documentation: ABI: sysfs-bus-counter: add capture items Julien Panis
2022-08-21 22:43 ` William Breathitt Gray [this message]
2022-08-17 14:16 ` [PATCH v5 3/3] counter: ti-ecap-capture: capture driver support for ECAP Julien Panis
2022-08-22 1:16 ` William Breathitt Gray
2022-08-20 22:00 ` [PATCH v5 0/3] ECAP support on TI AM62x SoC William Breathitt Gray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YwK0+BNSo4X2KA29@fedora \
--to=william.gray@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jpanis@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mranostay@ti.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox