linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: William Breathitt Gray <vilhelm.gray@gmail.com>,
	jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
	pmeerw@pmeerw.net
Cc: benjamin.gaignard@st.com, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/8] docs: Add Generic Counter interface documentation
Date: Sat, 17 Mar 2018 16:43:29 -0700	[thread overview]
Message-ID: <b40d9333-f5de-c39f-25e9-703c5444aed4@infradead.org> (raw)
In-Reply-To: <c30b11b8839099bffb3888e9198751af6e5fe623.1520614431.git.vilhelm.gray@gmail.com>

On 03/09/2018 10:42 AM, William Breathitt Gray wrote:
> This patch adds high-level documentation about the Generic Counter
> interface.
> 
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> ---
>  Documentation/driver-api/generic-counter.rst | 321 +++++++++++++++++++++++++++
>  Documentation/driver-api/index.rst           |   1 +
>  MAINTAINERS                                  |   1 +
>  3 files changed, 323 insertions(+)
>  create mode 100644 Documentation/driver-api/generic-counter.rst
> 
> diff --git a/Documentation/driver-api/generic-counter.rst b/Documentation/driver-api/generic-counter.rst
> new file mode 100644
> index 000000000000..bce0cbc31963
> --- /dev/null
> +++ b/Documentation/driver-api/generic-counter.rst
> @@ -0,0 +1,321 @@

[snip]

> +There are three core components to a counter:
> +
> +        COUNT
> +        -----
> +        A Count represents the count data for a set of Signals. The
> +        Generic Counter interface provides the following available count
> +        data types:
> +
> +		* COUNT_POSITION_UNSIGNED:
> +			Unsigned integer value representing position.
> +
> +		* COUNT_POSITION_SIGNED:
> +			Signed integer value representing position.
> +
> +        A Count has a count function mode which represents the update
> +        behavior for the count data. The Generic Counter interface
> +        provides the following available count function modes:
> +
> +		* Increase:
> +			Accumulated count is incremented.
> +
> +		* Decrease:
> +			Accumulated count is decremented.
> +
> +		* Pulse-Direction:
> +			Rising edges on quadrature pair signal A updates
> +                        the respective count. The input level of
> +                        quadrature pair signal B determines direction.
> +
> +		* Quadrature x1:
> +			If direction is forward, rising edges on
> +                        quadrature pair signal A updates the respective
> +                        count; if the direction is backward, falling
> +                        edges on quadrature pair signal A updates the
> +                        respective count. Quadrature encoding determines
> +                        the direction.
> +
> +		* Quadrature x2:
> +			Any state transition on quadrature pair signal A
> +                        updates the respective count. Quadrature
> +                        encoding determines the direction.
> +
> +		* Quadrature x4:
> +			Any state transition on either quadrature pair
> +                        signals updates	the respective count. Quadrature

                               change <TAB> ^^^ to <SPACE>

> +                        encoding determines the direction.
> +
> +        A Count has a set of one or more associated Signals.
> +
> +        SIGNAL
> +        ------
> +        A Signal represents a counter input data; this is the input data
> +        that is analyzed by the counter to determine the count data;
> +        e.g. a quadrature signal output line of a rotary encoder. Not
> +        all counter devices provide user access to the Signal data.
> +
> +        The Generic Counter interface provides the following available
> +        signal data types for when the Signal data is available for user
> +        access:
> +
> +	        * SIGNAL_LEVEL_LOW:
> +                        Signal line is in a low state.
> +
> +                * SIGNAL_LEVEL_HIGH:
> +                        Signal line is in a high state.
> +
> +        A Signal may be associated to one or more Counts.

                                      with (?)

Hm, there are around 8 or so instances of "associated to" here -- and at least
one of "associated with" (to my surprise :).  But it's no big deal.


Reviewed-by: Randy Dunlap <rdunlap@infradead.org>

thanks,
-- 
~Randy

  reply	other threads:[~2018-03-17 23:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 18:41 [PATCH v5 0/8] Introduce the Counter subsystem William Breathitt Gray
2018-03-09 18:42 ` [PATCH v5 1/8] counter: Introduce the Generic Counter interface William Breathitt Gray
2018-03-24 17:33   ` Jonathan Cameron
2018-03-25  7:46     ` Joe Perches
2018-03-25 16:56       ` Jonathan Cameron
2018-03-25 17:04         ` Joe Perches
2018-04-01  0:41     ` William Breathitt Gray
2018-04-06 15:02       ` Jonathan Cameron
2018-03-09 18:42 ` [PATCH v5 2/8] counter: Documentation: Add Generic Counter sysfs documentation William Breathitt Gray
2018-03-24 17:05   ` Jonathan Cameron
2018-03-09 18:42 ` [PATCH v5 3/8] docs: Add Generic Counter interface documentation William Breathitt Gray
2018-03-17 23:43   ` Randy Dunlap [this message]
2018-03-24 16:09   ` Jonathan Cameron
2018-03-09 18:43 ` [PATCH v5 4/8] counter: 104-quad-8: Add Generic Counter interface support William Breathitt Gray
2018-03-24 17:14   ` Jonathan Cameron
2018-03-09 18:43 ` [PATCH v5 5/8] counter: 104-quad-8: Documentation: Add Generic Counter sysfs documentation William Breathitt Gray
2018-03-24 17:21   ` Jonathan Cameron
2018-04-02 19:41     ` William Breathitt Gray
2018-04-06 15:08       ` Jonathan Cameron
2018-03-09 18:43 ` [PATCH v5 6/8] dt-bindings: counter: Document stm32 quadrature encoder William Breathitt Gray
2018-03-24 17:23   ` Jonathan Cameron
2018-03-09 18:43 ` [PATCH v5 7/8] counter: stm32-timer-cnt: Add sysfs documentation William Breathitt Gray
2018-03-24 17:27   ` Jonathan Cameron
2018-03-09 18:43 ` [PATCH v5 8/8] Counter: Add STM32 Timer quadrature encoder William Breathitt Gray
2018-03-24 17:30   ` Jonathan Cameron

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=b40d9333-f5de-c39f-25e9-703c5444aed4@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=benjamin.gaignard@st.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=vilhelm.gray@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).