Searched refs:sample_cnt (Results 1 - 3 of 3) sorted by relevance

/linux-4.4.14/drivers/i2c/busses/
H A Di2c-mt65xx.c277 * i2c_bus_freq = parent_clk / (clock_div * 2 * sample_cnt * step_cnt)
282 * sample_cnt and step_cn
289 unsigned int sample_cnt; mtk_i2c_set_speed() local
314 /* Search for the best pair (sample_cnt, step_cnt) with mtk_i2c_set_speed()
315 * 0 < sample_cnt < MAX_SAMPLE_CNT_DIV mtk_i2c_set_speed()
317 * sample_cnt * step_cnt >= opt_div mtk_i2c_set_speed()
318 * optimizing for sample_cnt * step_cnt being minimal mtk_i2c_set_speed()
320 for (sample_cnt = 1; sample_cnt <= MAX_SAMPLE_CNT_DIV; sample_cnt++) { mtk_i2c_set_speed()
321 step_cnt = DIV_ROUND_UP(opt_div, sample_cnt); mtk_i2c_set_speed()
322 cnt_mul = step_cnt * sample_cnt; mtk_i2c_set_speed()
328 base_sample_cnt = sample_cnt; mtk_i2c_set_speed()
335 sample_cnt = base_sample_cnt; mtk_i2c_set_speed()
338 if ((clk_src / (2 * sample_cnt * step_cnt)) > target_speed) { mtk_i2c_set_speed()
347 sample_cnt--; mtk_i2c_set_speed()
353 (sample_cnt << 12) | (step_cnt << 8); mtk_i2c_set_speed()
355 i2c->timing_reg = (sample_cnt << 8) | (step_cnt << 0); mtk_i2c_set_speed()
/linux-4.4.14/net/ipv4/
H A Dtcp_cdg.c89 u16 sample_cnt; member in struct:cdg
170 if (ca->sample_cnt < 8) { tcp_cdg_hystart_update()
171 ca->sample_cnt++; tcp_cdg_hystart_update()
279 ca->sample_cnt = 0; tcp_cdg_cong_avoid()
H A Dtcp_cubic.c97 u8 sample_cnt; /* number of samples to decide curr_rtt */ member in struct:bictcp
137 ca->sample_cnt = 0; bictcp_hystart_reset()
417 if (ca->sample_cnt < HYSTART_MIN_SAMPLES) { hystart_update()
421 ca->sample_cnt++; hystart_update()

Completed in 144 milliseconds