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

ptp: ocp: Add .getmaxphase ptp_clock_info callback

Add a function that advertises a maximum offset of zero supported by
ptp_clock_info .adjphase in the OCP null ptp implementation.

Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Rahul Rameshbabu and committed by
David S. Miller
d8ee5ca8 e156e4d2

+7
+7
drivers/ptp/ptp_ocp.c
··· 1124 1124 return -EOPNOTSUPP; 1125 1125 } 1126 1126 1127 + static s32 1128 + ptp_ocp_null_getmaxphase(struct ptp_clock_info *ptp_info) 1129 + { 1130 + return 0; 1131 + } 1132 + 1127 1133 static int 1128 1134 ptp_ocp_null_adjphase(struct ptp_clock_info *ptp_info, s32 phase_ns) 1129 1135 { ··· 1245 1239 .adjtime = ptp_ocp_adjtime, 1246 1240 .adjfine = ptp_ocp_null_adjfine, 1247 1241 .adjphase = ptp_ocp_null_adjphase, 1242 + .getmaxphase = ptp_ocp_null_getmaxphase, 1248 1243 .enable = ptp_ocp_enable, 1249 1244 .verify = ptp_ocp_verify, 1250 1245 .pps = true,