Lines Matching refs:step_cnt
602 unsigned int step_cnt, in mtk_i2c_check_ac_timing() argument
630 if ((2 * step_cnt) > low_cnt && low_cnt < max_step_cnt) { in mtk_i2c_check_ac_timing()
631 if (low_cnt > step_cnt) { in mtk_i2c_check_ac_timing()
632 high_cnt = 2 * step_cnt - low_cnt; in mtk_i2c_check_ac_timing()
634 high_cnt = step_cnt; in mtk_i2c_check_ac_timing()
635 low_cnt = step_cnt; in mtk_i2c_check_ac_timing()
705 unsigned int step_cnt; in mtk_i2c_calculate_speed() local
731 step_cnt = DIV_ROUND_UP(opt_div, sample_cnt); in mtk_i2c_calculate_speed()
732 cnt_mul = step_cnt * sample_cnt; in mtk_i2c_calculate_speed()
733 if (step_cnt > max_step_cnt) in mtk_i2c_calculate_speed()
738 target_speed, step_cnt - 1, sample_cnt - 1); in mtk_i2c_calculate_speed()
744 base_step_cnt = step_cnt; in mtk_i2c_calculate_speed()
754 step_cnt = base_step_cnt; in mtk_i2c_calculate_speed()
756 if ((clk_src / (2 * sample_cnt * step_cnt)) > target_speed) { in mtk_i2c_calculate_speed()
764 *timing_step_cnt = step_cnt - 1; in mtk_i2c_calculate_speed()
773 unsigned int step_cnt; in mtk_i2c_set_speed() local
806 target_speed, &step_cnt, in mtk_i2c_set_speed()
812 (sample_cnt << 12) | (step_cnt << 8); in mtk_i2c_set_speed()
817 (sample_cnt << 12) | (step_cnt << 9); in mtk_i2c_set_speed()