Home
last modified time | relevance | path

Searched refs:step_cnt (Results 1 – 1 of 1) sorted by relevance

/linux-4.4.14/drivers/i2c/busses/
Di2c-mt65xx.c288 unsigned int step_cnt; in mtk_i2c_set_speed() local
321 step_cnt = DIV_ROUND_UP(opt_div, sample_cnt); in mtk_i2c_set_speed()
322 cnt_mul = step_cnt * sample_cnt; in mtk_i2c_set_speed()
323 if (step_cnt > max_step_cnt) in mtk_i2c_set_speed()
329 base_step_cnt = step_cnt; in mtk_i2c_set_speed()
336 step_cnt = base_step_cnt; in mtk_i2c_set_speed()
338 if ((clk_src / (2 * sample_cnt * step_cnt)) > target_speed) { in mtk_i2c_set_speed()
346 step_cnt--; in mtk_i2c_set_speed()
353 (sample_cnt << 12) | (step_cnt << 8); in mtk_i2c_set_speed()
355 i2c->timing_reg = (sample_cnt << 8) | (step_cnt << 0); in mtk_i2c_set_speed()