| /Linux-v4.19/drivers/pwm/ |
| D | pwm-tegra.c | 94 c = DIV_ROUND_CLOSEST_ULL(c, period_ns); in tegra_pwm_config() 105 hz = DIV_ROUND_CLOSEST_ULL(100ULL * NSEC_PER_SEC, period_ns); in tegra_pwm_config() 106 rate = DIV_ROUND_CLOSEST_ULL(100ULL * rate, hz); in tegra_pwm_config()
|
| D | pwm-sun4i.c | 142 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state() 145 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state() 197 state->period = DIV_ROUND_CLOSEST_ULL(div, clk_rate); in sun4i_pwm_calculate() 200 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(div, clk_rate); in sun4i_pwm_calculate()
|
| D | pwm-rockchip.c | 82 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in rockchip_pwm_get_state() 86 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in rockchip_pwm_get_state() 120 period = DIV_ROUND_CLOSEST_ULL(div, in rockchip_pwm_config() 124 duty = DIV_ROUND_CLOSEST_ULL(div, pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
|
| D | pwm-mediatek.c | 158 cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, resolution); in mtk_pwm_config() 162 cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, in mtk_pwm_config() 181 cnt_duty = DIV_ROUND_CLOSEST_ULL((u64)duty_ns * 1000, resolution); in mtk_pwm_config()
|
| D | pwm-omap-dmtimer.c | 53 return DIV_ROUND_CLOSEST_ULL((u64)clk_rate * ns, NSEC_PER_SEC); in pwm_omap_dmtimer_get_clock_cycles() 172 DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * duty_cycles, in pwm_omap_dmtimer_config() 174 DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * period_cycles, in pwm_omap_dmtimer_config()
|
| D | pwm-stm32-lp.c | 175 state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate); in stm32_pwm_lp_get_state() 180 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in stm32_pwm_lp_get_state()
|
| D | pwm-zx.c | 93 state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate); in zx_pwm_get_state() 97 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in zx_pwm_get_state()
|
| D | pwm-meson.c | 188 cnt = DIV_ROUND_CLOSEST_ULL((u64)period * 1000, in meson_pwm_calc() 214 duty_cnt = DIV_ROUND_CLOSEST_ULL((u64)duty * 1000, in meson_pwm_calc()
|
| D | pwm-lpss.c | 111 base_unit = DIV_ROUND_CLOSEST_ULL(freq, c); in pwm_lpss_prepare()
|
| /Linux-v4.19/kernel/locking/ |
| D | qspinlock_stat.h | 143 frac = DIV_ROUND_CLOSEST_ULL(frac, kicks); in qstat_read() 157 stat = DIV_ROUND_CLOSEST_ULL(stat, kicks); in qstat_read()
|
| /Linux-v4.19/drivers/clk/bcm/ |
| D | clk-kona.c | 77 return DIV_ROUND_CLOSEST_ULL(combined, BILLION); in scaled_div_build() 721 scaled_parent_rate = DIV_ROUND_CLOSEST_ULL(scaled_rate, in clk_recalc_rate() 733 result = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate, scaled_div); in clk_recalc_rate() 780 scaled_parent_rate = DIV_ROUND_CLOSEST_ULL(scaled_rate, in round_rate() 792 best_scaled_div = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate, in round_rate() 805 result = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate, best_scaled_div); in round_rate()
|
| /Linux-v4.19/drivers/video/backlight/ |
| D | pwm_bl.c | 184 retval = DIV_ROUND_CLOSEST_ULL(lightness * 10, 9023); in cie1931() 187 retval = DIV_ROUND_CLOSEST_ULL(retval, (scale * scale)); in cie1931() 235 retval = DIV_ROUND_CLOSEST_ULL(retval, PWM_LUMINANCE_SCALE); in pwm_backlight_brightness_default()
|
| /Linux-v4.19/drivers/regulator/ |
| D | pwm-regulator.c | 181 voltage = DIV_ROUND_CLOSEST_ULL((u64)voltage * diff_uV, diff_duty); in pwm_regulator_get_voltage() 214 dutycycle = DIV_ROUND_CLOSEST_ULL((u64)(req_min_uV - min_uV) * in pwm_regulator_set_voltage()
|
| D | vctrl-regulator.c | 60 DIV_ROUND_CLOSEST_ULL((s64)(out_uV - out->min_uV) * in vctrl_calc_ctrl_voltage() 82 DIV_ROUND_CLOSEST_ULL((s64)(ctrl_uV - ctrl->min_uV) * in vctrl_calc_output_voltage()
|
| /Linux-v4.19/drivers/clk/sprd/ |
| D | pll.c | 134 rate = DIV_ROUND_CLOSEST_ULL(refin * kint * k1, in _sprd_pll_recalc_rate() 202 kint = DIV_ROUND_CLOSEST_ULL(tmp, refin * 100); in _sprd_pll_set_rate()
|
| /Linux-v4.19/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-v4.19/drivers/clk/meson/ |
| D | clk-mpll.c | 51 *sdm = DIV_ROUND_CLOSEST_ULL(frac, requested_rate); in params_from_rate()
|
| D | sclk-div.c | 40 int div = DIV_ROUND_CLOSEST_ULL((u64)prate, rate); in sclk_div_getdiv()
|
| D | clk-pll.c | 99 val = DIV_ROUND_CLOSEST_ULL(val * frac_max, parent_rate); in __pll_params_with_frac()
|
| /Linux-v4.19/drivers/clk/ |
| D | clk-axi-clkgen.c | 313 tmp = DIV_ROUND_CLOSEST_ULL(tmp, dout * d); in axi_clkgen_round_rate() 352 tmp = DIV_ROUND_CLOSEST_ULL(tmp, dout * d); in axi_clkgen_recalc_rate()
|
| /Linux-v4.19/drivers/clk/at91/ |
| D | clk-audio-pll.c | 169 fr = DIV_ROUND_CLOSEST_ULL(fr, AUDIO_PLL_DIV_FRAC); in clk_audio_pll_fout() 237 tmp = DIV_ROUND_CLOSEST_ULL(tmp, parent_rate); in clk_audio_pll_frac_compute_frac()
|
| /Linux-v4.19/drivers/clk/renesas/ |
| D | rcar-gen3-cpg.c | 100 return DIV_ROUND_CLOSEST_ULL((u64)parent_rate * mult, 32 * 2); in cpg_z_clk_recalc_rate() 125 mult = DIV_ROUND_CLOSEST_ULL(rate * 32ULL * 2, parent_rate); in cpg_z_clk_set_rate()
|
| /Linux-v4.19/drivers/media/dvb-frontends/ |
| D | cxd2820r_c.c | 80 utmp = 0x4000 - DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x4000, CXD2820R_CLK); in cxd2820r_set_frontend_c()
|
| /Linux-v4.19/drivers/cpuidle/governors/ |
| D | menu.c | 318 data->predicted_us = DIV_ROUND_CLOSEST_ULL((uint64_t)data->next_timer_us * in menu_select()
|
| /Linux-v4.19/drivers/nvmem/ |
| D | imx-ocotp.c | 211 strobe_prog = DIV_ROUND_CLOSEST_ULL((u64)clk_rate * DEF_STROBE_PROG, in imx_ocotp_set_imx7_timing()
|