On Mon, Nov 28, 2022 at 02:43:00PM -0800, Jacob Keller wrote: > The interface to the Linux kernel for adjusting clock frequencies is > specified in scaled parts per million, where the frequency field is parts > per million with a 16 bit binary fractional field. (Equivalently it is > parts per ~65 billion). > > The frequency adjustment is stored internally as a double, even though when > displaying we always display only a whole number adjustment. Thus ptp4l and > phc2sys already use the full range of frequency adjustments that can be > specified using a double type. > > However, when initializing the servo we read the current clock frequency > and cast it to an integer, discarding the fractional part below a part per > billion. > > Refactor the servo_create API to take a double value instead of an integer > value. Fix the clockadj_get_freq and clockadj_set_freq initialization to > avoid casting to an integer and thus rounding the value. > > Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com>
Applied. Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel