All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: "Y.b. Lu" <yangbo.lu@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH] net: mscc: ocelot: support PPS signal generation
Date: Thu, 26 Dec 2019 18:08:20 -0800	[thread overview]
Message-ID: <20191227020820.GA6970@localhost> (raw)
In-Reply-To: <AM7PR04MB68858970C5BA46FE33C01F48F82B0@AM7PR04MB6885.eurprd04.prod.outlook.com>

On Thu, Dec 26, 2019 at 11:17:26AM +0000, Y.b. Lu wrote:
> > -----Original Message-----
> > From: Vladimir Oltean <olteanv@gmail.com>
> > Also, I think what you have implemented here is periodic output
> > (PTP_CLK_REQ_PEROUT) not PPS [input] (PTP_CLK_REQ_PPS). I have found
> > the PTP documentation to be rather confusing on what PTP_CLK_REQ_PPS
> > means, so I'm adding Richard in the hope that he may clarify (also
> > what's different between PTP_CLK_REQ_PPS and PTP_CLK_REQ_PPS).

The PTP_CLK_REQ_PPS is for generating events for the kernel's PPS
subsystem.  (See drivers/pps).  This has nothing to do with actual PPS
signals.

> My understand is PTP_CLK_REQ_PEROUT is for periodical output,

Yes.

> and PTP_CLK_REQ_PPS is for PPS event handling.

No.

Some cards generate an interrupt at the full second roll over.  The
interrupt service routine can feed a system time stamp into the
kernel's pps subsystem for use by NTP.

If your device is generating an actual PPS output signal, then you
should implement the PTP_CLK_REQ_PEROUT method.

Bonus points for making the signal fully programmable!

Thanks,
Richard

  parent reply	other threads:[~2019-12-27  2:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-26  9:58 [PATCH] net: mscc: ocelot: support PPS signal generation Yangbo Lu
2019-12-26 10:49 ` Vladimir Oltean
2019-12-26 10:50   ` Vladimir Oltean
2019-12-26 11:21     ` Y.b. Lu
2019-12-26 11:17   ` Y.b. Lu
2019-12-26 11:44     ` Vladimir Oltean
2019-12-27  2:08     ` Richard Cochran [this message]
2019-12-27  3:51       ` Y.b. Lu
2019-12-27 15:12         ` Richard Cochran
2019-12-26 10:58 ` Andrew Lunn
2019-12-26 11:22   ` Y.b. Lu

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=20191227020820.GA6970@localhost \
    --to=richardcochran@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=yangbo.lu@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.