Home
last modified time | relevance | path

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

123

/Linux-v4.19/drivers/pwm/
Dpwm-tegra.c94 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()
Dpwm-sun4i.c142 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()
Dpwm-rockchip.c82 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()
Dpwm-mediatek.c158 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()
Dpwm-omap-dmtimer.c53 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()
Dpwm-stm32-lp.c175 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()
Dpwm-zx.c93 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()
Dpwm-meson.c188 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()
Dpwm-lpss.c111 base_unit = DIV_ROUND_CLOSEST_ULL(freq, c); in pwm_lpss_prepare()
/Linux-v4.19/kernel/locking/
Dqspinlock_stat.h143 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/
Dclk-kona.c77 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/
Dpwm_bl.c184 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/
Dpwm-regulator.c181 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()
Dvctrl-regulator.c60 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/
Dpll.c134 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/
Dpwm.h205 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/
Dclk-mpll.c51 *sdm = DIV_ROUND_CLOSEST_ULL(frac, requested_rate); in params_from_rate()
Dsclk-div.c40 int div = DIV_ROUND_CLOSEST_ULL((u64)prate, rate); in sclk_div_getdiv()
Dclk-pll.c99 val = DIV_ROUND_CLOSEST_ULL(val * frac_max, parent_rate); in __pll_params_with_frac()
/Linux-v4.19/drivers/clk/
Dclk-axi-clkgen.c313 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/
Dclk-audio-pll.c169 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/
Drcar-gen3-cpg.c100 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/
Dcxd2820r_c.c80 utmp = 0x4000 - DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x4000, CXD2820R_CLK); in cxd2820r_set_frontend_c()
/Linux-v4.19/drivers/cpuidle/governors/
Dmenu.c318 data->predicted_us = DIV_ROUND_CLOSEST_ULL((uint64_t)data->next_timer_us * in menu_select()
/Linux-v4.19/drivers/nvmem/
Dimx-ocotp.c211 strobe_prog = DIV_ROUND_CLOSEST_ULL((u64)clk_rate * DEF_STROBE_PROG, in imx_ocotp_set_imx7_timing()

123