[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZRwjPegND0V4jF6U@kernel.org>
Date: Tue, 3 Oct 2023 16:20:45 +0200
From: Simon Horman <horms@...nel.org>
To: Mahesh Bandewar <maheshb@...gle.com>
Cc: Netdev <netdev@...r.kernel.org>, Linux <linux-kernel@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Jonathan Corbet <corbet@....net>, John Stultz <jstultz@...gle.com>,
Don Hatchett <hatch@...gle.com>, Yuliang Li <yuliangli@...gle.com>,
Mahesh Bandewar <mahesh@...dewar.net>,
Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCHv2 next 1/3] ptp: add ptp_gettimex64any() support
On Mon, Oct 02, 2023 at 09:17:01PM -0700, Mahesh Bandewar wrote:
> add support for TS sandwich of the user preferred timebase. The options
> supported are PTP_TS_REAL (CLOCK_REALTIME), PTP_TS_MONO (CLOCK_MONOTONIC),
> and PTP_TS_RAW (CLOCK_MONOTONIC_RAW)
>
> Option of PTP_TS_REAL is equivalent of using ptp_gettimex64().
>
> Signed-off-by: Mahesh Bandewar <maheshb@...gle.com>
> CC: Richard Cochran <richardcochran@...il.com>
> CC: "David S. Miller" <davem@...emloft.net>
> CC: netdev@...r.kernel.org
> ---
> include/linux/ptp_clock_kernel.h | 51 ++++++++++++++++++++++++++++++++
> include/uapi/linux/ptp_clock.h | 7 +++++
> 2 files changed, 58 insertions(+)
>
> diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h
> index 1ef4e0f9bd2a..fd7be98e7bba 100644
> --- a/include/linux/ptp_clock_kernel.h
> +++ b/include/linux/ptp_clock_kernel.h
> @@ -102,6 +102,15 @@ struct ptp_system_timestamp {
> * reading the lowest bits of the PHC timestamp and the second
> * reading immediately follows that.
> *
> + * @gettimex64any: Reads the current time from the hardware clock and
> + optionally also any of the MONO, MONO_RAW, or SYS clock.
nit: I think a '*' is needed on the line above.
> + * parameter ts: Holds the PHC timestamp.
> + * parameter sts: If not NULL, it holds a pair of timestamps from
> + * the clock of choice. The first reading is made right before
> + * reading the lowest bits of the PHC timestamp and the second
> + * reading immediately follows that.
> + * parameter type: any one of the TS opt from ptp_timestamp_types.
> + *
> * @getcrosststamp: Reads the current time from the hardware clock and
> * system clock simultaneously.
> * parameter cts: Contains timestamp (device,system) pair,
...
Powered by blists - more mailing lists