Re: [PATCH net-next v2 1/2] ptp: introduce PTP_CLOCK_EXTOFF event for the measured external offset

From: Simon Horman
Date: Thu Nov 30 2023 - 12:05:14 EST


On Wed, Nov 29, 2023 at 03:48:05PM -0500, Min Li wrote:
> From: Min Li <min.li.xe@xxxxxxxxxxx>
>
> This change is for the PHC devices that can measure the phase offset
> between PHC signal and the external signal, such as the 1PPS signal of
> GNSS. Reporting PTP_CLOCK_EXTOFF to user space will be piggy-backed to
> the existing ptp_extts_event so that application such as ts2phc can
> poll the external offset the same way as extts. Hence, ts2phc can use
> the offset to achieve the alignment between PHC and the external signal
> by the help of either SW or HW filters.
>
> Signed-off-by: Min Li <min.li.xe@xxxxxxxxxxx>

...

> @@ -228,7 +230,10 @@ struct ptp_pin_desc {
> #define PTP_MASK_EN_SINGLE _IOW(PTP_CLK_MAGIC, 20, unsigned int)
>
> struct ptp_extts_event {
> - struct ptp_clock_time t; /* Time event occured. */
> + union {
> + struct ptp_clock_time t; /* Time event occured. */
> + __s64 offset_ns; /* Offset event occured */
> + };

Hi Min Li,

if you end up respinning this patch, please consider correcting
the spelling of occurred.

> unsigned int index; /* Which channel produced the event. */
> unsigned int flags; /* Reserved for future use. */
> unsigned int rsv[2]; /* Reserved for future use. */
> --
> 2.39.2
>