| /Linux-v5.4/kernel/locking/ |
| D | qspinlock_stat.h | 74 frac = DIV_ROUND_CLOSEST_ULL(frac, kicks); in lockevent_read() 89 sum = DIV_ROUND_CLOSEST_ULL(sum, kicks); in lockevent_read()
|
| /Linux-v5.4/drivers/pwm/ |
| D | pwm-tegra.c | 81 c = DIV_ROUND_CLOSEST_ULL(c, period_ns); in tegra_pwm_config() 92 hz = DIV_ROUND_CLOSEST_ULL(100ULL * NSEC_PER_SEC, period_ns); in tegra_pwm_config() 93 rate = DIV_ROUND_CLOSEST_ULL(100ULL * rate, hz); in tegra_pwm_config()
|
| D | pwm-sprd.c | 106 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()
|
| D | pwm-imx-tpm.c | 100 clock_unit = DIV_ROUND_CLOSEST_ULL(tmp, NSEC_PER_SEC); in pwm_imx_tpm_round_state() 116 real_state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate); in pwm_imx_tpm_round_state() 129 p->val = DIV_ROUND_CLOSEST_ULL(tmp, real_state->period); in pwm_imx_tpm_round_state() 154 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in pwm_imx_tpm_get_state()
|
| D | pwm-rockchip.c | 79 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in rockchip_pwm_get_state() 83 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in rockchip_pwm_get_state() 117 period = DIV_ROUND_CLOSEST_ULL(div, in rockchip_pwm_config() 121 duty = DIV_ROUND_CLOSEST_ULL(div, pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
|
| D | pwm-imx27.c | 150 pwm_clk = DIV_ROUND_CLOSEST_ULL(pwm_clk, prescaler); in pwm_imx27_get_state() 156 state->period = DIV_ROUND_CLOSEST_ULL(tmp, pwm_clk); in pwm_imx27_get_state() 162 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, pwm_clk); in pwm_imx27_get_state()
|
| D | pwm-mediatek.c | 138 cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, resolution); in pwm_mediatek_config() 142 cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, in pwm_mediatek_config() 161 cnt_duty = DIV_ROUND_CLOSEST_ULL((u64)duty_ns * 1000, resolution); in pwm_mediatek_config()
|
| D | pwm-omap-dmtimer.c | 50 return DIV_ROUND_CLOSEST_ULL((u64)clk_rate * ns, NSEC_PER_SEC); in pwm_omap_dmtimer_get_clock_cycles() 169 DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * duty_cycles, in pwm_omap_dmtimer_config() 171 DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * period_cycles, in pwm_omap_dmtimer_config()
|
| D | pwm-stm32-lp.c | 182 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()
|
| D | pwm-zx.c | 90 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()
|
| D | pwm-sun4i.c | 141 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state() 144 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state()
|
| D | pwm-lpss.c | 99 base_unit = DIV_ROUND_CLOSEST_ULL(freq, c); in pwm_lpss_prepare()
|
| /Linux-v5.4/drivers/clk/bcm/ |
| D | clk-kona.c | 78 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()
|
| /Linux-v5.4/drivers/clk/at91/ |
| D | clk-sam9x60-pll.c | 216 tmpfrac = DIV_ROUND_CLOSEST_ULL((u64)remainder * tmpdiv * (1 << 22), in sam9x60_pll_get_best_div_mul() 219 tmprate += DIV_ROUND_CLOSEST_ULL((u64)tmpfrac * parent_rate, in sam9x60_pll_get_best_div_mul()
|
| D | clk-audio-pll.c | 166 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()
|
| /Linux-v5.4/drivers/video/backlight/ |
| D | pwm_bl.c | 174 retval = DIV_ROUND_CLOSEST_ULL(lightness * 10, 9023); in cie1931() 177 retval = DIV_ROUND_CLOSEST_ULL(retval, (scale * scale)); in cie1931() 213 retval = DIV_ROUND_CLOSEST_ULL(retval, PWM_LUMINANCE_SCALE); in pwm_backlight_brightness_default()
|
| /Linux-v5.4/drivers/regulator/ |
| D | pwm-regulator.c | 175 voltage = DIV_ROUND_CLOSEST_ULL((u64)voltage * diff_uV, diff_duty); in pwm_regulator_get_voltage() 208 dutycycle = DIV_ROUND_CLOSEST_ULL((u64)(req_min_uV - min_uV) * in pwm_regulator_set_voltage()
|
| D | vctrl-regulator.c | 52 DIV_ROUND_CLOSEST_ULL((s64)(out_uV - out->min_uV) * in vctrl_calc_ctrl_voltage() 74 DIV_ROUND_CLOSEST_ULL((s64)(ctrl_uV - ctrl->min_uV) * in vctrl_calc_output_voltage()
|
| /Linux-v5.4/drivers/clk/meson/ |
| D | clk-pll.c | 103 val = DIV_ROUND_CLOSEST_ULL(val * frac_max, parent_rate); in __pll_params_with_frac() 152 return DIV_ROUND_CLOSEST_ULL(val, parent_rate); in meson_clk_get_pll_range_m()
|
| D | clk-mpll.c | 55 *sdm = DIV_ROUND_CLOSEST_ULL(frac, requested_rate); in params_from_rate()
|
| D | sclk-div.c | 44 int div = DIV_ROUND_CLOSEST_ULL((u64)prate, rate); in sclk_div_getdiv()
|
| /Linux-v5.4/drivers/clk/sprd/ |
| D | pll.c | 134 rate = DIV_ROUND_CLOSEST_ULL(refin * kint * k1, in _sprd_pll_recalc_rate() 203 kint = DIV_ROUND_CLOSEST_ULL(tmp, refin * 100); in _sprd_pll_set_rate()
|
| /Linux-v5.4/include/linux/ |
| D | pwm.h | 205 return DIV_ROUND_CLOSEST_ULL((u64)state->duty_cycle * scale, in pwm_get_relative_duty_cycle() 234 state->duty_cycle = DIV_ROUND_CLOSEST_ULL((u64)duty_cycle * in pwm_set_relative_duty_cycle()
|
| /Linux-v5.4/drivers/clk/ |
| D | clk-axi-clkgen.c | 311 tmp = DIV_ROUND_CLOSEST_ULL(tmp, dout * d); in axi_clkgen_round_rate() 350 tmp = DIV_ROUND_CLOSEST_ULL(tmp, dout * d); in axi_clkgen_recalc_rate()
|
| /Linux-v5.4/drivers/media/dvb-frontends/ |
| D | cxd2820r_c.c | 67 utmp = 0x4000 - DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x4000, CXD2820R_CLK); in cxd2820r_set_frontend_c()
|