public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: William Breathitt Gray <vilhelm.gray@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>,
	Fabrice Gasnier <fabrice.gasnier@st.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Holger Assmann <h.assmann@pengutronix.de>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-iio@vger.kernel.org
Subject: Re: Counter device Interface for reading out input capture
Date: Fri, 6 Nov 2020 07:42:17 -0500	[thread overview]
Message-ID: <20201106124217.GA4015@shinobu> (raw)
In-Reply-To: <e8c99989-f018-dd90-2144-e09c05a3731b@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1942 bytes --]

On Thu, Nov 05, 2020 at 07:46:14PM +0100, Ahmad Fatoum wrote:
> Hello Benjamin,
> Hello Fabrice,
> 
> In the stm32-timer-cnt driver I find unused #defines for TIM_CCMR_MASK and
> TIM_CCER_MASK, which to me hint that support for the "input capture mode"[1]
> was implemented but removed prior to upstreaming.
> 
> It doesn't look like the counter device API is yet made to support such
> an input capture mode (latching a counter value on an external event, e.g.
> to timestamp incoming rising edges to measure jitter between pulses).
> 
> I am still very new to this, so I figured I ask whether you already have
> thoughts (or maybe code to share) on how to best integrate this with the
> counter device API.
> 
> I've added linux-iio/linux-stm32 to the CC as well, so if someone else
> has an idea how to best do this, please share.
> 
> [1]: 40.3.7 in RM0436 rev 3
> 
> Cheers,
> Ahmad
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Hi Ahmad,

Regarding the Counter subsystem, I'm developing a Counter character
device API that supports timestamps for counter devices:
https://lore.kernel.org/linux-arm-kernel/157d1edf-feec-33b5-7ad5-94f99316ca6e@lechnology.com/T/

My aim is to get this functionality picked up for the Linux 5.11 merge
window. I have one more revision at least that should be ready in a
couple weeks -- I'll CC you for that patchset to keep you in the loop;
I force-push periodically to my personal repo when as I develop, so you
can take a look at the current state of this next revision if you're
curious:
https://gitlab.com/vilhelmgray/iio/-/tree/counter_chrdev_v6

Sincerely,

William Breathitt Gray

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2020-11-06 12:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 18:46 Counter device Interface for reading out input capture Ahmad Fatoum
2020-11-06  9:11 ` Fabrice Gasnier
2020-11-06 17:16   ` Holger Assmann
2020-11-06 12:42 ` William Breathitt Gray [this message]
2020-11-17 10:54   ` Ahmad Fatoum
2020-11-17 12:25     ` 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=20201106124217.GA4015@shinobu \
    --to=vilhelm.gray@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=alexandre.torgue@st.com \
    --cc=benjamin.gaignard@st.com \
    --cc=fabrice.gasnier@st.com \
    --cc=h.assmann@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.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