Skip to content

Commit 969e619

Browse files
yangbolu1991MaureenHelm
authored andcommitted
include: drivers: ptp_clock: clarify ptp_clock_rate_adjust function
It's not very clear about the function of ptp_clock_rate_adjust in doc. Previously, all device drivers used it to adjust rate ratio relatively based on current frequency. When PI servo was introduced in PTP and gPTP stacks, NXP ENET PTP driver started to use it to adjust rate ratio based on its nominal frequency. Rate ratio adjustment based on nominal frequency with PI servo could get stable frequency control. So, let's clarify ptp_clock_rate_adjust adjusting rate ratio based on nominal frequency, and convert other device drivers. Signed-off-by: Yangbo Lu <[email protected]>
1 parent dbf1454 commit 969e619

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

doc/releases/migration-guide-4.3.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ Display
8282
This has now been fixed. Boards and applications that were tested or developed based on the
8383
previous sample may be affected by this change (see :github:`79996` for more information).
8484

85+
PTP Clock
86+
*********
87+
88+
* The doc of :c:func:`ptp_clock_rate_adjust` API didn't provide proper and clear function description.
89+
Drivers implemented it to adjust rate ratio relatively based on current frequency.
90+
Now PI servo is introduced in both PTP and gPTP, and this API function is changed to use for rate
91+
ratio adjusting based on nominal frequency. Drivers implementing :c:func:`ptp_clock_rate_adjust`
92+
should be adjusted to account for the new behavior.
93+
8594
Other subsystems
8695
****************
8796

include/zephyr/drivers/ptp_clock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ static inline int ptp_clock_adjust(const struct device *dev, int increment)
8282
}
8383

8484
/**
85-
* @brief Adjust the PTP clock time change rate when compared to its neighbor.
85+
* @brief Adjust the PTP clock rate ratio based on its nominal frequency
8686
*
8787
* @param dev PTP clock device
88-
* @param rate Rate of the clock time change
88+
* @param rate Rate ratio based on its nominal frequency
8989
*
9090
* @return 0 if ok, <0 if error
9191
*/

0 commit comments

Comments
 (0)