Lines Matching refs:tseg1
96 unsigned int tseg1, tseg2; in can_update_sample_point() local
102 tseg1 = tseg - tseg2; in can_update_sample_point()
103 if (tseg1 > btc->tseg1_max) { in can_update_sample_point()
104 tseg1 = btc->tseg1_max; in can_update_sample_point()
105 tseg2 = tseg - tseg1; in can_update_sample_point()
114 *tseg1_ptr = tseg1; 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()
211 bt->prop_seg = tseg1 / 2; in can_calc_bittiming()
212 bt->phase_seg1 = tseg1 - bt->prop_seg; in can_calc_bittiming()
230 bt->bitrate = priv->clock.freq / (bt->brp * (CAN_CALC_SYNC_SEG + tseg1 + tseg2)); in can_calc_bittiming()
253 int tseg1, alltseg; in can_fixup_bittiming() local
256 tseg1 = bt->prop_seg + bt->phase_seg1; in can_fixup_bittiming()
260 tseg1 < btc->tseg1_min || tseg1 > btc->tseg1_max || in can_fixup_bittiming()
278 bt->sample_point = ((tseg1 + 1) * 1000) / alltseg; in can_fixup_bittiming()