Lines Matching full:min

150  * @param min        Pointer to the minimum supported timing parameter values.
156 const struct can_timing *min, const struct can_timing *max) in update_sample_pnt() argument
159 uint16_t tseg1_min = min->phase_seg1 + min->prop_seg; in update_sample_pnt()
165 tseg2 = CLAMP(tseg2, min->phase_seg2, max->phase_seg2); in update_sample_pnt()
182 if (tseg2 < min->phase_seg2) { in update_sample_pnt()
190 res->prop_seg = CLAMP(tseg1 / 2, min->prop_seg, max->prop_seg); in update_sample_pnt()
197 } else if (res->phase_seg1 < min->phase_seg1) { in update_sample_pnt()
199 res->phase_seg1 = min->phase_seg1; in update_sample_pnt()
241 * @param min Pointer to the minimum supported timing parameter values.
252 const struct can_timing *min, const struct can_timing *max, in can_calc_timing_internal() argument
275 for (prescaler = MAX(core_clock / (total_tq * bitrate), min->prescaler); in can_calc_timing_internal()
286 err = update_sample_pnt(total_tq, sample_pnt, &tmp_res, min, max); in can_calc_timing_internal()
312 res->sjw = MIN(res->phase_seg1, res->phase_seg2 / 2); in can_calc_timing_internal()
313 res->sjw = CLAMP(res->sjw, min->sjw, max->sjw); in can_calc_timing_internal()
321 const struct can_timing *min = can_get_timing_min(dev); in z_impl_can_calc_timing() local
328 return can_calc_timing_internal(dev, res, min, max, bitrate, sample_pnt); in z_impl_can_calc_timing()
335 const struct can_timing *min = can_get_timing_data_min(dev); in z_impl_can_calc_timing_data() local
342 return can_calc_timing_internal(dev, res, min, max, bitrate, sample_pnt); in z_impl_can_calc_timing_data()
347 const struct can_timing *min, in check_timing_in_range() argument
350 if (!IN_RANGE(timing->sjw, min->sjw, max->sjw) || in check_timing_in_range()
351 !IN_RANGE(timing->prop_seg, min->prop_seg, max->prop_seg) || in check_timing_in_range()
352 !IN_RANGE(timing->phase_seg1, min->phase_seg1, max->phase_seg1) || in check_timing_in_range()
353 !IN_RANGE(timing->phase_seg2, min->phase_seg2, max->phase_seg2) || in check_timing_in_range()
354 !IN_RANGE(timing->prescaler, min->prescaler, max->prescaler)) { in check_timing_in_range()
369 const struct can_timing *min = can_get_timing_min(dev); in z_impl_can_set_timing() local
373 err = check_timing_in_range(timing, min, max); in z_impl_can_set_timing()
384 uint32_t min = can_get_bitrate_min(dev); in z_impl_can_set_bitrate() local
389 if ((bitrate < min) || (bitrate > max)) { in z_impl_can_set_bitrate()
411 const struct can_timing *min = can_get_timing_data_min(dev); in z_impl_can_set_timing_data() local
419 err = check_timing_in_range(timing_data, min, max); in z_impl_can_set_timing_data()
430 uint32_t min = can_get_bitrate_min(dev); in z_impl_can_set_bitrate_data() local
435 if ((bitrate_data < min) || (bitrate_data > max)) { in z_impl_can_set_bitrate_data()