From: William Breathitt Gray <william.gray@linaro.org>
To: Julien Panis <jpanis@baylibre.com>
Cc: vilhelm.gray@gmail.com, 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 v4 3/3] counter: capture-tiecap: capture driver support for ECAP
Date: Tue, 16 Aug 2022 11:22:48 -0400 [thread overview]
Message-ID: <Yvu2SFKy6efHa+r3@fedora> (raw)
In-Reply-To: <0730c493-b49f-02f5-c0e7-999d5871dc4a@baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 2373 bytes --]
On Tue, Aug 16, 2022 at 10:11:35AM +0200, Julien Panis wrote:
> On 15/08/2022 13:20, William Breathitt Gray wrote:
> > On Sun, Aug 14, 2022 at 01:03:48PM -0400, William Breathitt Gray wrote:
> > > On Wed, Aug 10, 2022 at 04:07:24PM +0200, Julien Panis wrote:
> > > > +static int ecap_cnt_function_read(struct counter_device *counter,
> > > > + struct counter_count *count,
> > > > + enum counter_function *function)
> > > > +{
> > > > + *function = COUNTER_FUNCTION_INCREASE;
> > > > +
> > > > + return 0;
> > > > +}
> > > > +
> > > > +static int ecap_cnt_action_read(struct counter_device *counter,
> > > > + struct counter_count *count,
> > > > + struct counter_synapse *synapse,
> > > > + enum counter_synapse_action *action)
> > > > +{
> > > > + *action = COUNTER_SYNAPSE_ACTION_BOTH_EDGES;
> > > > +
> > > > + return 0;
> > > > +}
> > > Right now you have a Signal defined for the ECAPSIG line, but there is
> > > at least one more relevant Signal to define: the clock updating ECAPCNT.
> > > The Synapse action of COUNTER_SYNAPSE_ACTION_BOTH_EDGES is for that
> > > clock Signal, but for the ECAPSIG Signal you will need to report a
> > > Synapse action based on the polarity of the next capture (i.e. whether
> > > high or low).
> > I need to make a correction here. IIUC, the ECAPSIG signal doesn't
> > affect the count value of ECAPCNT (ECAPSIG only triggers the captures),
> > so the Synapse action for ECAPSIG should always be
> > COUNTER_SYNAPSE_ACTION_NONE. You don't need to account for the capture
> > polarities because they're not relevant in this particular situation:
> > ECAPSIG doesn't trigger the ECAPCNT count function.
> >
> > William Breathitt Gray
>
> It appears to me that you spoke about TSCNT register content (32 bits). So,
> you were
> not talking about the Mod4 counter (2 bits).
> Do you confirm that ?
Yes, I meant the TSCNT register. Sorry about that!
The Counter subsystem is providing an abstraction for users, so although
the ECAP pin signal is serving physically on the device as a clock for
the Mod4 counter, it also serves the TSCNT counter in an abstract sense
as the trigger signal to capture the TSCNT value. The Counter subsystem
paradigm allows you to define these abstract relationships between
Counts and Signals as Synapses.
William Breathitt Gray
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-08-16 15:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 14:07 [PATCH v4 0/3] ECAP support on TI AM62x SoC Julien Panis
2022-08-10 14:07 ` [PATCH v4 1/3] dt-binding: counter: add ti,am62-ecap-capture.yaml Julien Panis
2022-08-10 14:40 ` Krzysztof Kozlowski
2022-08-10 14:07 ` [PATCH v4 2/3] Documentation: ABI: add sysfs-bus-counter-ecap Julien Panis
2022-08-13 22:47 ` William Breathitt Gray
2022-08-10 14:07 ` [PATCH v4 3/3] counter: capture-tiecap: capture driver support for ECAP Julien Panis
2022-08-14 14:48 ` Jonathan Cameron
2022-08-14 17:03 ` William Breathitt Gray
2022-08-15 11:20 ` William Breathitt Gray
2022-08-16 8:11 ` Julien Panis
2022-08-16 15:22 ` William Breathitt Gray [this message]
2022-08-16 7:58 ` Julien Panis
2022-08-16 15:12 ` William Breathitt Gray
2022-08-16 15:28 ` Julien Panis
2022-08-14 18:00 ` [PATCH v4 0/3] ECAP support on TI AM62x SoC William Breathitt Gray
2022-08-16 8:26 ` Julien Panis
2022-08-17 13:48 ` Julien Panis
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=Yvu2SFKy6efHa+r3@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 \
--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).