Searched refs:clk_rate_khz (Results 1 – 2 of 2) sorted by relevance
/drivers/i2c/busses/ |
D | i2c-hisi.c | 85 #define NSEC_TO_CYCLES(ns, clk_rate_khz) \ argument 86 DIV_ROUND_UP_ULL((clk_rate_khz) * (ns), NSEC_PER_MSEC) 107 u32 clk_rate_khz; member 385 total_cnt = DIV_ROUND_UP_ULL(ctlr->clk_rate_khz * HZ_PER_KHZ, ctlr->t.bus_freq_hz); in hisi_i2c_set_scl() 391 scl_fall_cnt = NSEC_TO_CYCLES(ctlr->t.scl_fall_ns, ctlr->clk_rate_khz); in hisi_i2c_set_scl() 393 scl_rise_cnt = NSEC_TO_CYCLES(ctlr->t.scl_rise_ns, ctlr->clk_rate_khz); in hisi_i2c_set_scl() 408 ctlr->spk_len = NSEC_TO_CYCLES(ctlr->t.digital_filter_width_ns, ctlr->clk_rate_khz); in hisi_i2c_configure_bus() 434 sda_hold_cnt = NSEC_TO_CYCLES(ctlr->t.sda_hold_ns, ctlr->clk_rate_khz); in hisi_i2c_configure_bus() 483 ctlr->clk_rate_khz = DIV_ROUND_UP_ULL(clk_rate_hz, HZ_PER_KHZ); in hisi_i2c_probe()
|
D | i2c-rk3x.c | 572 unsigned long clk_rate_khz, scl_rate_khz; in rk3x_i2c_v0_calc_timings() local 626 clk_rate_khz = DIV_ROUND_UP(clk_rate, 1000); in rk3x_i2c_v0_calc_timings() 633 min_total_div = DIV_ROUND_UP(clk_rate_khz, scl_rate_khz * 8); in rk3x_i2c_v0_calc_timings() 636 min_low_div = DIV_ROUND_UP(clk_rate_khz * min_low_ns, 8 * 1000000); in rk3x_i2c_v0_calc_timings() 637 min_high_div = DIV_ROUND_UP(clk_rate_khz * min_high_ns, 8 * 1000000); in rk3x_i2c_v0_calc_timings() 644 max_low_div = clk_rate_khz * max_low_ns / (8 * 1000000); in rk3x_i2c_v0_calc_timings() 672 ideal_low_div = DIV_ROUND_UP(clk_rate_khz * min_low_ns, in rk3x_i2c_v0_calc_timings() 752 unsigned long clk_rate_khz, scl_rate_khz; in rk3x_i2c_v1_calc_timings() local 780 clk_rate_khz = DIV_ROUND_UP(clk_rate, 1000); in rk3x_i2c_v1_calc_timings() 782 min_total_div = DIV_ROUND_UP(clk_rate_khz, scl_rate_khz * 8); in rk3x_i2c_v1_calc_timings() [all …]
|