Lines Matching full:bt
65 int can_calc_bittiming(const struct net_device *dev, struct can_bittiming *bt, in can_calc_bittiming() argument
82 if (bt->sample_point) { in can_calc_bittiming()
83 sample_point_nominal = bt->sample_point; in can_calc_bittiming()
85 if (bt->bitrate > 800 * KILO /* BPS */) in can_calc_bittiming()
87 else if (bt->bitrate > 500 * KILO /* BPS */) in can_calc_bittiming()
99 brp = priv->clock.freq / (tsegall * bt->bitrate) + tseg % 2; in can_calc_bittiming()
107 bitrate_error = abs(bt->bitrate - bitrate); in can_calc_bittiming()
134 do_div(v64, bt->bitrate); in can_calc_bittiming()
148 bt->sample_point = can_update_sample_point(btc, sample_point_nominal, in can_calc_bittiming()
154 bt->tq = (u32)v64; in can_calc_bittiming()
155 bt->prop_seg = tseg1 / 2; in can_calc_bittiming()
156 bt->phase_seg1 = tseg1 - bt->prop_seg; in can_calc_bittiming()
157 bt->phase_seg2 = tseg2; in can_calc_bittiming()
159 can_sjw_set_default(bt); in can_calc_bittiming()
161 err = can_sjw_check(dev, bt, btc, extack); in can_calc_bittiming()
165 bt->brp = best_brp; in can_calc_bittiming()
168 bt->bitrate = priv->clock.freq / in can_calc_bittiming()
169 (bt->brp * can_bit_time(bt)); in can_calc_bittiming()