Home
last modified time | relevance | path

Searched refs:DIV_ROUND_CLOSEST_ULL (Results 1 – 25 of 85) sorted by relevance

1234

/OK3568_Linux_fs/kernel/drivers/gpu/drm/rockchip/
H A Ddw-mipi-dsi2-rockchip.c527 tmp = DIV_ROUND_CLOSEST_ULL(tmp * 100, 228); in dw_mipi_dsi2_get_lane_rate()
545 target_pclk = DIV_ROUND_CLOSEST_ULL(lane_rate * lanes, bpp); in dw_mipi_dsi2_get_lane_rate()
623 phy_hsclk = DIV_ROUND_CLOSEST_ULL(dsi2->lane_hs_rate * MSEC_PER_SEC, 7); in dw_mipi_dsi2_phy_ratio_cfg()
625 phy_hsclk = DIV_ROUND_CLOSEST_ULL(dsi2->lane_hs_rate * MSEC_PER_SEC, 16); in dw_mipi_dsi2_phy_ratio_cfg()
631 tmp = DIV_ROUND_CLOSEST_ULL(phy_hsclk << 16, ipi_clk); in dw_mipi_dsi2_phy_ratio_cfg()
638 tmp = DIV_ROUND_CLOSEST_ULL(phy_hsclk << 16, sys_clk); in dw_mipi_dsi2_phy_ratio_cfg()
649 hstx_clk = DIV_ROUND_CLOSEST_ULL(dsi2->lane_hs_rate * MSEC_PER_SEC, 16); in dw_mipi_dsi2_lp2hs_or_hs2lp_cfg()
656 tmp = DIV_ROUND_CLOSEST_ULL(tmp << 16, ui); in dw_mipi_dsi2_lp2hs_or_hs2lp_cfg()
661 tmp = DIV_ROUND_CLOSEST_ULL(tmp << 16, ui); in dw_mipi_dsi2_lp2hs_or_hs2lp_cfg()
756 phy_hs_clk = DIV_ROUND_CLOSEST_ULL(dsi2->lane_hs_rate * MSEC_PER_SEC, 7); in dw_mipi_dsi2_ipi_set()
[all …]
/OK3568_Linux_fs/kernel/kernel/locking/
H A Dqspinlock_stat.h74 frac = DIV_ROUND_CLOSEST_ULL(frac, kicks); in lockevent_read()
89 sum = DIV_ROUND_CLOSEST_ULL(sum, kicks); in lockevent_read()
/OK3568_Linux_fs/kernel/drivers/pwm/
H A Dpwm-tegra.c110 c = DIV_ROUND_CLOSEST_ULL(c, period_ns); in tegra_pwm_config()
159 hz = DIV_ROUND_CLOSEST_ULL(100ULL * NSEC_PER_SEC, period_ns); in tegra_pwm_config()
160 rate = DIV_ROUND_CLOSEST_ULL(100ULL * rate, hz); in tegra_pwm_config()
H A Dpwm-sprd.c106 state->period = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate); in sprd_pwm_get_state()
111 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate); in sprd_pwm_get_state()
139 prescale = DIV_ROUND_CLOSEST_ULL(tmp, SPRD_PWM_MOD_MAX) - 1; in sprd_pwm_config()
H A Dpwm-mediatek.c139 cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, resolution); in pwm_mediatek_config()
143 cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, in pwm_mediatek_config()
162 cnt_duty = DIV_ROUND_CLOSEST_ULL((u64)duty_ns * 1000, resolution); in pwm_mediatek_config()
H A Dpwm-omap-dmtimer.c87 return DIV_ROUND_CLOSEST_ULL((u64)clk_rate * ns, NSEC_PER_SEC); in pwm_omap_dmtimer_get_clock_cycles()
223 DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * duty_cycles, in pwm_omap_dmtimer_config()
225 DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * period_cycles, in pwm_omap_dmtimer_config()
H A Dpwm-imx-tpm.c98 clock_unit = DIV_ROUND_CLOSEST_ULL(tmp, NSEC_PER_SEC); in pwm_imx_tpm_round_state()
114 real_state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate); in pwm_imx_tpm_round_state()
152 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in pwm_imx_tpm_get_state()
H A Dpwm-rockchip.c120 state->period = DIV_ROUND_CLOSEST_ULL(tmp, pc->clk_rate); in rockchip_pwm_get_state()
124 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, pc->clk_rate); in rockchip_pwm_get_state()
189 period = DIV_ROUND_CLOSEST_ULL(div, dclk_div * pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
192 duty = DIV_ROUND_CLOSEST_ULL(div, dclk_div * pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
H A Dpwm-stm32-lp.c182 state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate); in stm32_pwm_lp_get_state()
187 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in stm32_pwm_lp_get_state()
H A Dpwm-zx.c90 state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate); in zx_pwm_get_state()
94 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in zx_pwm_get_state()
H A Dpwm-sun4i.c162 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state()
165 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state()
/OK3568_Linux_fs/kernel/drivers/clk/at91/
H A Dclk-sam9x60-pll.c75 DIV_ROUND_CLOSEST_ULL((u64)parent_rate * frac->frac, (1 << 22)); in sam9x60_frac_pll_recalc_rate()
197 nfrac = DIV_ROUND_CLOSEST_ULL((u64)remainder * (1 << 22), in sam9x60_frac_pll_compute_mul_frac()
200 tmprate += DIV_ROUND_CLOSEST_ULL((u64)nfrac * parent_rate, in sam9x60_frac_pll_compute_mul_frac()
322 return DIV_ROUND_CLOSEST_ULL(parent_rate, (div->div + 1)); in sam9x60_div_pll_recalc_rate()
348 tmp_rate = DIV_ROUND_CLOSEST_ULL(tmp_parent_rate, divid); in sam9x60_div_pll_compute_div()
H A Dclk-audio-pll.c166 fr = DIV_ROUND_CLOSEST_ULL(fr, AUDIO_PLL_DIV_FRAC); in clk_audio_pll_fout()
234 tmp = DIV_ROUND_CLOSEST_ULL(tmp, parent_rate); in clk_audio_pll_frac_compute_frac()
/OK3568_Linux_fs/kernel/drivers/media/i2c/rk628/
H A Drk628_dsi.c204 hline_time = DIV_ROUND_CLOSEST_ULL(hline * lanebyteclk, dpipclk); in rk628_dsi_set_vid_mode()
208 hs_time = DIV_ROUND_CLOSEST_ULL(hs * lanebyteclk, dpipclk); in rk628_dsi_set_vid_mode()
211 hbp_time = DIV_ROUND_CLOSEST_ULL(hbp * lanebyteclk, dpipclk); in rk628_dsi_set_vid_mode()
/OK3568_Linux_fs/kernel/drivers/clk/x86/
H A Dclk-cgu.c502 div = DIV_ROUND_CLOSEST_ULL((u64)prate, rate); in lgm_clk_ddiv_set_rate()
506 div = DIV_ROUND_CLOSEST_ULL((u64)div, 5); in lgm_clk_ddiv_set_rate()
539 div = DIV_ROUND_CLOSEST_ULL((u64)*prate, rate); in lgm_clk_ddiv_round_rate()
545 div = DIV_ROUND_CLOSEST_ULL((u64)div, 5); in lgm_clk_ddiv_round_rate()
564 rate64 = DIV_ROUND_CLOSEST_ULL(rate64, 5); in lgm_clk_ddiv_round_rate()
/OK3568_Linux_fs/kernel/drivers/clk/bcm/
H A Dclk-kona.c78 return DIV_ROUND_CLOSEST_ULL(combined, BILLION); in scaled_div_build()
722 scaled_parent_rate = DIV_ROUND_CLOSEST_ULL(scaled_rate, in clk_recalc_rate()
734 result = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate, scaled_div); in clk_recalc_rate()
781 scaled_parent_rate = DIV_ROUND_CLOSEST_ULL(scaled_rate, in round_rate()
793 best_scaled_div = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate, in round_rate()
806 result = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate, best_scaled_div); in round_rate()
/OK3568_Linux_fs/kernel/drivers/hwmon/
H A Dtmp513.c545 max_curr_ma = DIV_ROUND_CLOSEST_ULL(vshunt_max * 1000 * 1000, in tmp51x_calibrate()
552 data->curr_lsb_ua = DIV_ROUND_CLOSEST_ULL(max_curr_ma * 1000, 32767); in tmp51x_calibrate()
555 div = DIV_ROUND_CLOSEST_ULL(data->curr_lsb_ua * data->shunt_uohms, in tmp51x_calibrate()
/OK3568_Linux_fs/kernel/drivers/net/phy/
H A Dbcm54140.c83 #define BCM54140_HWMON_FROM_TEMP(v) DIV_ROUND_CLOSEST_ULL(413350L - (v), 491)
92 #define BCM54140_HWMON_FROM_IN_1V0(v) DIV_ROUND_CLOSEST_ULL(((v) << 11), 2514)
101 #define BCM54140_HWMON_FROM_IN_3V3(v) DIV_ROUND_CLOSEST_ULL(((v) << 12), 4400)
/OK3568_Linux_fs/kernel/drivers/regulator/
H A Dpwm-regulator.c186 voltage = DIV_ROUND_CLOSEST_ULL((u64)voltage * diff_uV, diff_duty); in pwm_regulator_get_voltage()
219 dutycycle = DIV_ROUND_CLOSEST_ULL((u64)(req_min_uV - min_uV) * in pwm_regulator_set_voltage()
/OK3568_Linux_fs/kernel/drivers/clk/sprd/
H A Dpll.c135 rate = DIV_ROUND_CLOSEST_ULL(refin * kint * k1, in _sprd_pll_recalc_rate()
204 kint = DIV_ROUND_CLOSEST_ULL(tmp, refin * 100); in _sprd_pll_set_rate()
/OK3568_Linux_fs/kernel/drivers/clk/meson/
H A Dclk-pll.c112 val = DIV_ROUND_CLOSEST_ULL(val * frac_max, parent_rate); in __pll_params_with_frac()
161 return DIV_ROUND_CLOSEST_ULL(val, parent_rate); in meson_clk_get_pll_range_m()
H A Dclk-mpll.c55 *sdm = DIV_ROUND_CLOSEST_ULL(frac, requested_rate); in params_from_rate()
/OK3568_Linux_fs/kernel/include/linux/
H A Dpwm.h235 return DIV_ROUND_CLOSEST_ULL((u64)state->duty_cycle * scale, in pwm_get_relative_duty_cycle()
264 state->duty_cycle = DIV_ROUND_CLOSEST_ULL((u64)duty_cycle * in pwm_set_relative_duty_cycle()
/OK3568_Linux_fs/kernel/drivers/gpu/drm/panel/
H A Dpanel-maxim-max96772.c227 hwords = DIV_ROUND_CLOSEST_ULL(hact * 24, 16) - p->lane_count; in max96772_prepare()
232 mvid = DIV_ROUND_CLOSEST_ULL((u64)mode->clock * 32768, in max96772_prepare()
/OK3568_Linux_fs/kernel/drivers/clk/
H A Dclk-axi-clkgen.c380 tmp = DIV_ROUND_CLOSEST_ULL(tmp, dout * d); in axi_clkgen_round_rate()
435 tmp = DIV_ROUND_CLOSEST_ULL(tmp, dout * d); in axi_clkgen_recalc_rate()

1234