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: Clarify ptp_clock_info .adjphase expects an internal servo to be used

.adjphase expects a PHC to use an internal servo algorithm to correct the
provided phase offset target in the callback. Implementation of the
internal servo algorithm are defined by the individual devices.

Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Rahul Rameshbabu and committed by
David S. Miller
a05d070a 49310624

+20 -2
+16
Documentation/driver-api/ptp.rst
··· 73 73 class driver, since the lock may also be needed by the clock 74 74 driver's interrupt service routine. 75 75 76 + PTP hardware clock requirements for '.adjphase' 77 + ----------------------------------------------- 78 + 79 + The 'struct ptp_clock_info' interface has a '.adjphase' function. 80 + This function has a set of requirements from the PHC in order to be 81 + implemented. 82 + 83 + * The PHC implements a servo algorithm internally that is used to 84 + correct the offset passed in the '.adjphase' call. 85 + * When other PTP adjustment functions are called, the PHC servo 86 + algorithm is disabled. 87 + 88 + **NOTE:** '.adjphase' is not a simple time adjustment functionality 89 + that 'jumps' the PHC clock time based on the provided offset. It 90 + should correct the offset provided using an internal algorithm. 91 + 76 92 Supported hardware 77 93 ================== 78 94
+4 -2
include/linux/ptp_clock_kernel.h
··· 77 77 * nominal frequency in parts per million, but with a 78 78 * 16 bit binary fractional field. 79 79 * 80 - * @adjphase: Adjusts the phase offset of the hardware clock. 81 - * parameter delta: Desired change in nanoseconds. 80 + * @adjphase: Indicates that the PHC should use an internal servo 81 + * algorithm to correct the provided phase offset. 82 + * parameter delta: PHC servo phase adjustment target 83 + * in nanoseconds. 82 84 * 83 85 * @adjtime: Shifts the time of the hardware clock. 84 86 * parameter delta: Desired change in nanoseconds.