i40e: convert .adjfreq to .adjfine
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 21 Jul 2022 21:29:59 +0000 (14:29 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 28 Jul 2022 17:59:38 +0000 (10:59 -0700)
commitccd3bf98592117f59be2daa0f2ca00f352d7abbc
tree59723de8a1539b5e4afd34ef3772130582d8c0f3
parent3626a690b717c18a969274e1fe000f8885d5afad
i40e: convert .adjfreq to .adjfine

The i40e driver currently implements the .adjfreq handler for frequency
adjustments. This takes the adjustment parameter in parts per billion. The
PTP core supports .adjfine which provides an adjustment in scaled parts per
million. This has a higher resolution and can result in more precise
adjustments for small corrections.

Convert the existing .adjfreq implementation to the newer .adjfine
implementation. This is trivial since it just requires changing the divisor
from 1000000000ULL to (1000000ULL << 16) in the mul_u64_u64_div_u64 call.

This improves the precision of the adjustments and gets us one driver
closer to removing the old .adjfreq support from the kernel.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ptp.c