Lines Matching refs:step_cnt
328 unsigned int step_cnt; in mtk_i2c_calculate_speed() local
357 step_cnt = DIV_ROUND_UP(opt_div, sample_cnt); in mtk_i2c_calculate_speed()
358 cnt_mul = step_cnt * sample_cnt; in mtk_i2c_calculate_speed()
359 if (step_cnt > max_step_cnt) in mtk_i2c_calculate_speed()
365 base_step_cnt = step_cnt; in mtk_i2c_calculate_speed()
372 step_cnt = base_step_cnt; in mtk_i2c_calculate_speed()
374 if ((clk_src / (2 * sample_cnt * step_cnt)) > target_speed) { in mtk_i2c_calculate_speed()
382 *timing_step_cnt = step_cnt - 1; in mtk_i2c_calculate_speed()
391 unsigned int step_cnt; in mtk_i2c_set_speed() local
402 &step_cnt, &sample_cnt); in mtk_i2c_set_speed()
406 i2c->timing_reg = (sample_cnt << 8) | step_cnt; in mtk_i2c_set_speed()
410 &step_cnt, &sample_cnt); in mtk_i2c_set_speed()
415 (sample_cnt << 12) | (step_cnt << 8); in mtk_i2c_set_speed()
418 &step_cnt, &sample_cnt); in mtk_i2c_set_speed()
422 i2c->timing_reg = (sample_cnt << 8) | step_cnt; in mtk_i2c_set_speed()