Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ptp_ocp: make ptp_ocp driver compatible with PTP_EXTTS_REQUEST2

Originally ptp_ocp driver was not strictly checking flags for external
timestamper and was always activating rising edge timestamping as it's
the only supported mode. Recent changes to ptp made it incompatible with
PTP_EXTTS_REQUEST2 ioctl. Adjust ptp_clock_info to provide supported
mode and be compatible with new infra.

While at here remove explicit check of periodic output flags from the
driver and provide supported flags for ptp core to check.

Signed-off-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20250918131146.651468-1-vadim.fedorenko@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vadim Fedorenko and committed by
Jakub Kicinski
d3ca2ef0 5fc7fa74

+2 -4
+2 -4
drivers/ptp/ptp_ocp.c
··· 1485 1485 .pps = true, 1486 1486 .n_ext_ts = 6, 1487 1487 .n_per_out = 5, 1488 + .supported_extts_flags = PTP_STRICT_FLAGS | PTP_RISING_EDGE, 1489 + .supported_perout_flags = PTP_PEROUT_DUTY_CYCLE | PTP_PEROUT_PHASE, 1488 1490 }; 1489 1491 1490 1492 static void ··· 2096 2094 struct ptp_perout_request *req) 2097 2095 { 2098 2096 struct ptp_ocp_signal s = { }; 2099 - 2100 - if (req->flags & ~(PTP_PEROUT_DUTY_CYCLE | 2101 - PTP_PEROUT_PHASE)) 2102 - return -EOPNOTSUPP; 2103 2097 2104 2098 s.polarity = bp->signal[gen].polarity; 2105 2099 s.period = ktime_set(req->period.sec, req->period.nsec);