Lines Matching refs:tseg2
96 unsigned int tseg1, tseg2; in can_update_sample_point() local
100 tseg2 = tseg + CAN_CALC_SYNC_SEG - (sample_point_nominal * (tseg + CAN_CALC_SYNC_SEG)) / 1000 - i; in can_update_sample_point()
101 tseg2 = clamp(tseg2, btc->tseg2_min, btc->tseg2_max); in can_update_sample_point()
102 tseg1 = tseg - tseg2; in can_update_sample_point()
105 tseg2 = tseg - tseg1; in can_update_sample_point()
108 sample_point = 1000 * (tseg + CAN_CALC_SYNC_SEG - tseg2) / (tseg + CAN_CALC_SYNC_SEG); in can_update_sample_point()
115 *tseg2_ptr = tseg2; in can_update_sample_point()
137 unsigned int brp, tsegall, tseg, tseg1 = 0, tseg2 = 0; in can_calc_bittiming() local
176 can_update_sample_point(btc, sample_point_nominal, tseg / 2, &tseg1, &tseg2, &sample_point_error); in can_calc_bittiming()
206 &tseg1, &tseg2, NULL); in can_calc_bittiming()
213 bt->phase_seg2 = tseg2; in can_calc_bittiming()
223 if (tseg2 < bt->sjw) in can_calc_bittiming()
224 bt->sjw = tseg2; in can_calc_bittiming()
230 bt->bitrate = priv->clock.freq / (bt->brp * (CAN_CALC_SYNC_SEG + tseg1 + tseg2)); in can_calc_bittiming()