Lines Matching refs:step_cnt
674 unsigned int step_cnt, in mtk_i2c_check_ac_timing() argument
703 if ((2 * step_cnt) > low_cnt && low_cnt < max_step_cnt) { in mtk_i2c_check_ac_timing()
704 if (low_cnt > step_cnt) { in mtk_i2c_check_ac_timing()
705 high_cnt = 2 * step_cnt - low_cnt; in mtk_i2c_check_ac_timing()
707 high_cnt = step_cnt; in mtk_i2c_check_ac_timing()
708 low_cnt = step_cnt; in mtk_i2c_check_ac_timing()
778 unsigned int step_cnt; in mtk_i2c_calculate_speed() local
806 step_cnt = DIV_ROUND_UP(opt_div + clk_div_restri, sample_cnt); in mtk_i2c_calculate_speed()
807 cnt_mul = step_cnt * sample_cnt; in mtk_i2c_calculate_speed()
808 if (step_cnt > max_step_cnt) in mtk_i2c_calculate_speed()
813 target_speed, step_cnt - 1, sample_cnt - 1); in mtk_i2c_calculate_speed()
819 base_step_cnt = step_cnt; in mtk_i2c_calculate_speed()
829 step_cnt = base_step_cnt; in mtk_i2c_calculate_speed()
831 if ((clk_src / (2 * (sample_cnt * step_cnt - clk_div_restri))) > in mtk_i2c_calculate_speed()
840 *timing_step_cnt = step_cnt - 1; in mtk_i2c_calculate_speed()
849 unsigned int step_cnt; in mtk_i2c_set_speed() local
885 target_speed, &step_cnt, in mtk_i2c_set_speed()
891 (sample_cnt << 12) | (step_cnt << 8); in mtk_i2c_set_speed()
896 (sample_cnt << 12) | (step_cnt << 9); in mtk_i2c_set_speed()