Lines Matching full:ratio
94 double ratio) in ptp_clock_nxp_enet_rate_adjust() argument
108 if ((ratio > 1.0 && ratio - 1.0 < 0.00000001) || in ptp_clock_nxp_enet_rate_adjust()
109 (ratio < 1.0 && 1.0 - ratio < 0.00000001)) { in ptp_clock_nxp_enet_rate_adjust()
113 ratio *= data->clock_ratio; in ptp_clock_nxp_enet_rate_adjust()
115 /* Limit possible ratio. */ in ptp_clock_nxp_enet_rate_adjust()
116 if ((ratio > 1.0 + 1.0/(2 * hw_inc)) || in ptp_clock_nxp_enet_rate_adjust()
117 (ratio < 1.0 - 1.0/(2 * hw_inc))) { in ptp_clock_nxp_enet_rate_adjust()
121 /* Save new ratio. */ in ptp_clock_nxp_enet_rate_adjust()
122 data->clock_ratio = ratio; in ptp_clock_nxp_enet_rate_adjust()
124 if (ratio < 1.0) { in ptp_clock_nxp_enet_rate_adjust()
126 val = 1.0 / (hw_inc * (1.0 - ratio)); in ptp_clock_nxp_enet_rate_adjust()
127 } else if (ratio > 1.0) { in ptp_clock_nxp_enet_rate_adjust()
129 val = 1.0 / (hw_inc * (ratio - 1.0)); in ptp_clock_nxp_enet_rate_adjust()