Lines Matching refs:tseg
26 const unsigned int sample_point_nominal, const unsigned int tseg,
36 tseg2 = tseg + CAN_SYNC_SEG -
37 (sample_point_nominal * (tseg + CAN_SYNC_SEG)) /
40 tseg1 = tseg - tseg2;
43 tseg2 = tseg - tseg1;
46 sample_point = 1000 * (tseg + CAN_SYNC_SEG - tseg2) /
47 (tseg + CAN_SYNC_SEG);
75 unsigned int best_tseg = 0; /* current best value for tseg */
77 unsigned int brp, tsegall, tseg, tseg1 = 0, tseg2 = 0;
93 /* tseg even = round down, odd = round up */
94 for (tseg = (btc->tseg1_max + btc->tseg2_max) * 2 + 1;
95 tseg >= (btc->tseg1_min + btc->tseg2_min) * 2; tseg--) {
96 tsegall = CAN_SYNC_SEG + tseg / 2;
98 /* Compute all possible tseg choices (tseg=tseg1+tseg2) */
99 brp = priv->clock.freq / (tsegall * bt->bitrate) + tseg % 2;
109 /* tseg brp biterror */
117 can_update_sample_point(btc, sample_point_nominal, tseg / 2,
124 best_tseg = tseg / 2;