ptp: introduce PTP_CLOCK_EXTOFF event for the measured external offset
authorMin Li <min.li.xe@renesas.com>
Wed, 24 Jan 2024 18:49:46 +0000 (13:49 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2024 13:00:23 +0000 (13:00 +0000)
commitea1cc3ee34a5f3144f6c2cdc07c19c914ccb9526
tree5809858fc5607058dbf8f1246da871f0fb54bbaa
parentcf8e51ef518654f3b68c1fed93690d2df8e98a4b
ptp: introduce PTP_CLOCK_EXTOFF event for the measured external offset

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@renesas.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_clock.c
include/linux/ptp_clock_kernel.h
include/uapi/linux/ptp_clock.h