diff options
author | Rahul Rameshbabu <rrameshbabu@nvidia.com> | 2023-06-12 14:14:56 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-06-20 09:02:33 +0100 |
commit | c3b60ab7a4dff6e6e608e685b70ddc3d6b2aca81 (patch) | |
tree | 5ca798c8795ce133b62d61fc7400919ad9f52dd2 /tools/testing/selftests/ptp | |
parent | 3a9a9a6139286584d1199f555fa4f96f592a3217 (diff) | |
download | linux-stable-c3b60ab7a4dff6e6e608e685b70ddc3d6b2aca81.tar.gz linux-stable-c3b60ab7a4dff6e6e608e685b70ddc3d6b2aca81.tar.bz2 linux-stable-c3b60ab7a4dff6e6e608e685b70ddc3d6b2aca81.zip |
ptp: Add .getmaxphase callback to ptp_clock_info
Enables advertisement of the maximum offset supported by the phase control
functionality of PHCs. The callback is used to return an error if an offset
not supported by the PHC is used in ADJ_OFFSET. The ioctls
PTP_CLOCK_GETCAPS and PTP_CLOCK_GETCAPS2 now advertise the maximum offset a
PHC's phase control functionality is capable of supporting. Introduce new
sysfs node, max_phase_adjustment.
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Maciek Machnikowski <maciek@machnikowski.net>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/ptp')
-rw-r--r-- | tools/testing/selftests/ptp/testptp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/ptp/testptp.c b/tools/testing/selftests/ptp/testptp.c index cc535f76db99..e9438a1862ad 100644 --- a/tools/testing/selftests/ptp/testptp.c +++ b/tools/testing/selftests/ptp/testptp.c @@ -292,7 +292,8 @@ int main(int argc, char *argv[]) " %d pulse per second\n" " %d programmable pins\n" " %d cross timestamping\n" - " %d adjust_phase\n", + " %d adjust_phase\n" + " %d maximum phase adjustment (ns)\n", caps.max_adj, caps.n_alarm, caps.n_ext_ts, @@ -300,7 +301,8 @@ int main(int argc, char *argv[]) caps.pps, caps.n_pins, caps.cross_timestamping, - caps.adjust_phase); + caps.adjust_phase, + caps.max_phase_adj); } } |