Symbol: DIV_ROUND_CLOSEST
arch/alpha/kernel/sys_ruffian.c
67
#define RUFFIAN_LATCH DIV_ROUND_CLOSEST(PIT_TICK_RATE, HZ)
arch/arm/kernel/smp_twd.c
57
writel_relaxed(DIV_ROUND_CLOSEST(twd_timer_rate, HZ),
arch/arm/mach-footbridge/dc21285-timer.c
110
unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16);
arch/arm/mach-footbridge/dc21285-timer.c
129
unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16);
arch/arm/mach-rpc/time.c
25
#define RPC_LATCH DIV_ROUND_CLOSEST(RPC_CLOCK_FREQ, HZ)
arch/m68k/amiga/config.c
491
jiffy_ticks = DIV_ROUND_CLOSEST(amiga_eclock, HZ);
arch/powerpc/platforms/85xx/p1022_ds.c
405
pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq);
arch/powerpc/platforms/85xx/p1022_rdk.c
75
pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq);
arch/powerpc/platforms/85xx/t1042rdb_diu.c
109
pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq);
arch/x86/kernel/tsc_msr.c
199
freq = DIV_ROUND_CLOSEST(tscref, md->divider);
arch/x86/kernel/tsc_msr.c
204
res = DIV_ROUND_CLOSEST(tscref * ratio, md->divider);
block/bfq-iosched.c
654
limit = DIV_ROUND_CLOSEST(limit * entity->weight, wsum);
drivers/accel/ivpu/ivpu_pm.c
509
u8 val = DIV_ROUND_CLOSEST(vdev->pm->dct_active_percent * 128, 100);
drivers/bluetooth/hci_nokia.c
264
u16 baud = DIV_ROUND_CLOSEST(btdev->sysclk_speed * 10, SETUP_BAUD_RATE);
drivers/clk/actions/owl-pll.c
22
mul = DIV_ROUND_CLOSEST(rate, pll_hw->bfreq);
drivers/clk/at91/clk-generated.c
105
return DIV_ROUND_CLOSEST(parent_rate, gck->gckdiv + 1);
drivers/clk/at91/clk-generated.c
160
min_rate = DIV_ROUND_CLOSEST(parent_rate, GENERATED_MAX_DIV + 1);
drivers/clk/at91/clk-generated.c
165
div = DIV_ROUND_CLOSEST(parent_rate, req->rate);
drivers/clk/at91/clk-generated.c
256
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/at91/clk-master.c
129
master->pms.rate = DIV_ROUND_CLOSEST(master->pms.parent_rate, div);
drivers/clk/at91/clk-master.c
149
if (div != DIV_ROUND_CLOSEST(master->pms.parent_rate, master->pms.rate))
drivers/clk/at91/clk-master.c
233
DIV_ROUND_CLOSEST(master->pms.parent_rate,
drivers/clk/at91/clk-master.c
768
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/at91/clk-pll.c
183
tmpmul = DIV_ROUND_CLOSEST(rate, parent_rate / tmpdiv);
drivers/clk/at91/clk-sam9x60-pll.c
511
div->div = DIV_ROUND_CLOSEST(parent_rate, rate) - 1;
drivers/clk/at91/clk-sam9x60-pll.c
525
div->div = DIV_ROUND_CLOSEST(parent_rate, rate) - 1;
drivers/clk/at91/clk-usb.c
142
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/at91/clk-usb.c
341
tmprate = DIV_ROUND_CLOSEST(tmp_parent_rate, usb->divisors[i]);
drivers/clk/at91/clk-usb.c
372
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/at91/clk-usb.c
54
return DIV_ROUND_CLOSEST(parent_rate, (usbdiv + 1));
drivers/clk/at91/clk-usb.c
83
tmp_rate = DIV_ROUND_CLOSEST(tmp_parent_rate, div);
drivers/clk/bcm/clk-iproc-asiu.c
112
div = DIV_ROUND_CLOSEST(req->best_parent_rate, req->rate);
drivers/clk/bcm/clk-iproc-asiu.c
143
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/bcm/clk-iproc-pll.c
646
bestdiv = DIV_ROUND_CLOSEST(req->best_parent_rate, req->rate);
drivers/clk/bcm/clk-iproc-pll.c
670
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/clk-axi-clkgen.c
168
dout = DIV_ROUND_CLOSEST(fvco, fout);
drivers/clk/clk-cdce925.c
375
divider = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/clk-cdce925.c
474
divider = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/clk-clps711x.c
73
f_spi = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 96);
drivers/clk/clk-clps711x.c
75
f_pwm = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 128);
drivers/clk/clk-clps711x.c
82
f_spi = DIV_ROUND_CLOSEST(f_cpu, 576);
drivers/clk/clk-clps711x.c
83
f_pwm = DIV_ROUND_CLOSEST(f_cpu, 768);
drivers/clk/clk-clps711x.c
88
f_tim = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 26);
drivers/clk/clk-clps711x.c
90
f_tim = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 24);
drivers/clk/clk-clps711x.c
92
f_tim = DIV_ROUND_CLOSEST(f_cpu, 144);
drivers/clk/clk-ep93xx.c
260
div = DIV_ROUND_CLOSEST(mclk_rate, rate * pdiv);
drivers/clk/clk-ep93xx.c
264
actual_rate = DIV_ROUND_CLOSEST(mclk_rate, pdiv * div);
drivers/clk/clk-ep93xx.c
297
return DIV_ROUND_CLOSEST(parent_rate * 2, (pdiv + 3) * div);
drivers/clk/clk-ep93xx.c
313
div = DIV_ROUND_CLOSEST(mclk_rate, rate * pdiv);
drivers/clk/clk-ep93xx.c
317
actual_rate = DIV_ROUND_CLOSEST(mclk_rate, pdiv * div);
drivers/clk/clk-ep93xx.c
389
return DIV_ROUND_CLOSEST(parent_rate, clk->div[index]);
drivers/clk/clk-ep93xx.c
403
now = DIV_ROUND_CLOSEST(req->best_parent_rate, clk->div[i]);
drivers/clk/clk-ep93xx.c
424
if (rate == DIV_ROUND_CLOSEST(parent_rate, clk->div[i]))
drivers/clk/clk-lmk04832.c
1074
rate = DIV_ROUND_CLOSEST(prate, dclk_div);
drivers/clk/clk-lmk04832.c
1087
dclk_div = DIV_ROUND_CLOSEST(req->best_parent_rate, req->rate);
drivers/clk/clk-lmk04832.c
1088
dclk_rate = DIV_ROUND_CLOSEST(req->best_parent_rate, dclk_div);
drivers/clk/clk-lmk04832.c
1111
dclk_div = DIV_ROUND_CLOSEST(prate, rate);
drivers/clk/clk-lmk04832.c
472
num = DIV_ROUND_CLOSEST(rate, div);
drivers/clk/clk-lmk04832.c
473
pll2_r = DIV_ROUND_CLOSEST(prate, div);
drivers/clk/clk-lmk04832.c
491
return DIV_ROUND_CLOSEST(prate * 2 * pll2_p * pll2_n, pll2_r);
drivers/clk/clk-lmk04832.c
893
return DIV_ROUND_CLOSEST(prate, sysref_div);
drivers/clk/clk-lmk04832.c
903
sysref_div = DIV_ROUND_CLOSEST(req->best_parent_rate, req->rate);
drivers/clk/clk-lmk04832.c
904
sclk_rate = DIV_ROUND_CLOSEST(req->best_parent_rate, sysref_div);
drivers/clk/clk-lmk04832.c
926
sysref_div = DIV_ROUND_CLOSEST(prate, rate);
drivers/clk/clk-multiplier.c
36
return DIV_ROUND_CLOSEST(rate, parent_rate);
drivers/clk/clk-plldig.c
131
div = DIV_ROUND_CLOSEST(vco_freq, target_rate);
drivers/clk/clk-rp1.c
1061
audio_rate = DIV_ROUND_CLOSEST(core_rate, div_prim);
drivers/clk/clk-rp1.c
1062
i2s_rate = DIV_ROUND_CLOSEST(audio_rate, div_clk);
drivers/clk/clk-rp1.c
553
abs_diff(DIV_ROUND_CLOSEST(parent_rate, best_div1 * best_div2), rate);
drivers/clk/clk-rp1.c
558
calc_rate = DIV_ROUND_CLOSEST(parent_rate, div1 * div2);
drivers/clk/clk-rp1.c
619
return DIV_ROUND_CLOSEST(parent_rate, prim_div1 * prim_div2);
drivers/clk/clk-rp1.c
633
req->rate = DIV_ROUND_CLOSEST(req->best_parent_rate, div1 * div2);
drivers/clk/clk-si5351.c
691
a = DIV_ROUND_CLOSEST(req->best_parent_rate, rate);
drivers/clk/clk-sp7021.c
402
fbdiv = DIV_ROUND_CLOSEST(rate, clk->brate);
drivers/clk/clk-stm32f4.c
707
modeper = DIV_ROUND_CLOSEST(parent_rate, 4 * ssc->mod_freq);
drivers/clk/clk-stm32f4.c
708
incstep = DIV_ROUND_CLOSEST(((1 << 15) - 1) * ssc->mod_depth * ndiv,
drivers/clk/clk-versaclock5.c
842
mapped_value = DIV_ROUND_CLOSEST(femtofarads - 9000, 430);
drivers/clk/imx/clk-pll14xx.c
192
mdiv = DIV_ROUND_CLOSEST(rate * (pdiv << sdiv), prate);
drivers/clk/meson/clk-dualdiv.c
41
return DIV_ROUND_CLOSEST(parent_rate, p->n1);
drivers/clk/meson/clk-dualdiv.c
43
return DIV_ROUND_CLOSEST(parent_rate * (p->m1 + p->m2),
drivers/clk/meson/clk-phase.c
28
unsigned int val = DIV_ROUND_CLOSEST(degrees, phase_step(width));
drivers/clk/meson/sclk-div.c
115
unsigned int hi = DIV_ROUND_CLOSEST(sclk->cached_div *
drivers/clk/microchip/clk-core.c
181
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/mvebu/dove-divider.c
103
unsigned long rate = DIV_ROUND_CLOSEST(parent, divider);
drivers/clk/mvebu/dove-divider.c
122
req->rate = DIV_ROUND_CLOSEST(parent_rate, divider);
drivers/clk/mvebu/dove-divider.c
72
divider = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/qcom/clk-alpha-pll.c
1529
cal_freq = DIV_ROUND_CLOSEST((pll->vco_table[0].min_freq +
drivers/clk/qcom/clk-rcg2.c
745
d = DIV_ROUND_CLOSEST(d, 2);
drivers/clk/qcom/clk-rcg2.c
778
d = DIV_ROUND_CLOSEST(n * duty->num * 2, duty->den);
drivers/clk/renesas/clk-div6.c
100
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/rockchip/clk-mmc-phase.c
136
delay = DIV_ROUND_CLOSEST(delay,
drivers/clk/rockchip/clk-mmc-phase.c
76
degrees += DIV_ROUND_CLOSEST(delay_num * factor, 1000000);
drivers/clk/starfive/clk-starfive-jh71x0.c
110
unsigned long div = clamp(DIV_ROUND_CLOSEST(parent_rate, rate),
drivers/clk/starfive/clk-starfive-jh71x0.c
133
unsigned long div100 = clamp(DIV_ROUND_CLOSEST(parent100, rate),
drivers/clk/starfive/clk-starfive-jh71x0.c
152
unsigned long div100 = clamp(DIV_ROUND_CLOSEST(100 * parent_rate, rate),
drivers/clk/sunxi-ng/ccu_phase.c
104
step = DIV_ROUND_CLOSEST(360, parent_div);
drivers/clk/sunxi-ng/ccu_phase.c
105
delay = DIV_ROUND_CLOSEST(degrees, step);
drivers/clk/sunxi-ng/ccu_phase.c
52
step = DIV_ROUND_CLOSEST(360, parent_div);
drivers/clk/sunxi/clk-mod0.c
208
step = DIV_ROUND_CLOSEST(360, mmc_div);
drivers/clk/sunxi/clk-mod0.c
260
step = DIV_ROUND_CLOSEST(360, mmc_div);
drivers/clk/sunxi/clk-mod0.c
261
delay = DIV_ROUND_CLOSEST(degrees, step);
drivers/clk/tegra/clk-dfll.c
843
scale = DIV_ROUND_CLOSEST(rate / 1000 * DFLL_FREQ_REQ_SCALE_MAX,
drivers/clk/tegra/cvb.c
20
mv = DIV_ROUND_CLOSEST(cvb->c2 * speedo, s_scale);
drivers/clk/tegra/cvb.c
21
mv = DIV_ROUND_CLOSEST((mv + cvb->c1) * speedo, s_scale) + cvb->c0;
drivers/clk/versatile/clk-icst.c
251
req->rate = DIV_ROUND_CLOSEST(req->rate, 1000000) * 1000000;
drivers/clk/versatile/clk-icst.c
264
req->rate = DIV_ROUND_CLOSEST(req->rate, 500000) * 500000;
drivers/clk/versatile/clk-icst.c
278
req->rate = DIV_ROUND_CLOSEST(req->rate, 250000) * 250000;
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
246
value = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
294
value = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
334
div = DIV_ROUND_CLOSEST(req->best_parent_rate, req->rate);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
360
vco_freq = DIV_ROUND_CLOSEST((parent_rate * m), d);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
609
parent_rate = DIV_ROUND_CLOSEST((parent_rate * mult), WZRD_FRAC_GRADIENT);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
695
req->rate = DIV_ROUND_CLOSEST(int_freq * f, WZRD_FRAC_POINTS);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
751
pre = DIV_ROUND_CLOSEST((parent_rate * 1000), rate);
drivers/clk/zynq/pll.c
56
fbdiv = DIV_ROUND_CLOSEST(req->rate, req->best_parent_rate);
drivers/clk/zynqmp/divider.c
68
return DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/clk/zynqmp/pll.c
116
fbdiv = DIV_ROUND_CLOSEST(req->rate, req->best_parent_rate);
drivers/clk/zynqmp/pll.c
208
fbdiv = DIV_ROUND_CLOSEST(rate, parent_rate);
drivers/clocksource/arm_global_timer.c
134
gt_compare_set(DIV_ROUND_CLOSEST(gt_target_rate, HZ), 1);
drivers/clocksource/arm_global_timer.c
291
psv = DIV_ROUND_CLOSEST(ndata->new_rate, gt_target_rate);
drivers/clocksource/asm9260_timer.c
236
priv.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ);
drivers/clocksource/clps711x-timer.c
64
writew(DIV_ROUND_CLOSEST(rate, HZ), base);
drivers/clocksource/jcore-pit.c
113
freq = DIV_ROUND_CLOSEST(NSEC_PER_SEC, buspd);
drivers/clocksource/jcore-pit.c
114
pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd);
drivers/clocksource/mps2-timer.c
146
ce->clock_count_per_tick = DIV_ROUND_CLOSEST(rate, HZ);
drivers/clocksource/nomadik-mtu.c
214
nmdk_cycle = DIV_ROUND_CLOSEST(rate, HZ);
drivers/clocksource/timer-atmel-pit.c
210
data->cycle = DIV_ROUND_CLOSEST(pit_rate, HZ);
drivers/clocksource/timer-cadence-ttc.c
221
DIV_ROUND_CLOSEST(ttce->ttc.freq, PRESCALE * HZ));
drivers/clocksource/timer-cadence-ttc.c
252
factor = DIV_ROUND_CLOSEST(ndata->new_rate,
drivers/clocksource/timer-cadence-ttc.c
257
factor = DIV_ROUND_CLOSEST(ndata->old_rate,
drivers/clocksource/timer-fsl-ftm.c
285
priv->periodic_cyc = DIV_ROUND_CLOSEST(freq,
drivers/clocksource/timer-fttmr010.c
222
u32 period = DIV_ROUND_CLOSEST(fttmr010->tick_rate, HZ);
drivers/clocksource/timer-ixp4xx.c
180
tmr->latch = DIV_ROUND_CLOSEST(timer_freq,
drivers/clocksource/timer-lpc32xx.c
260
lpc32xx_clk_event_ddata.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ);
drivers/clocksource/timer-microchip-pit64b.c
404
mchp_pit64b_ce_cycles = DIV_ROUND_CLOSEST(clk_rate, HZ);
drivers/clocksource/timer-sp804.c
242
common_clkevt->reload = DIV_ROUND_CLOSEST(rate, HZ);
drivers/clocksource/timer-stm32-lp.c
168
if (DIV_ROUND_CLOSEST(*rate, 1 << i) < STM32_TARGET_CLKRATE)
drivers/clocksource/timer-stm32-lp.c
175
*rate = DIV_ROUND_CLOSEST(*rate, (1 << i));
drivers/clocksource/timer-stm32.c
212
prescaler = DIV_ROUND_CLOSEST(timer_of_rate(to),
drivers/clocksource/timer-stm32.c
227
to->of_clk.rate = DIV_ROUND_CLOSEST(to->of_clk.rate, prescaler);
drivers/clocksource/timer-tegra186.c
286
timeleft = DIV_ROUND_CLOSEST(timeleft, USEC_PER_SEC);
drivers/clocksource/timer-ti-dm-systimer.c
569
clkevt->period = 0xffffffff - DIV_ROUND_CLOSEST(t->rate, HZ);
drivers/comedi/drivers/addi_apci_3120.c
287
divisor = DIV_ROUND_CLOSEST(ns, timer_base);
drivers/comedi/drivers/addi_apci_3xxx.c
489
timer = DIV_ROUND_CLOSEST(*ns, base);
drivers/comedi/drivers/adv_pci1760.c
182
divisor = DIV_ROUND_CLOSEST(ns, PCI1760_PWM_TIMEBASE);
drivers/comedi/drivers/amplc_pci230.c
642
div += DIV_ROUND_CLOSEST(rem, timebase);
drivers/comedi/drivers/cb_pcidas64.c
1369
num_increments = DIV_ROUND_CLOSEST(num_entries, increment_size);
drivers/comedi/drivers/cb_pcidas64.c
1994
divisor = DIV_ROUND_CLOSEST(ns, TIMER_BASE);
drivers/comedi/drivers/comedi_8254.c
489
divisor = DIV_ROUND_CLOSEST(*nanosec, i8254->osc_base);
drivers/comedi/drivers/comedi_test.c
326
arg = NSEC_PER_USEC * DIV_ROUND_CLOSEST(arg, NSEC_PER_USEC);
drivers/comedi/drivers/comedi_test.c
341
arg = NSEC_PER_USEC * DIV_ROUND_CLOSEST(arg, NSEC_PER_USEC);
drivers/comedi/drivers/comedi_test.c
596
arg = NSEC_PER_USEC * DIV_ROUND_CLOSEST(arg, NSEC_PER_USEC);
drivers/comedi/drivers/das1800.c
583
arg = DIV_ROUND_CLOSEST(arg, 1000);
drivers/comedi/drivers/dt282x.c
375
divider = DIV_ROUND_CLOSEST(*ns, base);
drivers/comedi/drivers/dt3000.c
354
divider = DIV_ROUND_CLOSEST(*nanosec, base);
drivers/comedi/drivers/ni_labpc_common.c
369
pacer->next_div = DIV_ROUND_CLOSEST(convert_period,
drivers/comedi/drivers/ni_labpc_common.c
371
pacer->next_div2 = DIV_ROUND_CLOSEST(scan_period,
drivers/comedi/drivers/ni_mio_common.c
1950
divider = DIV_ROUND_CLOSEST(nanosec, devpriv->clock_ns);
drivers/comedi/drivers/ni_mio_common.c
4205
up_count = DIV_ROUND_CLOSEST(data[2],
drivers/comedi/drivers/ni_mio_common.c
4220
down_count = DIV_ROUND_CLOSEST(data[4],
drivers/comedi/drivers/ni_mio_common.c
4265
up_count = DIV_ROUND_CLOSEST(data[2],
drivers/comedi/drivers/ni_mio_common.c
4280
down_count = DIV_ROUND_CLOSEST(data[4],
drivers/comedi/drivers/ni_mio_common.c
4934
*actual_period_ns = DIV_ROUND_CLOSEST(best_period_picosec * 4,
drivers/comedi/drivers/ni_pcidio.c
513
divider = DIV_ROUND_CLOSEST(*nanosec, base);
drivers/comedi/drivers/rtd520.c
381
divider = DIV_ROUND_CLOSEST(*nanosec, base);
drivers/comedi/drivers/s626.c
1635
divider = DIV_ROUND_CLOSEST(*nanosec, base);
drivers/cpufreq/intel_pstate.c
548
return DIV_ROUND_CLOSEST(freq, cpu->pstate.scaling);
drivers/devfreq/imx8m-ddrc.c
353
freq, DIV_ROUND_CLOSEST(freq, 250000));
drivers/devfreq/imx8m-ddrc.c
89
rate = DIV_ROUND_CLOSEST(rate, 250000);
drivers/devfreq/sun8i-a33-mbus.c
254
DIV_ROUND_CLOSEST(stat->busy_time * 100, stat->total_time),
drivers/gpio/gpio-ftgpio010.c
184
deb_div = DIV_ROUND_CLOSEST(pclk_freq, arg);
drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c
102
*ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div);
drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c
97
*ref_div = clamp(DIV_ROUND_CLOSEST(den, post_div), 1u, ref_div_max);
drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c
98
*fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5074
lum = DIV_ROUND_CLOSEST(caps->luminance_data[0].luminance * brightness,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5111
lum = lower_lum + DIV_ROUND_CLOSEST((upper_lum - lower_lum) *
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5116
DIV_ROUND_CLOSEST(lum * brightness, 101));
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5313
props.brightness = DIV_ROUND_CLOSEST((max - min) * caps->ac_level, 100);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5315
props.brightness = DIV_ROUND_CLOSEST((max - min) * caps->dc_level, 100);
drivers/gpu/drm/armada/armada_crtc.c
872
div = DIV_ROUND_CLOSEST(real_clk_hz, desired_hz);
drivers/gpu/drm/armada/armada_crtc.c
877
real_hz = DIV_ROUND_CLOSEST(real_clk_hz, div);
drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c
262
m = DIV_ROUND_CLOSEST(fout * n * fvco_div, fin);
drivers/gpu/drm/display/drm_dp_helper.c
4394
fxp = DIV_ROUND_CLOSEST(1000 * DP_EDP_BACKLIGHT_FREQ_BASE_KHZ, driver_pwm_freq_hz);
drivers/gpu/drm/display/drm_dp_helper.c
4404
fxp_min = DIV_ROUND_CLOSEST(fxp * 3, 4);
drivers/gpu/drm/display/drm_dp_helper.c
4405
fxp_max = DIV_ROUND_CLOSEST(fxp * 5, 4);
drivers/gpu/drm/display/drm_dp_helper.c
4414
f = clamp(DIV_ROUND_CLOSEST(fxp, 1 << pn), 1, 255);
drivers/gpu/drm/drm_edid.c
3321
return DIV_ROUND_CLOSEST(mode->clock, mode->htotal);
drivers/gpu/drm/drm_edid.c
4281
clock = DIV_ROUND_CLOSEST(clock * 1001, 1000);
drivers/gpu/drm/drm_edid.c
4283
clock = DIV_ROUND_CLOSEST(clock * 1000, 1001);
drivers/gpu/drm/drm_edid.c
5437
q = DIV_ROUND_CLOSEST(min_cll, 255);
drivers/gpu/drm/drm_edid.c
5438
min = max * DIV_ROUND_CLOSEST((q * q), 100);
drivers/gpu/drm/exynos/exynos_drm_fimd.c
448
clkdiv = DIV_ROUND_CLOSEST(lcd_rate, ideal_clk);
drivers/gpu/drm/gma500/oaktrail_hdmi.c
201
nf = DIV_ROUND_CLOSEST((target * 10 * np * nr), refclk);
drivers/gpu/drm/i915/display/g4x_hdmi.c
191
dotclock = DIV_ROUND_CLOSEST(pipe_config->port_clock * 2, 3);
drivers/gpu/drm/i915/display/i9xx_wm.c
103
DIV_ROUND_CLOSEST(dram_info->fsb_freq, 1000) == latency->fsb_freq &&
drivers/gpu/drm/i915/display/i9xx_wm.c
104
DIV_ROUND_CLOSEST(dram_info->mem_freq, 1000) == latency->mem_freq)
drivers/gpu/drm/i915/display/icl_dsi.c
356
return DIV_ROUND_CLOSEST(intel_dsi->pclk * bpp, intel_dsi->lane_count);
drivers/gpu/drm/i915/display/intel_backlight.c
1033
return DIV_ROUND_CLOSEST(KHz(DISPLAY_RUNTIME_INFO(display)->rawclk_freq),
drivers/gpu/drm/i915/display/intel_backlight.c
1042
return DIV_ROUND_CLOSEST(KHz(19200), pwm_freq_hz);
drivers/gpu/drm/i915/display/intel_backlight.c
1060
return DIV_ROUND_CLOSEST(MHz(24), pwm_freq_hz * mul);
drivers/gpu/drm/i915/display/intel_backlight.c
1084
return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * mul);
drivers/gpu/drm/i915/display/intel_backlight.c
1095
return DIV_ROUND_CLOSEST(KHz(DISPLAY_RUNTIME_INFO(display)->rawclk_freq),
drivers/gpu/drm/i915/display/intel_backlight.c
1117
return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * 32);
drivers/gpu/drm/i915/display/intel_backlight.c
1135
return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * 128);
drivers/gpu/drm/i915/display/intel_backlight.c
1159
return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * mul);
drivers/gpu/drm/i915/display/intel_bw.c
1111
new_bw_state->qgv_point_peakbw = DIV_ROUND_CLOSEST(qgv_peak_bw, 100);
drivers/gpu/drm/i915/display/intel_bw.c
221
sp->dclk = DIV_ROUND_CLOSEST(16667 * dclk, 1000);
drivers/gpu/drm/i915/display/intel_bw.c
366
return DIV_ROUND_CLOSEST(64 * clk * 100, 6);
drivers/gpu/drm/i915/display/intel_bw.c
608
bi->peakbw[j] = DIV_ROUND_CLOSEST(sp->dclk *
drivers/gpu/drm/i915/display/intel_cdclk.c
1070
return DIV_ROUND_CLOSEST(cdclk - 1000, 500);
drivers/gpu/drm/i915/display/intel_cdclk.c
1581
return DIV_ROUND_CLOSEST(vco * cdclk_squash_divider(waveform),
drivers/gpu/drm/i915/display/intel_cdclk.c
1814
cdclk_config->cdclk = DIV_ROUND_CLOSEST(hweight16(waveform) *
drivers/gpu/drm/i915/display/intel_cdclk.c
1817
cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_config->vco, div);
drivers/gpu/drm/i915/display/intel_cdclk.c
1845
int ratio = DIV_ROUND_CLOSEST(vco, display->cdclk.hw.ref);
drivers/gpu/drm/i915/display/intel_cdclk.c
1888
int ratio = DIV_ROUND_CLOSEST(vco, display->cdclk.hw.ref);
drivers/gpu/drm/i915/display/intel_cdclk.c
1906
int ratio = DIV_ROUND_CLOSEST(vco, display->cdclk.hw.ref);
drivers/gpu/drm/i915/display/intel_cdclk.c
2134
mid_cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_squash_divider(mid_waveform) *
drivers/gpu/drm/i915/display/intel_cdclk.c
2476
a_div = DIV_ROUND_CLOSEST(a->vco, a->cdclk);
drivers/gpu/drm/i915/display/intel_cdclk.c
2477
b_div = DIV_ROUND_CLOSEST(b->vco, b->cdclk);
drivers/gpu/drm/i915/display/intel_cdclk.c
3819
rawclk |= CNP_RAWCLK_DEN(DIV_ROUND_CLOSEST(numerator * 1000,
drivers/gpu/drm/i915/display/intel_cdclk.c
3837
return DIV_ROUND_CLOSEST(intel_fsb_freq(display), 4);
drivers/gpu/drm/i915/display/intel_cdclk.c
430
cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_config->vco,
drivers/gpu/drm/i915/display/intel_cdclk.c
509
cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_config->vco,
drivers/gpu/drm/i915/display/intel_cdclk.c
604
return DIV_ROUND_CLOSEST(vlv_clock_get_hpll_vco(display->drm) << 1, cdclk) - 1;
drivers/gpu/drm/i915/display/intel_cdclk.c
713
divider = DIV_ROUND_CLOSEST(vlv_clock_get_hpll_vco(display->drm) << 1,
drivers/gpu/drm/i915/display/intel_cdclk.c
925
DIV_ROUND_CLOSEST(cdclk, 1000) - 1);
drivers/gpu/drm/i915/display/intel_color.c
827
return DIV_ROUND_CLOSEST(val * ((1 << 16) - 1),
drivers/gpu/drm/i915/display/intel_cx0_phy.c
2189
DIV_ROUND_CLOSEST(refclk * frac_rem, frac_den),
drivers/gpu/drm/i915/display/intel_cx0_phy.c
2748
frac = frac_quot + DIV_ROUND_CLOSEST(frac_rem, frac_den);
drivers/gpu/drm/i915/display/intel_cx0_phy.c
2752
ref = DIV_ROUND_CLOSEST(refclk * (1 << (1 + fb_clk_div4_en)), 1 << ref_clk_mpllb_div);
drivers/gpu/drm/i915/display/intel_display.c
4094
dotclock = DIV_ROUND_CLOSEST(pipe_config->port_clock * 24,
drivers/gpu/drm/i915/display/intel_display.c
4188
linetime_wm = DIV_ROUND_CLOSEST(pipe_mode->crtc_htotal * 1000 * 8,
drivers/gpu/drm/i915/display/intel_display.c
4204
linetime_wm = DIV_ROUND_CLOSEST(pipe_mode->crtc_htotal * 1000 * 8,
drivers/gpu/drm/i915/display/intel_display_debugfs.c
469
DIV_ROUND_CLOSEST(BIT(row + 9), x), units);
drivers/gpu/drm/i915/display/intel_display_power_well.c
1238
DIV_ROUND_CLOSEST(DISPLAY_RUNTIME_INFO(display)->rawclk_freq,
drivers/gpu/drm/i915/display/intel_dp.c
169
return DIV_ROUND_CLOSEST(rate * 10, intel_dp_link_symbol_size(rate));
drivers/gpu/drm/i915/display/intel_dp_aux.c
111
return DIV_ROUND_CLOSEST(freq, 2000);
drivers/gpu/drm/i915/display/intel_dp_aux.c
90
return DIV_ROUND_CLOSEST(DISPLAY_RUNTIME_INFO(display)->rawclk_freq, 2000);
drivers/gpu/drm/i915/display/intel_dpll.c
325
DIV_ROUND_CLOSEST(refclk * clock->m, clock->n);
drivers/gpu/drm/i915/display/intel_dpll.c
327
DIV_ROUND_CLOSEST(clock->vco, clock->p);
drivers/gpu/drm/i915/display/intel_dpll.c
343
DIV_ROUND_CLOSEST(refclk * clock->m, clock->n + 2);
drivers/gpu/drm/i915/display/intel_dpll.c
345
DIV_ROUND_CLOSEST(clock->vco, clock->p);
drivers/gpu/drm/i915/display/intel_dpll.c
356
DIV_ROUND_CLOSEST(refclk * clock->m, clock->n);
drivers/gpu/drm/i915/display/intel_dpll.c
358
DIV_ROUND_CLOSEST(clock->vco, clock->p);
drivers/gpu/drm/i915/display/intel_dpll.c
371
DIV_ROUND_CLOSEST(clock->vco, clock->p);
drivers/gpu/drm/i915/display/intel_dpll.c
888
clock.m2 = DIV_ROUND_CLOSEST(target * clock.p * clock.n,
drivers/gpu/drm/i915/display/intel_dpll_mgr.c
2921
dco_fraction = DIV_ROUND_CLOSEST(dco_fraction, 2);
drivers/gpu/drm/i915/display/intel_hdmi.c
1937
return DIV_ROUND_CLOSEST(clock * bpc, 8);
drivers/gpu/drm/i915/display/intel_link_bw.c
391
frac_val = DIV_ROUND_CLOSEST(frac_val, (int)int_pow(10, frac_digits));
drivers/gpu/drm/i915/display/intel_panel.c
242
DIV_ROUND_CLOSEST(adjusted_mode->clock * 1000,
drivers/gpu/drm/i915/display/intel_pch_refclk.c
145
return DIV_ROUND_CLOSEST(p->iclk_virtual_root_freq,
drivers/gpu/drm/i915/display/intel_pch_refclk.c
160
p->desired_divisor = DIV_ROUND_CLOSEST(p->iclk_virtual_root_freq,
drivers/gpu/drm/i915/display/intel_snps_phy.c
1945
DIV_ROUND_CLOSEST(refclk * frac_rem, frac_den),
drivers/gpu/drm/i915/display/intel_sprite.c
157
contrast = DIV_ROUND_CLOSEST(255 << 6, 235 - 16);
drivers/gpu/drm/i915/display/intel_sprite.c
158
brightness = -DIV_ROUND_CLOSEST(16 * 255, 235 - 16);
drivers/gpu/drm/i915/display/intel_sprite.c
159
sh_scale = DIV_ROUND_CLOSEST(128 << 7, 240 - 128);
drivers/gpu/drm/i915/display/vlv_clock.c
55
return DIV_ROUND_CLOSEST(ref_freq << 1, divider + 1);
drivers/gpu/drm/i915/display/vlv_dsi_pll.c
168
return DIV_ROUND_CLOSEST(dsi_clock * intel_dsi->lane_count, bpp);
drivers/gpu/drm/i915/display/vlv_dsi_pll.c
357
return DIV_ROUND_CLOSEST(dsi_clk * intel_dsi->lane_count, bpp);
drivers/gpu/drm/i915/display/vlv_dsi_pll.c
406
div1_value = DIV_ROUND_CLOSEST(ddr_clk, 20000);
drivers/gpu/drm/i915/display/vlv_dsi_pll.c
57
dsi_clk_khz = DIV_ROUND_CLOSEST(pclk * bpp, lane_count);
drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c
151
return DIV_ROUND_CLOSEST(i9xx_fsb_freq(uncore->i915), 4) * 1000;
drivers/gpu/drm/i915/gt/intel_llc.c
111
ia_freq = DIV_ROUND_CLOSEST(ia_freq, 100);
drivers/gpu/drm/i915/gt/intel_rps.c
1633
return DIV_ROUND_CLOSEST(rps->gpll_ref_freq * (val - 0xb7), 1000);
drivers/gpu/drm/i915/gt/intel_rps.c
1638
return DIV_ROUND_CLOSEST(1000 * val, rps->gpll_ref_freq) + 0xb7;
drivers/gpu/drm/i915/gt/intel_rps.c
1647
return DIV_ROUND_CLOSEST(rps->gpll_ref_freq * val, 2 * 2 * 1000);
drivers/gpu/drm/i915/gt/intel_rps.c
1653
return DIV_ROUND_CLOSEST(2 * 1000 * val, rps->gpll_ref_freq) * 2;
drivers/gpu/drm/i915/gt/intel_rps.c
1661
return DIV_ROUND_CLOSEST(val * GT_FREQUENCY_MULTIPLIER,
drivers/gpu/drm/i915/gt/intel_rps.c
1678
return DIV_ROUND_CLOSEST(val * GEN9_FREQ_SCALER,
drivers/gpu/drm/i915/gt/intel_rps.c
1685
return DIV_ROUND_CLOSEST(val, GT_FREQUENCY_MULTIPLIER);
drivers/gpu/drm/i915/gt/intel_rps.c
2223
return DIV_ROUND_CLOSEST(slpc->rp0_freq,
drivers/gpu/drm/i915/gt/intel_rps.c
2543
return DIV_ROUND_CLOSEST(slpc->min_freq,
drivers/gpu/drm/i915/gt/intel_rps.c
300
cparams[i].t == DIV_ROUND_CLOSEST(mem_freq, 1000)) {
drivers/gpu/drm/i915/gt/selftest_slpc.c
9
#define FREQUENCY_REQ_UNIT DIV_ROUND_CLOSEST(GT_FREQUENCY_MULTIPLIER, \
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
377
return DIV_ROUND_CLOSEST(REG_FIELD_GET(SLPC_MIN_UNSLICE_FREQ_MASK,
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
388
return DIV_ROUND_CLOSEST(REG_FIELD_GET(SLPC_MAX_UNSLICE_FREQ_MASK,
drivers/gpu/drm/i915/gvt/handlers.c
611
clock.dot = DIV_ROUND_CLOSEST(clock.vco, clock.p);
drivers/gpu/drm/i915/i915_hwmon.c
372
*val = DIV_ROUND_CLOSEST(REG_FIELD_GET(GEN12_VOLTAGE_MASK, reg_value) * 25, 10);
drivers/gpu/drm/i915/selftests/i915_request.c
1956
return DIV_ROUND_CLOSEST(ns, 1 << TF_BIAS);
drivers/gpu/drm/mcde/mcde_dsi.c
655
line_duration = DIV_ROUND_CLOSEST(line_duration, d->mdsi->lanes);
drivers/gpu/drm/mcde/mcde_dsi.c
721
blkeol_duration = DIV_ROUND_CLOSEST(blkeol_pck + 6,
drivers/gpu/drm/mediatek/mtk_hdmi.c
591
if (DIV_ROUND_CLOSEST(rate, 1000) != DIV_ROUND_CLOSEST(clock, 1000))
drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
162
ssc_per = DIV_ROUND_CLOSEST(VCO_REF_CLK_RATE, config->ssc_freq) / 2 - 1;
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
216
ssc_per = DIV_ROUND_CLOSEST(VCO_REF_CLK_RATE, config->ssc_freq) / 2 - 1;
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
197
s32 mv = DIV_ROUND_CLOSEST(uv, 1000);
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
200
coeff = DIV_ROUND_CLOSEST(mv * p->coeff_slope, 1000) + p->coeff_offs;
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
201
coeff = DIV_ROUND_CLOSEST(coeff, 1000);
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
204
dvfs->dfs_ext_cal = DIV_ROUND_CLOSEST(uv - clk->uvdet_offs,
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
235
det_delta = DIV_ROUND_CLOSEST(((s32)clk->uv) - clk->uvdet_offs,
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
56
mv = DIV_ROUND_CLOSEST(coef->c2 * speedo, s_scale);
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
57
mv = DIV_ROUND_CLOSEST((mv + coef->c1) * speedo, s_scale) + coef->c0;
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
74
mv = DIV_ROUND_CLOSEST(coef->c3 * speedo, s_scale) + coef->c4 +
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
75
DIV_ROUND_CLOSEST(coef->c5 * temp, t_scale);
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
76
mv = DIV_ROUND_CLOSEST(mv * temp, t_scale) + cvb_mv;
drivers/gpu/drm/panel/panel-sitronix-st7701.c
268
DIV_ROUND_CLOSEST(desc->vop_uv - 3537500, 12500)));
drivers/gpu/drm/panel/panel-sitronix-st7701.c
273
DIV_ROUND_CLOSEST(desc->vcom_uv - 100000, 12500)));
drivers/gpu/drm/panel/panel-sitronix-st7701.c
278
DIV_ROUND_CLOSEST(clamp(desc->vgh_mv,
drivers/gpu/drm/panel/panel-sitronix-st7701.c
301
DIV_ROUND_CLOSEST(desc->avdd_mv - 6200, 200)) |
drivers/gpu/drm/panel/panel-sitronix-st7701.c
303
DIV_ROUND_CLOSEST(-4400 - desc->avcl_mv, 200)));
drivers/gpu/drm/panel/panel-sitronix-st7701.c
309
DIV_ROUND_CLOSEST(desc->t2d_ns, 200)));
drivers/gpu/drm/panel/panel-sitronix-st7701.c
315
DIV_ROUND_CLOSEST(desc->t3d_ns - 4000, 800)));
drivers/gpu/drm/radeon/radeon_display.c
943
*fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den);
drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.c
192
div = clamp(DIV_ROUND_CLOSEST(rate, target), 1UL, 64UL) - 1;
drivers/gpu/drm/renesas/rcar-du/rcar_lvds.c
242
div = max(1UL, DIV_ROUND_CLOSEST(fout, target));
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
145
return DIV_ROUND_CLOSEST(clkin_khz * ndiv, divisor);
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
180
n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
drivers/gpu/drm/stm/ltdc.c
1547
DIV_ROUND_CLOSEST(fpsi->counter * 1000, ms_since_last));
drivers/gpu/drm/stm/lvds.c
422
n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
drivers/gpu/drm/tegra/dsi.c
993
state->period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, plld);
drivers/gpu/drm/tegra/dsi.h
85
((DIV_ROUND_CLOSEST(value, period) - (hwinc)) & 0xff)
drivers/gpu/drm/tilcdc/tilcdc_crtc.c
234
clkdiv = DIV_ROUND_CLOSEST(clk_rate, pclk_rate);
drivers/gpu/drm/vc4/vc4_plane.c
463
vc4_pstate->crtc_x = DIV_ROUND_CLOSEST(vc4_pstate->crtc_x *
drivers/gpu/drm/vc4/vc4_plane.c
471
vc4_pstate->crtc_y = DIV_ROUND_CLOSEST(vc4_pstate->crtc_y *
drivers/gpu/drm/vc4/vc4_plane.c
478
vc4_pstate->crtc_w = DIV_ROUND_CLOSEST(vc4_pstate->crtc_w *
drivers/gpu/drm/vc4/vc4_plane.c
481
vc4_pstate->crtc_h = DIV_ROUND_CLOSEST(vc4_pstate->crtc_h *
drivers/gpu/drm/vkms/tests/vkms_color_test.c
134
KUNIT_EXPECT_EQ(test, DIV_ROUND_CLOSEST(linear, 0x101), i);
drivers/gpu/drm/vkms/vkms_composer.c
26
return DIV_ROUND_CLOSEST(new_color, 0xffff);
drivers/gpu/drm/vkms/vkms_formats.c
600
out_pixel[3] = DIV_ROUND_CLOSEST(in_pixel->a, 257);
drivers/gpu/drm/vkms/vkms_formats.c
601
out_pixel[2] = DIV_ROUND_CLOSEST(in_pixel->r, 257);
drivers/gpu/drm/vkms/vkms_formats.c
602
out_pixel[1] = DIV_ROUND_CLOSEST(in_pixel->g, 257);
drivers/gpu/drm/vkms/vkms_formats.c
603
out_pixel[0] = DIV_ROUND_CLOSEST(in_pixel->b, 257);
drivers/gpu/drm/vkms/vkms_formats.c
609
out_pixel[2] = DIV_ROUND_CLOSEST(in_pixel->r, 257);
drivers/gpu/drm/vkms/vkms_formats.c
610
out_pixel[1] = DIV_ROUND_CLOSEST(in_pixel->g, 257);
drivers/gpu/drm/vkms/vkms_formats.c
611
out_pixel[0] = DIV_ROUND_CLOSEST(in_pixel->b, 257);
drivers/gpu/drm/vkms/vkms_formats.c
616
out_pixel[3] = DIV_ROUND_CLOSEST(in_pixel->a, 257);
drivers/gpu/drm/vkms/vkms_formats.c
617
out_pixel[2] = DIV_ROUND_CLOSEST(in_pixel->b, 257);
drivers/gpu/drm/vkms/vkms_formats.c
618
out_pixel[1] = DIV_ROUND_CLOSEST(in_pixel->g, 257);
drivers/gpu/drm/vkms/vkms_formats.c
619
out_pixel[0] = DIV_ROUND_CLOSEST(in_pixel->r, 257);
drivers/gpu/drm/xe/xe_guc_pc.c
1104
u32 min = DIV_ROUND_CLOSEST(pc->rpn_freq, GT_FREQUENCY_MULTIPLIER);
drivers/gpu/drm/xe/xe_guc_pc.c
1105
u32 max = DIV_ROUND_CLOSEST(pc->rp0_freq, GT_FREQUENCY_MULTIPLIER);
drivers/gpu/drm/xe/xe_guc_pc.c
274
return DIV_ROUND_CLOSEST(raw * GT_FREQUENCY_MULTIPLIER,
drivers/gpu/drm/xe/xe_guc_pc.c
280
return DIV_ROUND_CLOSEST(freq * GT_FREQUENCY_SCALER,
drivers/gpu/drm/xe/xe_hw_engine.c
593
idledly = DIV_ROUND_CLOSEST(idledly * idledly_units_ps, 1000);
drivers/gpu/drm/xe/xe_hw_engine.c
598
idledly = DIV_ROUND_CLOSEST(((maxcnt - 1) * maxcnt_units_ns),
drivers/gpu/drm/xe/xe_hw_engine.c
600
idledly = DIV_ROUND_CLOSEST(idledly, 1000);
drivers/gpu/drm/xe/xe_hwmon.c
915
*value = DIV_ROUND_CLOSEST(REG_FIELD_GET(VOLTAGE_MASK, reg_val) * 2500, SF_VOLTAGE);
drivers/gpu/ipu-v3/ipu-di.c
427
div = DIV_ROUND_CLOSEST(in_rate, sig->mode.pixelclock);
drivers/gpu/ipu-v3/ipu-di.c
444
div = DIV_ROUND_CLOSEST(clkrate, sig->mode.pixelclock);
drivers/gpu/ipu-v3/ipu-di.c
468
div = DIV_ROUND_CLOSEST(in_rate, sig->mode.pixelclock);
drivers/gpu/ipu-v3/ipu-image-convert.c
1098
return DIV_ROUND_CLOSEST(8192 * downsized, output_size);
drivers/gpu/ipu-v3/ipu-image-convert.c
581
DIV_ROUND_CLOSEST(min_diff % 8192 * 1000, 8192));
drivers/hid/hid-input.c
339
return DIV_ROUND_CLOSEST(logical_extents, physical_extents);
drivers/hid/hid-lg-g15.c
120
DIV_ROUND_CLOSEST(tbuf[1] * 255, high);
drivers/hid/hid-lg-g15.c
122
DIV_ROUND_CLOSEST(tbuf[2] * 255, high);
drivers/hid/hid-lg-g15.c
124
DIV_ROUND_CLOSEST(tbuf[3] * 255, high);
drivers/hid/hid-lg-g15.c
416
DIV_ROUND_CLOSEST(g15->transfer_buf[1] * 255, high);
drivers/hid/hid-lg-g15.c
418
DIV_ROUND_CLOSEST(g15->transfer_buf[2] * 255, high);
drivers/hid/hid-lg-g15.c
420
DIV_ROUND_CLOSEST(g15->transfer_buf[3] * 255, high);
drivers/hid/hid-playstation.c
1556
ds->sensor_timestamp_us = DIV_ROUND_CLOSEST(sensor_timestamp, 3);
drivers/hid/hid-playstation.c
1565
ds->sensor_timestamp_us += DIV_ROUND_CLOSEST(delta, 3);
drivers/hid/hid-playstation.c
2467
ds4->sensor_timestamp_us = DIV_ROUND_CLOSEST(sensor_timestamp * 16, 3);
drivers/hid/hid-playstation.c
2476
ds4->sensor_timestamp_us += DIV_ROUND_CLOSEST(delta * 16, 3);
drivers/hid/wacom.h
226
return DIV_ROUND_CLOSEST(value * out_max, in_max);
drivers/hsi/controllers/omap_ssi_core.c
296
omap_ssi->fck_rate = DIV_ROUND_CLOSEST(clk_data->new_rate, 1000); /* kHz */
drivers/hsi/controllers/omap_ssi_core.c
428
omap_ssi->fck_rate = DIV_ROUND_CLOSEST(ssi_get_clk_rate(ssi), 1000);
drivers/hwmon/acpi_power_meter.c
302
trip = DIV_ROUND_CLOSEST(trip, 1000);
drivers/hwmon/acpi_power_meter.c
325
cap = DIV_ROUND_CLOSEST(cap, 1000);
drivers/hwmon/ad7314.c
93
DIV_ROUND_CLOSEST(data * 3125, 100));
drivers/hwmon/adc128d818.c
157
val = DIV_ROUND_CLOSEST(data->in[index][nr] * data->vref, 4095);
drivers/hwmon/adc128d818.c
178
regval = DIV_ROUND_CLOSEST(clamp_val(val, 0, 2550), 10);
drivers/hwmon/adc128d818.c
216
regval = DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), 1000);
drivers/hwmon/adc128d818.c
450
data->vref = DIV_ROUND_CLOSEST(vref, 1000);
drivers/hwmon/adm1026.c
214
#define TEMP_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), \
drivers/hwmon/adm1026.c
217
#define OFFSET_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), \
drivers/hwmon/adm1026.c
232
#define DAC_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val(val, 0, 2500) * 255, \
drivers/hwmon/adm1177.c
116
*val = DIV_ROUND_CLOSEST(dummy, 4096);
drivers/hwmon/ads7828.c
131
vref_mv = DIV_ROUND_CLOSEST(vref_uv, 1000);
drivers/hwmon/ads7828.c
147
data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 4096);
drivers/hwmon/ads7828.c
151
data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 256);
drivers/hwmon/ads7828.c
66
DIV_ROUND_CLOSEST(regval * data->lsb_resol, 1000));
drivers/hwmon/adt7411.c
416
val = DIV_ROUND_CLOSEST(val * 256, 7000);
drivers/hwmon/adt7411.c
443
val = DIV_ROUND_CLOSEST(val * 256, data->vref_cached);
drivers/hwmon/adt7411.c
477
val = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/adt7462.c
1194
temp = DIV_ROUND_CLOSEST(temp, 1000);
drivers/hwmon/adt7462.c
1276
temp = DIV_ROUND_CLOSEST(temp, 1000) + 64;
drivers/hwmon/adt7462.c
803
temp = DIV_ROUND_CLOSEST(temp, 1000) + 64;
drivers/hwmon/adt7462.c
839
temp = DIV_ROUND_CLOSEST(temp, 1000) + 64;
drivers/hwmon/adt7462.c
901
temp = DIV_ROUND_CLOSEST(temp, x);
drivers/hwmon/adt7462.c
941
temp = DIV_ROUND_CLOSEST(temp, x);
drivers/hwmon/adt7470.c
569
val = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/adt7470.c
956
temp = DIV_ROUND_CLOSEST(temp, 1000);
drivers/hwmon/adt7475.c
297
return DIV_ROUND_CLOSEST(reg * 2250, 1024);
drivers/hwmon/adt7475.c
298
return DIV_ROUND_CLOSEST(reg * (r[0] + r[1]) * 2250, r[1] * 1024);
drivers/hwmon/adt7475.c
307
reg = DIV_ROUND_CLOSEST(volt * 1024, 2250);
drivers/hwmon/adt7475.c
309
reg = DIV_ROUND_CLOSEST(volt * r[1] * 1024,
drivers/hwmon/adt7x10.c
115
return DIV_ROUND_CLOSEST(clamp_val(temp, ADT7X10_TEMP_MIN,
drivers/hwmon/adt7x10.c
128
return DIV_ROUND_CLOSEST(reg * 1000, 128);
drivers/hwmon/adt7x10.c
197
regval = clamp_val(DIV_ROUND_CLOSEST(limit - hyst, 1000), 0,
drivers/hwmon/amc6821.c
166
temps[2] = temps[1] + DIV_ROUND_CLOSEST(255 - regvals[0], slope);
drivers/hwmon/amc6821.c
275
val = DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), 1000);
drivers/hwmon/amc6821.c
609
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 63000), 1000);
drivers/hwmon/amc6821.c
619
temps[1] = DIV_ROUND_CLOSEST(val, 4000) * 4;
drivers/hwmon/amc6821.c
628
temps[2] = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/aquacomputer_d5next.c
621
return DIV_ROUND_CLOSEST(val * 255, 100 * 100);
drivers/hwmon/aquacomputer_d5next.c
630
return DIV_ROUND_CLOSEST(val * 100 * 100, 255);
drivers/hwmon/aquacomputer_d5next.c
637
return DIV_ROUND_CLOSEST(AQUASTREAMXT_PUMP_CONVERSION_CONST, val);
drivers/hwmon/aquacomputer_d5next.c
645
return DIV_ROUND_CLOSEST(AQUASTREAMXT_FAN_CONVERSION_CONST, val);
drivers/hwmon/aquacomputer_d5next.c
979
priv->current_input[0] = DIV_ROUND_CLOSEST(sensor_value * 176, 100) - 52;
drivers/hwmon/aquacomputer_d5next.c
982
priv->voltage_input[0] = DIV_ROUND_CLOSEST(sensor_value * 1000, 61);
drivers/hwmon/aquacomputer_d5next.c
985
priv->voltage_input[1] = DIV_ROUND_CLOSEST(sensor_value * 1000, 63);
drivers/hwmon/as370-hwmon.c
56
*temp = DIV_ROUND_CLOSEST(val * 251802, 4096) - 85525;
drivers/hwmon/asus_rog_ryujin.c
104
return DIV_ROUND_CLOSEST(val * 255, 100);
drivers/hwmon/asus_rog_ryujin.c
109
return DIV_ROUND_CLOSEST(val * 100, 255);
drivers/hwmon/asus_wmi_sensors.c
406
return DIV_ROUND_CLOSEST(value, KILO);
drivers/hwmon/axi-fan-control.c
116
return DIV_ROUND_CLOSEST(pwm_width * SYSFS_PWM_MAX, pwm_period);
drivers/hwmon/axi-fan-control.c
126
new_width = DIV_ROUND_CLOSEST(__val * pwm_period, SYSFS_PWM_MAX);
drivers/hwmon/axi-fan-control.c
148
return DIV_ROUND_CLOSEST(60 * ctl->clk_rate, ctl->ppr * tach);
drivers/hwmon/axi-fan-control.c
352
u32 tach_tol = DIV_ROUND_CLOSEST(new_tach * 25, 100);
drivers/hwmon/corsair-cpro.c
200
val = DIV_ROUND_CLOSEST(val * 100, 255);
drivers/hwmon/corsair-cpro.c
292
*val = DIV_ROUND_CLOSEST(ret * 255, 100);
drivers/hwmon/cros_ec_hwmon.c
255
.percent = DIV_ROUND_CLOSEST((uint32_t)val * 100, 255),
drivers/hwmon/cros_ec_hwmon.c
67
*pwm_value = (u8)DIV_ROUND_CLOSEST(le32_to_cpu(resp.percent) * 255, 100);
drivers/hwmon/da9052-hwmon.c
127
return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(ret * 39, 10));
drivers/hwmon/da9052-hwmon.c
51
return DIV_ROUND_CLOSEST(value * 2000, 1023) + 2500;
drivers/hwmon/da9052-hwmon.c
57
return DIV_ROUND_CLOSEST(value * 2500, 1023);
drivers/hwmon/da9052-hwmon.c
63
return DIV_ROUND_CLOSEST(value * 5000, 1023);
drivers/hwmon/da9052-hwmon.c
68
return DIV_ROUND_CLOSEST(value * hwmon->tsiref_mv, 1023);
drivers/hwmon/da9055-hwmon.c
119
return DIV_ROUND_CLOSEST(value * 1000, DA9055_VSYS_DIV) + 2500;
drivers/hwmon/da9055-hwmon.c
121
return DIV_ROUND_CLOSEST(value * 1000, DA9055_ADCIN_DIV);
drivers/hwmon/da9055-hwmon.c
194
return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(-4084 * (tjunc - toffset)
drivers/hwmon/dell-smm-hwmon.c
1048
pwm = clamp_val(DIV_ROUND_CLOSEST(val, data->i8k_pwm_mult), 0,
drivers/hwmon/dme1737.c
270
return DIV_ROUND_CLOSEST(val * 192, nominal);
drivers/hwmon/dme1737.c
287
return DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/dme1737.c
326
hyst = DIV_ROUND_CLOSEST(temp - hyst, 1000);
drivers/hwmon/ds1621.c
125
return DIV_ROUND_CLOSEST(((s16)reg / 16) * 625, 10);
drivers/hwmon/ds1621.c
137
temp = DIV_ROUND_CLOSEST(temp * (1 << (8 - zbits)), 1000) << zbits;
drivers/hwmon/emc1403.c
443
hyst = clamp_val(DIV_ROUND_CLOSEST(hyst, 1000), 0, 127);
drivers/hwmon/emc1403.c
445
hyst = clamp_val(DIV_ROUND_CLOSEST(hyst, 1000), 0, 255);
drivers/hwmon/emc1403.c
465
regval = DIV_ROUND_CLOSEST(val, 125);
drivers/hwmon/emc1403.c
475
regval = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/emc2103.c
243
val = DIV_ROUND_CLOSEST(clamp_val(val, -63000, 127000), 1000);
drivers/hwmon/emc2103.c
265
val = DIV_ROUND_CLOSEST(clamp_val(val, -63000, 127000), 1000);
drivers/hwmon/emc2305.c
37
DIV_ROUND_CLOSEST((duty) * (max_state), (pwm_max))
drivers/hwmon/emc2305.c
39
DIV_ROUND_CLOSEST((state) * (pwm_max), (max_state))
drivers/hwmon/emc6w201.c
206
val = DIV_ROUND_CLOSEST(val * 192, nominal_mv[nr]);
drivers/hwmon/emc6w201.c
245
val = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/emc6w201.c
290
val = DIV_ROUND_CLOSEST(5400000U, val);
drivers/hwmon/ftsteutates.c
419
*val = DIV_ROUND_CLOSEST(data->volt[channel] * 3300, 255);
drivers/hwmon/g762.c
194
return DIV_ROUND_CLOSEST(f1, rpm * f2);
drivers/hwmon/gigabyte_waterforce.c
183
*val = DIV_ROUND_CLOSEST(priv->duty_input[channel] * 255, 100);
drivers/hwmon/gl518sm.c
77
#define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 119)
drivers/hwmon/gl518sm.c
91
#define IN_TO_REG(val) DIV_ROUND_CLOSEST(IN_CLAMP(val), 19)
drivers/hwmon/gl518sm.c
95
#define VDD_TO_REG(val) DIV_ROUND_CLOSEST(VDD_CLAMP(val) * 4, 95)
drivers/hwmon/gl518sm.c
96
#define VDD_FROM_REG(val) DIV_ROUND_CLOSEST((val) * 95, 4)
drivers/hwmon/gl520sm.c
197
#define VDD_FROM_REG(val) DIV_ROUND_CLOSEST((val) * 95, 4)
drivers/hwmon/gl520sm.c
199
#define VDD_TO_REG(val) DIV_ROUND_CLOSEST(VDD_CLAMP(val) * 4, 95)
drivers/hwmon/gl520sm.c
203
#define IN_TO_REG(val) DIV_ROUND_CLOSEST(IN_CLAMP(val), 19)
drivers/hwmon/gl520sm.c
335
DIV_ROUND_CLOSEST(480000, \
drivers/hwmon/gl520sm.c
499
#define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 130)
drivers/hwmon/gpd-fan.c
336
return DIV_ROUND_CLOSEST((var - 1) * 255, (drvdata->pwm_max - 1));
drivers/hwmon/gpd-fan.c
367
return DIV_ROUND_CLOSEST(val * (drvdata->pwm_max - 1), 255) + 1;
drivers/hwmon/gsc-hwmon.c
85
temp = DIV_ROUND_CLOSEST(temp, 100);
drivers/hwmon/hih6130.c
57
return (DIV_ROUND_CLOSEST(ticks * 1650, 16382) - 400) * 100;
drivers/hwmon/hih6130.c
72
return DIV_ROUND_CLOSEST(ticks * 1000, 16382) * 100;
drivers/hwmon/hp-wmi-sensors.c
728
val = DIV_ROUND_CLOSEST(val, 10);
drivers/hwmon/hp-wmi-sensors.c
743
DIV_ROUND_CLOSEST(val * 5, 9) :
drivers/hwmon/hp-wmi-sensors.c
744
DIV_ROUND_CLOSEST(val, 9) * 5;
drivers/hwmon/hwmon-vid.c
113
return DIV_ROUND_CLOSEST(15500 - 125 * val, 10);
drivers/hwmon/ina209.c
117
return DIV_ROUND_CLOSEST((s16)val, 100);
drivers/hwmon/ina209.c
176
return (DIV_ROUND_CLOSEST(clamp_val(val, 0, 32000), 4) << 3)
drivers/hwmon/ina209.c
201
return DIV_ROUND_CLOSEST(val, 20 * 1000);
drivers/hwmon/ina238.c
428
val = DIV_ROUND_CLOSEST(val * 1000, data->current_lsb);
drivers/hwmon/ina238.c
508
val = DIV_ROUND_CLOSEST(val, data->power_lsb);
drivers/hwmon/ina238.c
555
int fraction = 1000 - DIV_ROUND_CLOSEST(1000, BIT(resolution - 9));
drivers/hwmon/ina238.c
559
return (DIV_ROUND_CLOSEST(val << (resolution - 9), 1000) << (16 - resolution)) & 0xffff;
drivers/hwmon/ina238.c
821
data->power_lsb = DIV_ROUND_CLOSEST(data->current_lsb *
drivers/hwmon/ina2xx.c
225
return DIV_ROUND_CLOSEST(avg * INA226_TOTAL_CONV_TIME_DEFAULT, 1000);
drivers/hwmon/ina2xx.c
242
avg = DIV_ROUND_CLOSEST(interval * 1000,
drivers/hwmon/ina2xx.c
258
val = DIV_ROUND_CLOSEST((s16)regval, data->config->shunt_div);
drivers/hwmon/ina2xx.c
263
val = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/ina2xx.c
271
val = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/ina2xx.c
368
val = DIV_ROUND_CLOSEST(val, data->config->bus_voltage_lsb);
drivers/hwmon/ina2xx.c
372
val = DIV_ROUND_CLOSEST(val, data->power_lsb_uW);
drivers/hwmon/ina2xx.c
377
val = DIV_ROUND_CLOSEST(val * 1000, data->current_lsb_uA);
drivers/hwmon/ina2xx.c
535
*val = DIV_ROUND_CLOSEST(accumulator_24, sample_count) * data->power_lsb_uW;
drivers/hwmon/ina2xx.c
822
unsigned int dividend = DIV_ROUND_CLOSEST(1000000000,
drivers/hwmon/ina2xx.c
828
data->current_lsb_uA = DIV_ROUND_CLOSEST(dividend, val);
drivers/hwmon/ina3221.c
193
return DIV_ROUND_CLOSEST(interval * 1000 / 2, channels * samples);
drivers/hwmon/ina3221.c
265
*val = DIV_ROUND_CLOSEST(*val, 1000);
drivers/hwmon/ina3221.c
371
*val = DIV_ROUND_CLOSEST(voltage_nv, resistance_uo);
drivers/hwmon/ina3221.c
455
voltage_uv = DIV_ROUND_CLOSEST(current_ma * resistance_uo, 1000);
drivers/hwmon/ina3221.c
472
regval = DIV_ROUND_CLOSEST(voltage_uv, 20) & 0xfffe;
drivers/hwmon/ina3221.c
474
regval = DIV_ROUND_CLOSEST(voltage_uv, 5) & 0xfff8;
drivers/hwmon/it87.c
659
val = DIV_ROUND_CLOSEST(val * 10, adc_lsb(data, nr));
drivers/hwmon/it87.c
665
return DIV_ROUND_CLOSEST(val * adc_lsb(data, nr), 10);
drivers/hwmon/lan966x-hwmon.c
147
tmp = DIV_ROUND_CLOSEST(hwmon->clk_rate, 256);
drivers/hwmon/lan966x-hwmon.c
148
*val = DIV_ROUND_CLOSEST(tmp, data);
drivers/hwmon/lan966x-hwmon.c
194
val = DIV_ROUND_CLOSEST(hwmon->clk_rate, val);
drivers/hwmon/lan966x-hwmon.c
195
val = DIV_ROUND_CLOSEST(val, 256) - 1;
drivers/hwmon/lan966x-hwmon.c
307
div = DIV_ROUND_CLOSEST(hwmon->clk_rate, LAN966X_PVT_CLK);
drivers/hwmon/lm63.c
117
#define TEMP8_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), -128000, \
drivers/hwmon/lm63.c
119
#define TEMP8U_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), 0, \
drivers/hwmon/lm63.c
122
#define TEMP11_TO_REG(val) (DIV_ROUND_CLOSEST(clamp_val((val), -128000, \
drivers/hwmon/lm63.c
124
#define TEMP11U_TO_REG(val) (DIV_ROUND_CLOSEST(clamp_val((val), 0, \
drivers/hwmon/lm63.c
126
#define HYST_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), 0, 127000), \
drivers/hwmon/lm63.c
194
return DIV_ROUND_CLOSEST(clamp_val(val, 0, 127500), 500);
drivers/hwmon/lm63.c
196
return DIV_ROUND_CLOSEST(clamp_val(val, 0, 127000), 1000);
drivers/hwmon/lm75.c
450
temp = DIV_ROUND_CLOSEST(temp << (resolution - 8),
drivers/hwmon/lm80.c
77
#define TEMP_TO_REG(temp) (DIV_ROUND_CLOSEST(clamp_val((temp), \
drivers/hwmon/lm83.c
231
regval = DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), 1000);
drivers/hwmon/lm85.c
147
DIV_ROUND_CLOSEST(clamp_val((val), -127000, 127000), 1000)
drivers/hwmon/lm90.c
1370
1000 - DIV_ROUND_CLOSEST(1000, BIT(resolution - 8)) : 0;
drivers/hwmon/lm90.c
1383
return DIV_ROUND_CLOSEST(val << (resolution - 8), 1000) << (16 - resolution);
drivers/hwmon/lm90.c
1448
data->temp_hyst = clamp_val(DIV_ROUND_CLOSEST(temp - val, 1000), 0, 31);
drivers/hwmon/lm90.c
961
data->update_interval = DIV_ROUND_CLOSEST(update_interval, 64);
drivers/hwmon/lm92.c
68
return DIV_ROUND_CLOSEST(val << (resolution - 9), 1000) << (16 - resolution);
drivers/hwmon/lm95234.c
112
val = DIV_ROUND_CLOSEST(clamp_val(val, -255000, 255000), 1000);
drivers/hwmon/lm95234.c
143
val = DIV_ROUND_CLOSEST(clamp_val(val, -64000, 63500), 500);
drivers/hwmon/lm95234.c
147
val = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/lm95234.c
152
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 255000), 1000);
drivers/hwmon/lm95234.c
86
*t = DIV_ROUND_CLOSEST(temp * 125, 32);
drivers/hwmon/lochnagar-hwmon.c
264
*val = DIV_ROUND_CLOSEST(interval, 1000);
drivers/hwmon/lochnagar-hwmon.c
298
val = DIV_ROUND_CLOSEST(val * 1000, LN2_SAMPLE_US);
drivers/hwmon/ltc2947-core.c
613
DIV_ROUND_CLOSEST(val - 550, 204));
drivers/hwmon/ltc2947-core.c
618
DIV_ROUND_CLOSEST(val - 550, 204));
drivers/hwmon/ltc2947-core.c
628
DIV_ROUND_CLOSEST(val - 550, 204));
drivers/hwmon/ltc2947-core.c
633
DIV_ROUND_CLOSEST(val - 550, 204));
drivers/hwmon/ltc2947-core.c
654
DIV_ROUND_CLOSEST(val, 200000));
drivers/hwmon/ltc2947-core.c
659
DIV_ROUND_CLOSEST(val, 200000));
drivers/hwmon/ltc2947-core.c
680
DIV_ROUND_CLOSEST(val, 12));
drivers/hwmon/ltc2947-core.c
685
DIV_ROUND_CLOSEST(val, 12));
drivers/hwmon/ltc2947-core.c
717
DIV_ROUND_CLOSEST(val, 145));
drivers/hwmon/ltc2947-core.c
723
DIV_ROUND_CLOSEST(val, 2));
drivers/hwmon/ltc2947-core.c
729
DIV_ROUND_CLOSEST(val, 145));
drivers/hwmon/ltc2947-core.c
735
DIV_ROUND_CLOSEST(val, 2));
drivers/hwmon/ltc2991.c
127
*val = DIV_ROUND_CLOSEST(sign_extend32(reg_val, 14) * 19075,
drivers/hwmon/ltc2991.c
158
*val = DIV_ROUND_CLOSEST(sign_extend32(reg_val, 12) * 1000, 16);
drivers/hwmon/ltc2991.c
93
*val = DIV_ROUND_CLOSEST(sign_extend32(reg_val, 14) * 30518,
drivers/hwmon/ltc2992.c
427
*val = DIV_ROUND_CLOSEST(reg_val * scale, 1000);
drivers/hwmon/ltc2992.c
434
val = DIV_ROUND_CLOSEST(val * 1000, scale);
drivers/hwmon/ltc2992.c
554
*val = DIV_ROUND_CLOSEST(reg_val * LTC2992_IADC_NANOV_LSB, st->r_sense_uohm[channel]);
drivers/hwmon/ltc2992.c
563
reg_val = DIV_ROUND_CLOSEST(val * st->r_sense_uohm[channel], LTC2992_IADC_NANOV_LSB);
drivers/hwmon/ltc4222.c
64
val = DIV_ROUND_CLOSEST(val * 5, 4);
drivers/hwmon/ltc4222.c
69
val = DIV_ROUND_CLOSEST(val * 125, 4);
drivers/hwmon/ltc4222.c
80
val = DIV_ROUND_CLOSEST(val * 125, 2);
drivers/hwmon/ltc4282.c
1226
st->power_max = DIV_ROUND_CLOSEST(st->vsense_max * DECA * MILLI, st->rsense) * st->vfs_out;
drivers/hwmon/ltc4282.c
249
*val = DIV_ROUND_CLOSEST(in * fs, U8_MAX);
drivers/hwmon/ltc4282.c
435
*val = DIV_ROUND_CLOSEST(in * MILLI, st->rsense);
drivers/hwmon/ltc4282.c
450
*val = DIV_ROUND_CLOSEST(in * MILLI, st->rsense);
drivers/hwmon/ltc4282.c
557
temp = DIV_ROUND_CLOSEST(DECA * st->vfs_out * 40 * BIT(8), U16_MAX);
drivers/hwmon/ltc4282.c
659
tmp = DIV_ROUND_CLOSEST(U16_MAX * lowest, fs);
drivers/hwmon/ltc4282.c
667
tmp = DIV_ROUND_CLOSEST(U16_MAX * highest, fs);
drivers/hwmon/ltc4282.c
720
in = DIV_ROUND_CLOSEST(val * U8_MAX, fs);
drivers/hwmon/max16065.c
120
return DIV_ROUND_CLOSEST(clamp_val(mv * 256, 0, range * 255), range);
drivers/hwmon/max1619.c
179
val = DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), 1000);
drivers/hwmon/max31730.c
207
val = DIV_ROUND_CLOSEST(val, 125);
drivers/hwmon/max31730.c
219
val = DIV_ROUND_CLOSEST(val << 4, 1000) << 4;
drivers/hwmon/max31730.c
57
return DIV_ROUND_CLOSEST((temp >> 4) * 1000, 16);
drivers/hwmon/max31760.c
34
#define TEMP11_TO_REG(val) (DIV_ROUND_CLOSEST(clamp_val((val), -128000, \
drivers/hwmon/max31790.c
328
val = DIV_ROUND_CLOSEST(val * MAX31790_REG_PWMOUT_SCALE,
drivers/hwmon/max6650.c
563
*val = DIV_ROUND_CLOSEST(data->tach[channel] * 120,
drivers/hwmon/max6697.c
288
val = DIV_ROUND_CLOSEST(val, 1000) + data->temp_offset;
drivers/hwmon/max6697.c
293
val = DIV_ROUND_CLOSEST(val, 1000) + data->temp_offset;
drivers/hwmon/max6697.c
298
val = DIV_ROUND_CLOSEST(val, 1000) + data->temp_offset;
drivers/hwmon/max6697.c
303
val = DIV_ROUND_CLOSEST(val, 250);
drivers/hwmon/mc13783-adc.c
104
val = DIV_ROUND_CLOSEST(val * 9, 4);
drivers/hwmon/mc13783-adc.c
123
val = DIV_ROUND_CLOSEST(val * 4800, 1024);
drivers/hwmon/mc13783-adc.c
126
val = DIV_ROUND_CLOSEST(val * 2555, 1024);
drivers/hwmon/mc13783-adc.c
149
ret = DIV_ROUND_CLOSEST(-2635920 + val * 4244, 10);
drivers/hwmon/mc13783-adc.c
79
val = DIV_ROUND_CLOSEST(val * 9, 2);
drivers/hwmon/mc13783-adc.c
85
val = DIV_ROUND_CLOSEST(val * 9, 4) + 2400;
drivers/hwmon/mcp3021.c
56
return DIV_ROUND_CLOSEST(data->vdd * val, 1 << data->output_res);
drivers/hwmon/mlxreg-fan.c
47
#define MLXREG_FAN_GET_RPM(rval, d, s) (DIV_ROUND_CLOSEST(15000000 * 100, \
drivers/hwmon/mlxreg-fan.c
50
#define MLXREG_FAN_PWM_DUTY2STATE(duty) (DIV_ROUND_CLOSEST((duty) * \
drivers/hwmon/mlxreg-fan.c
53
#define MLXREG_FAN_PWM_STATE2DUTY(stat) (DIV_ROUND_CLOSEST((stat) * \
drivers/hwmon/mr75203.c
404
key = DIV_ROUND_CLOSEST(sys_freq, middle);
drivers/hwmon/nct6694-hwmon.c
143
return DIV_ROUND_CLOSEST(val, 16);
drivers/hwmon/nct6694-hwmon.c
153
return DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/nct6694-hwmon.c
69
(DIV_ROUND_CLOSEST(clamp_val((val), 100, 25000) * 255, 25000))
drivers/hwmon/nct6775-core.c
1004
return DIV_ROUND_CLOSEST(reg * scales[nr], 100);
drivers/hwmon/nct6775-core.c
1009
return clamp_val(DIV_ROUND_CLOSEST(val * 100, scales[nr]), 0, 255);
drivers/hwmon/nct6775-core.c
2266
val = DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), 1000);
drivers/hwmon/nct6775-core.c
2882
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, data->target_temp_mask * 1000), 1000);
drivers/hwmon/nct6775-core.c
2962
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, data->tolerance_mask * 1000), 1000);
drivers/hwmon/nct6775-core.c
3088
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 255000), 1000);
drivers/hwmon/nct6775-core.c
3270
data->auto_temp[nr][point] = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/nct7363.c
120
val = clamp_val(DIV_ROUND_CLOSEST(1350000, val),
drivers/hwmon/nct7802.c
244
ret = DIV_ROUND_CLOSEST(1350000U, ret);
drivers/hwmon/nct7802.c
264
ret = DIV_ROUND_CLOSEST(1350000U, ret);
drivers/hwmon/nct7802.c
276
limit = DIV_ROUND_CLOSEST(1350000U, limit);
drivers/hwmon/nct7802.c
326
voltage = DIV_ROUND_CLOSEST(voltage, nct7802_vmul[nr]);
drivers/hwmon/nct7802.c
461
val = DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), 1000);
drivers/hwmon/nct7904.c
607
val = clamp_val(DIV_ROUND_CLOSEST(1350000, val), 1, 0x1fff);
drivers/hwmon/npcm750-pwm-fan.c
693
prescale_val = DIV_ROUND_CLOSEST(output_freq, PWM_OUTPUT_FREQ_25KHZ);
drivers/hwmon/nzxt-kraken3.c
200
return DIV_ROUND_CLOSEST(val * 255, 100);
drivers/hwmon/nzxt-kraken3.c
210
percent_value = DIV_ROUND_CLOSEST(val * 100, 255);
drivers/hwmon/nzxt-smart2.c
218
return max(1L, DIV_ROUND_CLOSEST(min(val, orig_max) * new_max, orig_max));
drivers/hwmon/nzxt-smart2.c
549
return clamp_val(1 + DIV_ROUND_CLOSEST(interval - 488, 256), 0, 255);
drivers/hwmon/pmbus/ina233.c
75
ret = clamp_val(DIV_ROUND_CLOSEST((s16)ret * 25, 12500),
drivers/hwmon/pmbus/lm25066.c
254
ret = DIV_ROUND_CLOSEST(ret * 293, 6140);
drivers/hwmon/pmbus/lm25066.c
258
ret = DIV_ROUND_CLOSEST(ret * 2832, 45400);
drivers/hwmon/pmbus/lm25066.c
262
ret = DIV_ROUND_CLOSEST(ret * 70, 453);
drivers/hwmon/pmbus/lm25066.c
267
ret = DIV_ROUND_CLOSEST(ret * 725, 2180);
drivers/hwmon/pmbus/lm25066.c
335
ret = DIV_ROUND_CLOSEST(ret * 293, 6140);
drivers/hwmon/pmbus/lm25066.c
343
ret = DIV_ROUND_CLOSEST(ret * 293, 6140);
drivers/hwmon/pmbus/lm25066.c
411
word = DIV_ROUND_CLOSEST((int)word * 6140, 293);
drivers/hwmon/pmbus/lm25066.c
418
word = DIV_ROUND_CLOSEST((int)word * 6140, 293);
drivers/hwmon/pmbus/max20730.c
414
d = DIV_ROUND_CLOSEST(d, 10);
drivers/hwmon/pmbus/max20730.c
61
#define VOLT_FROM_REG(val) DIV_ROUND_CLOSEST((val), 1 << 9)
drivers/hwmon/pmbus/mp2869.c
304
ret = DIV_ROUND_CLOSEST((ret & GENMASK(11, 0)) * data->vout_scale[page],
drivers/hwmon/pmbus/mp2869.c
312
ret = DIV_ROUND_CLOSEST((ret & GENMASK(10, 0)) * data->iout_scale[page],
drivers/hwmon/pmbus/mp2869.c
390
ret = DIV_ROUND_CLOSEST((ret & GENMASK(7, 0)) * data->iout_scale[page] *
drivers/hwmon/pmbus/mp2869.c
429
DIV_ROUND_CLOSEST(word +
drivers/hwmon/pmbus/mp2869.c
438
DIV_ROUND_CLOSEST(word,
drivers/hwmon/pmbus/mp2869.c
454
DIV_ROUND_CLOSEST(word -
drivers/hwmon/pmbus/mp2869.c
463
DIV_ROUND_CLOSEST(word,
drivers/hwmon/pmbus/mp2869.c
503
DIV_ROUND_CLOSEST(word,
drivers/hwmon/pmbus/mp2869.c
526
DIV_ROUND_CLOSEST(word * MP2869_READ_IOUT_DIV,
drivers/hwmon/pmbus/mp2869.c
542
DIV_ROUND_CLOSEST(word,
drivers/hwmon/pmbus/mp2888.c
121
ret = DIV_ROUND_CLOSEST(ret * 200 - 19600, data->curr_sense_gain);
drivers/hwmon/pmbus/mp2888.c
214
ret = data->total_curr_resolution ? ret : DIV_ROUND_CLOSEST(ret, 2);
drivers/hwmon/pmbus/mp2888.c
270
word = DIV_ROUND_CLOSEST(word, MP2888_TEMP_UNIT);
drivers/hwmon/pmbus/mp2888.c
276
word = data->total_curr_resolution ? DIV_ROUND_CLOSEST(word, 8) :
drivers/hwmon/pmbus/mp2888.c
277
DIV_ROUND_CLOSEST(word, 4);
drivers/hwmon/pmbus/mp2888.c
283
word = data->total_curr_resolution ? DIV_ROUND_CLOSEST(word, 4) :
drivers/hwmon/pmbus/mp2888.c
284
DIV_ROUND_CLOSEST(word, 2);
drivers/hwmon/pmbus/mp2891.c
286
ret = DIV_ROUND_CLOSEST(ret * data->vout_scale[page], MP2891_VOUT_SCALE_DIV);
drivers/hwmon/pmbus/mp2891.c
293
ret = DIV_ROUND_CLOSEST((ret & GENMASK(10, 0)) * data->iout_scale[page],
drivers/hwmon/pmbus/mp2891.c
350
ret = DIV_ROUND_CLOSEST((ret & GENMASK(7, 0)) * data->iout_scale[page] *
drivers/hwmon/pmbus/mp2891.c
363
ret = DIV_ROUND_CLOSEST((ret & GENMASK(9, 0)), 2);
drivers/hwmon/pmbus/mp2891.c
400
DIV_ROUND_CLOSEST(word * MP2891_VOUT_SCALE_DIV,
drivers/hwmon/pmbus/mp2891.c
416
DIV_ROUND_CLOSEST(word +
drivers/hwmon/pmbus/mp2891.c
424
DIV_ROUND_CLOSEST(word,
drivers/hwmon/pmbus/mp2891.c
440
DIV_ROUND_CLOSEST(word -
drivers/hwmon/pmbus/mp2891.c
448
DIV_ROUND_CLOSEST(word,
drivers/hwmon/pmbus/mp2891.c
465
DIV_ROUND_CLOSEST(word, 4)));
drivers/hwmon/pmbus/mp2891.c
485
DIV_ROUND_CLOSEST(word * MP2891_IOUT_SCALE_DIV,
drivers/hwmon/pmbus/mp2891.c
504
DIV_ROUND_CLOSEST(word, MP2891_PIN_LIMIT_UINT));
drivers/hwmon/pmbus/mp2925.c
105
ret = DIV_ROUND_CLOSEST(((ret & GENMASK(11, 0)) + data->vid_offset[page]) *
drivers/hwmon/pmbus/mp2925.c
114
ret = DIV_ROUND_CLOSEST((ret & GENMASK(11, 0)) * MP2925_VOUT_OVUV_UINT,
drivers/hwmon/pmbus/mp2925.c
175
DIV_ROUND_CLOSEST(word * MP2925_VOUT_OVUV_DIV,
drivers/hwmon/pmbus/mp29502.c
229
ov_value = DIV_ROUND_CLOSEST(FIELD_GET(GENMASK(12, 7), ret) *
drivers/hwmon/pmbus/mp29502.c
262
DIV_ROUND_CLOSEST(word * data->ovp_div,
drivers/hwmon/pmbus/mp29502.c
321
ret = DIV_ROUND_CLOSEST((ret & GENMASK(11, 0)) *
drivers/hwmon/pmbus/mp29502.c
339
ret = DIV_ROUND_CLOSEST(mp29502_reg2data_linear11(ret),
drivers/hwmon/pmbus/mp29502.c
367
ret = DIV_ROUND_CLOSEST(mp29502_reg2data_linear11(ret) *
drivers/hwmon/pmbus/mp29502.c
377
ret = DIV_ROUND_CLOSEST((ret & GENMASK(10, 0)) * data->iout_scale,
drivers/hwmon/pmbus/mp29502.c
428
ret = DIV_ROUND_CLOSEST((FIELD_GET(GENMASK(8, 0), ret) *
drivers/hwmon/pmbus/mp29502.c
441
ret = DIV_ROUND_CLOSEST((ret & GENMASK(7, 0)) *
drivers/hwmon/pmbus/mp29502.c
493
DIV_ROUND_CLOSEST(word,
drivers/hwmon/pmbus/mp29502.c
525
DIV_ROUND_CLOSEST(word *
drivers/hwmon/pmbus/mp29502.c
537
DIV_ROUND_CLOSEST(word *
drivers/hwmon/pmbus/mp2975.c
245
return max_t(int, DIV_ROUND_CLOSEST(ret, data->info.phases[page]),
drivers/hwmon/pmbus/mp2975.c
246
DIV_ROUND_CLOSEST(ph_curr, data->curr_sense_gain[page]));
drivers/hwmon/pmbus/mp2975.c
330
ret = DIV_ROUND_CLOSEST(ret, MP2975_VIN_UV_LIMIT_UNIT);
drivers/hwmon/pmbus/mp2975.c
487
ret = DIV_ROUND_CLOSEST(ret, MP2975_VIN_UV_LIMIT_UNIT);
drivers/hwmon/pmbus/mp2975.c
512
ret = DIV_ROUND_CLOSEST(data->vref[page] * 10 - 50 *
drivers/hwmon/pmbus/mp2975.c
522
ret = DIV_ROUND_CLOSEST(ret, 4);
drivers/hwmon/pmbus/mp2975.c
531
ret = DIV_ROUND_CLOSEST(ret, 4);
drivers/hwmon/pmbus/mp2975.c
936
DIV_ROUND_CLOSEST(data->vref_off[i] *
drivers/hwmon/pmbus/mp2993.c
108
ret = DIV_ROUND_CLOSEST((ret & GENMASK(9, 0)) * MP2993_READ_VIN_UINT,
drivers/hwmon/pmbus/mp2993.c
120
ret = DIV_ROUND_CLOSEST((ret & GENMASK(7, 0)) * MP2993_VIN_LIMIT_UINT,
drivers/hwmon/pmbus/mp2993.c
150
ret = DIV_ROUND_CLOSEST(word * MP2993_VOUT_OVUV_DIV, MP2993_VOUT_OVUV_UINT);
drivers/hwmon/pmbus/mp2993.c
169
DIV_ROUND_CLOSEST(word * MP2993_VIN_LIMIT_DIV,
drivers/hwmon/pmbus/mp2993.c
90
ret = DIV_ROUND_CLOSEST(ret * MP2993_VOUT_OVUV_UINT, MP2993_VOUT_OVUV_DIV);
drivers/hwmon/pmbus/mp9941.c
158
ret = DIV_ROUND_CLOSEST((ret & GENMASK(9, 0)) * MP9941_READ_VIN_UINT,
drivers/hwmon/pmbus/mp9941.c
174
ret = DIV_ROUND_CLOSEST((ret & GENMASK(7, 0)) * MP9941_VIN_LIMIT_UINT,
drivers/hwmon/pmbus/mp9941.c
227
DIV_ROUND_CLOSEST(word * MP9941_VIN_LIMIT_DIV,
drivers/hwmon/pmbus/mp9941.c
234
DIV_ROUND_CLOSEST(word, data->vid_resolution));
drivers/hwmon/pmbus/mp9945.c
116
ret = DIV_ROUND_CLOSEST((ret & GENMASK(11, 0)) * 39, 20);
drivers/hwmon/pmbus/mp9945.c
65
ret = DIV_ROUND_CLOSEST(ret * 125, 64);
drivers/hwmon/pmbus/pmbus_core.c
3264
int val = DIV_ROUND_CLOSEST(min_uv, 1000); /* convert to mV */
drivers/hwmon/pmbus/pmbus_core.c
3314
val = DIV_ROUND_CLOSEST(rdev->desc->min_uV +
drivers/hwmon/pmbus/pmbus_core.c
876
rv = DIV_ROUND_CLOSEST(160000 - (val - 2) * 625, 100);
drivers/hwmon/pmbus/pmbus_core.c
892
rv = DIV_ROUND_CLOSEST(155000 - val * 625, 100);
drivers/hwmon/pmbus/pmbus_core.c
944
val = DIV_ROUND_CLOSEST(val, 1000L);
drivers/hwmon/pmbus/pmbus_core.c
968
mantissa = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/pmbus/stpddc60.c
53
offset = DIV_ROUND_CLOSEST(abs(l - v), 50);
drivers/hwmon/pmbus/tps25990.c
187
ret = DIV_ROUND_CLOSEST(ret * TPS25990_VIN_OVF_NUM,
drivers/hwmon/pmbus/tps25990.c
201
ret = DIV_ROUND_CLOSEST(ret * TPS25990_IIN_OCF_NUM,
drivers/hwmon/pmbus/tps25990.c
250
value = DIV_ROUND_CLOSEST(((unsigned int)value) * TPS25990_VIN_OVF_DIV,
drivers/hwmon/pmbus/tps25990.c
258
value = DIV_ROUND_CLOSEST(((unsigned int)value) * TPS25990_IIN_OCF_DIV,
drivers/hwmon/pmbus/xdp710.c
102
info->m[PSC_POWER] = DIV_ROUND_CLOSEST(m * rsense >> cs_rng, 1000);
drivers/hwmon/pmbus/xdp710.c
99
info->m[PSC_CURRENT_OUT] = DIV_ROUND_CLOSEST(m * rsense >> cs_rng, 1000);
drivers/hwmon/pmbus/xdpe12284.c
52
return 1 + DIV_ROUND_CLOSEST(val - 500, 10);
drivers/hwmon/pmbus/xdpe12284.c
56
return 1 + DIV_ROUND_CLOSEST(val - 250, 5);
drivers/hwmon/pmbus/xdpe12284.c
60
return 1 + DIV_ROUND_CLOSEST(val - 200, 10);
drivers/hwmon/pmbus/xdpe12284.c
64
return DIV_ROUND_CLOSEST((1550 - val) * 100,
drivers/hwmon/pmbus/zl6100.c
109
mantissa = DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/pmbus/zl6100.c
171
ret = zl6100_d2l(DIV_ROUND_CLOSEST(zl6100_l2d(ret) * 9, 10));
drivers/hwmon/pmbus/zl6100.c
174
ret = zl6100_d2l(DIV_ROUND_CLOSEST(zl6100_l2d(ret) * 11, 10));
drivers/hwmon/pmbus/zl6100.c
226
word = zl6100_d2l(DIV_ROUND_CLOSEST(zl6100_l2d(word) * 10, 9));
drivers/hwmon/pmbus/zl6100.c
235
word = zl6100_d2l(DIV_ROUND_CLOSEST(zl6100_l2d(word) * 10, 11));
drivers/hwmon/sch5627.c
390
*val = DIV_ROUND_CLOSEST(data->in[channel] * SCH5627_REG_IN_FACTOR[channel],
drivers/hwmon/sch5636.c
176
val = DIV_ROUND_CLOSEST(
drivers/hwmon/sparx5-temp.c
58
value = DIV_ROUND_CLOSEST(value * 3522, 4096) - 1094;
drivers/hwmon/spd5118.c
96
return (DIV_ROUND_CLOSEST(temp, SPD5118_TEMP_UNIT) & 0x7ff) << 2;
drivers/hwmon/stts751.c
113
return DIV_ROUND_CLOSEST(val, 125) * 32;
drivers/hwmon/tmp103.c
48
return DIV_ROUND_CLOSEST(val, 1000);
drivers/hwmon/tmp401.c
272
return DIV_ROUND_CLOSEST(temp * 125, 32);
drivers/hwmon/tmp401.c
284
return DIV_ROUND_CLOSEST(temp * (1 << (8 - zbits)), 1000) << zbits;
drivers/hwmon/tmp421.c
122
return DIV_ROUND_CLOSEST(temp * 1000, 256);
drivers/hwmon/tmp464.c
105
return DIV_ROUND_CLOSEST((reg >> 3) * 625, 10);
drivers/hwmon/tmp464.c
110
return DIV_ROUND_CLOSEST(temp, 500) << 6;
drivers/hwmon/tmp464.c
115
return DIV_ROUND_CLOSEST(temp * 10, 625) << 3;
drivers/hwmon/tmp464.c
311
DIV_ROUND_CLOSEST(val, 1000) << 7);
drivers/hwmon/tmp513.c
210
*val = DIV_ROUND_CLOSEST(*val * 10 * (long)MILLI, (long)data->shunt_uohms);
drivers/hwmon/tmp513.c
227
*val = DIV_ROUND_CLOSEST(*val, (long)MILLI);
drivers/hwmon/tmp513.c
239
*val = DIV_ROUND_CLOSEST(*val * 625, 10);
drivers/hwmon/tmp513.c
267
val = DIV_ROUND_CLOSEST(val * (long)data->shunt_uohms, 10 * (long)MILLI);
drivers/hwmon/tmp513.c
277
val = clamp_val(DIV_ROUND_CLOSEST(val, 4), 0, max_val);
drivers/hwmon/tmp513.c
281
regval = clamp_val(DIV_ROUND_CLOSEST(val, data->pwr_lsb_uw), 0,
drivers/hwmon/tmp513.c
290
regval = DIV_ROUND_CLOSEST(val * 10, 625) << TMP51X_TEMP_SHIFT;
drivers/hwmon/tmp513.c
295
regval = DIV_ROUND_CLOSEST(val, 500);
drivers/hwmon/tmp513.c
569
DIV_ROUND_CLOSEST(40960, div));
drivers/hwmon/tsc1641.c
145
rshunt_reg = DIV_ROUND_CLOSEST(val, TSC1641_RSHUNT_LSB_UOHM);
drivers/hwmon/tsc1641.c
151
data->current_lsb_ua = DIV_ROUND_CLOSEST(TSC1641_VSHUNT_LSB_NVOLT * 1000,
drivers/hwmon/tsc1641.c
174
return DIV_ROUND_CLOSEST(conv_time, 1000);
drivers/hwmon/tsc1641.c
333
*val = DIV_ROUND_CLOSEST((s16)regval * data->current_lsb_ua, 1000);
drivers/hwmon/tsc1641.c
417
regval = DIV_ROUND_CLOSEST(val, TSC1641_VLOAD_LSB_MVOLT);
drivers/hwmon/tsc1641.c
442
regval = DIV_ROUND_CLOSEST(val * 1000, data->current_lsb_ua);
drivers/hwmon/tsc1641.c
463
regval = DIV_ROUND_CLOSEST(val, TSC1641_POWER_LSB_UWATT);
drivers/hwmon/tsc1641.c
481
regval = DIV_ROUND_CLOSEST(val, TSC1641_TEMP_LSB_MDEGC);
drivers/hwmon/w83627ehf.c
293
return DIV_ROUND_CLOSEST(reg * scale_in[nr], 100);
drivers/hwmon/w83627ehf.c
298
return clamp_val(DIV_ROUND_CLOSEST(val * 100, scale_in[nr]), 0, 255);
drivers/hwmon/w83627ehf.c
806
val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127);
drivers/hwmon/w83627ehf.c
898
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 127000), 1000);
drivers/hwmon/w83627ehf.c
923
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 15000), 1000);
drivers/hwmon/w83791d.c
244
#define TEMP23_TO_REG(val) (DIV_ROUND_CLOSEST(clamp_val((val), -128000, \
drivers/hwmon/w83791d.c
248
#define TARGET_TEMP_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), 0, 127000), \
drivers/hwmon/w83791d.c
252
#define TOL_TEMP_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), 0, 15000), \
drivers/hwmon/w83795.c
307
reg1 = clamp_val(DIV_ROUND_CLOSEST(base_clock, val), 1, 128);
drivers/hwmon/w83l786ng.c
525
val = DIV_ROUND_CLOSEST(val, 0x11);
drivers/hwmon/wm831x-hwmon.c
41
return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(ret, 1000));
drivers/hwmon/wm831x-hwmon.c
57
ret = DIV_ROUND_CLOSEST(ret * 10000, 10983);
drivers/hwmon/wm8350-hwmon.c
33
val = DIV_ROUND_CLOSEST(val, 1000);
drivers/i2c/busses/i2c-mxs.c
747
low_count = DIV_ROUND_CLOSEST(divider * 13, (13 + 6));
drivers/i2c/busses/i2c-mxs.c
748
high_count = DIV_ROUND_CLOSEST(divider * 6, (13 + 6));
drivers/i2c/busses/i2c-mxs.c
753
low_count = DIV_ROUND_CLOSEST(divider * 47, (47 + 40));
drivers/i2c/busses/i2c-mxs.c
754
high_count = DIV_ROUND_CLOSEST(divider * 40, (47 + 40));
drivers/i2c/busses/i2c-rcar.c
342
round = DIV_ROUND_CLOSEST(ick, 1000000);
drivers/i2c/busses/i2c-rcar.c
343
round = DIV_ROUND_CLOSEST(round * sum, 1000);
drivers/i2c/busses/i2c-stm32f7.c
467
u32 i2cclk = DIV_ROUND_CLOSEST(NSEC_PER_SEC,
drivers/i2c/busses/i2c-stm32f7.c
469
u32 i2cbus = DIV_ROUND_CLOSEST(NSEC_PER_SEC,
drivers/i2c/busses/i2c-stm32f7.c
499
i2c_dev->dnf = DIV_ROUND_CLOSEST(i2c_dev->dnf_dt, i2cclk);
drivers/i2c/busses/i2c-tegra.c
1424
xfer_time += DIV_ROUND_CLOSEST(((xfer_size * 9) + 2) * MSEC_PER_SEC,
drivers/iio/accel/adxl313_core.c
822
regval = DIV_ROUND_CLOSEST(MICRO * val + val2, 15625);
drivers/iio/accel/adxl345_core.c
1315
val = DIV_ROUND_CLOSEST(val * MICRO + val2, 62500);
drivers/iio/accel/adxl345_core.c
408
DIV_ROUND_CLOSEST(val_fract, 5));
drivers/iio/accel/adxl345_core.c
897
regval = DIV_ROUND_CLOSEST(val_us, 625);
drivers/iio/accel/adxl345_core.c
899
regval = DIV_ROUND_CLOSEST(val_us, 1250);
drivers/iio/accel/adxl367.c
525
return DIV_ROUND_CLOSEST(ms * freq_dhz, 10000);
drivers/iio/accel/adxl372.c
482
reg_val = DIV_ROUND_CLOSEST(act_time_ms * 1000, scale_factor);
drivers/iio/accel/adxl372.c
512
res = DIV_ROUND_CLOSEST(inact_time_ms, scale_factor);
drivers/iio/accel/adxl380.c
372
reg_val = DIV_ROUND_CLOSEST(us, 1250);
drivers/iio/accel/adxl380.c
413
reg_val = DIV_ROUND_CLOSEST(us, 625);
drivers/iio/accel/adxl380.c
460
st->lpf_tbl[i] = DIV_ROUND_CLOSEST(odr, adxl380_lpf_div[i]);
drivers/iio/accel/adxl380.c
660
reg_val = min(DIV_ROUND_CLOSEST(ms * 1000, 500), ADXL380_TIME_MAX);
drivers/iio/adc/88pm886-gpadc.c
221
ret = DIV_ROUND_CLOSEST(raw_uV, raw_uA);
drivers/iio/adc/ad4000.c
569
st->scale_tbl[1][1] = DIV_ROUND_CLOSEST(abs(tmp1) * 4, 5);
drivers/iio/adc/ad4000.c
571
st->scale_tbl[1][1] = DIV_ROUND_CLOSEST(abs(tmp1) * 9, 10);
drivers/iio/adc/ad4062.c
830
const u32 reg_val = DIV_ROUND_CLOSEST(gain_fp * mon_val, micro);
drivers/iio/adc/ad4080.c
272
*val = DIV_ROUND_CLOSEST(st->clk_rate, dec_rate);
drivers/iio/adc/ad4170-4.c
1308
*val2 = DIV_ROUND_CLOSEST(chan_info->scale_tbl[pga][1] * MILLI, 477) *
drivers/iio/adc/ad7124.c
368
odr_sel_bits = clamp(DIV_ROUND_CLOSEST(fclk, divisor), 1, 2047);
drivers/iio/adc/ad7124.c
879
res = DIV_ROUND_CLOSEST(vref, full_scale);
drivers/iio/adc/ad7124.c
880
gain = DIV_ROUND_CLOSEST(res, val2);
drivers/iio/adc/ad7173.c
299
u32 div = DIV_ROUND_CLOSEST(MEGA * MILLI, odr_millihz * 32 * 3);
drivers/iio/adc/ad7192.c
763
return DIV_ROUND_CLOSEST(st->fclk,
drivers/iio/adc/ad7192.c
771
return DIV_ROUND_CLOSEST(st->fclk,
drivers/iio/adc/ad7192.c
781
st->filter_freq_avail[0][0] = DIV_ROUND_CLOSEST(fadc * 240, 1024);
drivers/iio/adc/ad7192.c
784
st->filter_freq_avail[1][0] = DIV_ROUND_CLOSEST(fadc * 240, 1024);
drivers/iio/adc/ad7192.c
787
st->filter_freq_avail[2][0] = DIV_ROUND_CLOSEST(fadc * 230, 1024);
drivers/iio/adc/ad7192.c
790
st->filter_freq_avail[3][0] = DIV_ROUND_CLOSEST(fadc * 272, 1024);
drivers/iio/adc/ad7192.c
880
return DIV_ROUND_CLOSEST(fadc * 240, 1024);
drivers/iio/adc/ad7192.c
882
return DIV_ROUND_CLOSEST(fadc * 272, 1024);
drivers/iio/adc/ad7192.c
884
return DIV_ROUND_CLOSEST(fadc * 230, 1024);
drivers/iio/adc/ad7192.c
939
*val = DIV_ROUND_CLOSEST(ad7192_get_f_adc(st), 1024);
drivers/iio/adc/ad7606.c
1379
DIV_ROUND_CLOSEST(ci->r_gain,
drivers/iio/adc/ad7625.c
216
target = DIV_ROUND_CLOSEST(st->ref_clk_rate_hz, freq);
drivers/iio/adc/ad7625.c
217
st->sampling_freq_hz = DIV_ROUND_CLOSEST(st->ref_clk_rate_hz,
drivers/iio/adc/ad7768-1.c
1021
*val = DIV_ROUND_CLOSEST(temp, MILLI);
drivers/iio/adc/ad7768-1.c
423
freq_filtered = DIV_ROUND_CLOSEST(st->mclk_freq, st->oversampling_ratio);
drivers/iio/adc/ad7768-1.c
425
samp_freq_avail = DIV_ROUND_CLOSEST(freq_filtered, ad7768_mclk_div_rates[i]);
drivers/iio/adc/ad7768-1.c
712
gain_nano = DIV_ROUND_CLOSEST(st->vref_uv, tmp);
drivers/iio/adc/ad7768-1.c
864
mclk_div = DIV_ROUND_CLOSEST(st->mclk_freq, freq * st->oversampling_ratio);
drivers/iio/adc/ad7768-1.c
873
st->samp_freq = DIV_ROUND_CLOSEST(st->mclk_freq,
drivers/iio/adc/ad7780.c
161
gain = DIV_ROUND_CLOSEST(gain, val2);
drivers/iio/adc/ina2xx-adc.c
222
*val = DIV_ROUND_CLOSEST(1000000, SAMPLING_PERIOD(chip));
drivers/iio/adc/max11410.c
556
val2 = val2 * DIV_ROUND_CLOSEST(BIT(24), 1000000);
drivers/iio/adc/max11410.c
557
val2 = DIV_ROUND_CLOSEST(scale_avail[0], val2);
drivers/iio/adc/max77541-adc.c
35
*val = DIV_ROUND_CLOSEST(ABSOLUTE_ZERO_MILLICELSIUS, 1725);
drivers/iio/adc/meson_saradc.c
726
*val = DIV_ROUND_CLOSEST(MESON_SAR_ADC_TEMP_OFFSET *
drivers/iio/adc/pac1921.c
271
int vsense_lsb = DIV_ROUND_CLOSEST(max, PAC1921_RES_RESOLUTION);
drivers/iio/adc/sc27xx_adc.c
643
return DIV_ROUND_CLOSEST(volt * fract.denominator, fract.numerator);
drivers/iio/adc/stm32-dfsdm-adc.c
760
oversamp = DIV_ROUND_CLOSEST(spi_freq, sample_freq);
drivers/iio/adc/ti-ads1100.c
146
gain = DIV_ROUND_CLOSEST(microvolts, BIT(15)) * MILLI / val2;
drivers/iio/adc/ti-ads1119.c
227
wait_time = DIV_ROUND_CLOSEST(MICRO, 5 * datarate);
drivers/iio/addac/ad74115.c
1653
val = DIV_ROUND_CLOSEST(val, AD74115_DIN_SINK_LOW_STEP);
drivers/iio/addac/ad74115.c
1655
val = DIV_ROUND_CLOSEST(val, AD74115_DIN_SINK_HIGH_STEP);
drivers/iio/addac/ad74115.c
821
wait_time = DIV_ROUND_CLOSEST(AD74115_CONV_TIME_US, rate);
drivers/iio/addac/ad74413r.c
886
*val = DIV_ROUND_CLOSEST(adc_result * 2100,
drivers/iio/amplifiers/ada4250.c
105
x[i + 2] = DIV_ROUND_CLOSEST(x[1] * 1000, lsb_coeff[i]);
drivers/iio/amplifiers/ada4250.c
136
offset_raw = DIV_ROUND_CLOSEST(abs(offset_uv), vlsb);
drivers/iio/amplifiers/ada4250.c
95
voltage_v = DIV_ROUND_CLOSEST(st->avdd_uv, MICRO);
drivers/iio/amplifiers/hmc425a.c
109
*code = ~(DIV_ROUND_CLOSEST(gain, LTC6373_CONVERSION_CONSTANT) + 3)
drivers/iio/chemical/bme680_core.c
550
heatr_res = DIV_ROUND_CLOSEST(heatr_res_x100, 100);
drivers/iio/dac/ad3552r-common.c
150
ch_data->scale_dec = DIV_ROUND_CLOSEST((s64)rem * 1000000, 65536);
drivers/iio/dac/ad3552r-hs.c
126
*val = DIV_ROUND_CLOSEST(st->data->bus_sample_data_clock_hz *
drivers/iio/dac/ad9739a.c
290
fsc_raw = DIV_ROUND_CLOSEST(fsc * 10 - 85800, 226);
drivers/iio/dac/ltc2688.c
169
*val = DIV_ROUND_CLOSEST(fs * st->vref, 4096);
drivers/iio/dac/ltc2688.c
722
chan->dither_frequency[f] = DIV_ROUND_CLOSEST(rate, ltc2688_period[f]);
drivers/iio/frequency/adf4371.c
552
tmp = DIV_ROUND_CLOSEST(st->fpfd, 1000000U);
drivers/iio/gyro/adis16080.c
118
*val = DIV_ROUND_CLOSEST(25 * 585, 85 - 25);
drivers/iio/gyro/mpu3050-core.c
389
DIV_ROUND_CLOSEST(mpu3050_fs_precision[0] * 1000000 * 2,
drivers/iio/gyro/mpu3050-core.c
392
DIV_ROUND_CLOSEST(mpu3050_fs_precision[1] * 1000000 * 2,
drivers/iio/gyro/mpu3050-core.c
395
DIV_ROUND_CLOSEST(mpu3050_fs_precision[2] * 1000000 * 2,
drivers/iio/gyro/mpu3050-core.c
398
DIV_ROUND_CLOSEST(mpu3050_fs_precision[3] * 1000000 * 2,
drivers/iio/gyro/mpu3050-core.c
421
mpu3050->divisor = DIV_ROUND_CLOSEST(8000, val) - 1;
drivers/iio/gyro/mpu3050-core.c
426
mpu3050->divisor = DIV_ROUND_CLOSEST(1000, val) - 1;
drivers/iio/imu/adis16475.c
318
*freq = DIV_ROUND_CLOSEST(sample_rate, dec + 1);
drivers/iio/imu/adis16475.c
385
dec = DIV_ROUND_CLOSEST(sample_rate, freq);
drivers/iio/imu/adis16480.c
386
t = DIV_ROUND_CLOSEST(sample_rate, t);
drivers/iio/imu/adis16480.c
419
freq = DIV_ROUND_CLOSEST(sample_rate, (t + 1));
drivers/iio/imu/adis16550.c
439
*freq = DIV_ROUND_CLOSEST(sample_rate, dec + 1);
drivers/iio/imu/adis16550.c
482
dec = DIV_ROUND_CLOSEST(sample_rate, freq_hz);
drivers/iio/imu/adis16550.c
618
*val = DIV_ROUND_CLOSEST(25000, st->info->temp_scale);
drivers/iio/imu/adis16550.c
946
sync_scale = DIV_ROUND_CLOSEST(st->info->int_clk, st->clk_freq_hz);
drivers/iio/light/ltr390.c
204
return DIV_ROUND_CLOSEST(23 * data->gain * data->int_time_us, 10 * orig_gain * orig_int_time);
drivers/iio/light/tsl2563.c
359
return (int)DIV_ROUND_CLOSEST(calib * CALIB_BASE_SYSFS, BIT(CALIB_FRAC_BITS));
drivers/iio/light/tsl2583.c
288
lux = DIV_ROUND_CLOSEST(lux, 1000);
drivers/iio/light/tsl2583.c
372
als_count = DIV_ROUND_CLOSEST(chip->als_settings.als_time * 100, 270);
drivers/iio/light/tsl2583.c
377
als_time = DIV_ROUND_CLOSEST(als_count * 27, 10);
drivers/iio/light/tsl2583.c
391
chip->als_time_scale = DIV_ROUND_CLOSEST(als_time, 50);
drivers/iio/light/vl6180.c
448
it_ms = DIV_ROUND_CLOSEST(val2, 1000); /* round to ms */
drivers/iio/light/vl6180.c
471
unsigned int period = DIV_ROUND_CLOSEST(1000 * 1000, mhz);
drivers/iio/light/vl6180.c
475
reg_val = period < 2550 ? (DIV_ROUND_CLOSEST(period, 10) - 1) : 254;
drivers/input/touchscreen/ads7846.c
877
Rt = DIV_ROUND_CLOSEST(Rt, 16);
drivers/input/touchscreen/ads7846.c
880
Rt = DIV_ROUND_CLOSEST(Rt, 256);
drivers/input/touchscreen/bu21029_ts.c
198
rz = DIV_ROUND_CLOSEST(rz, SCALE_12BIT);
drivers/input/touchscreen/elants_i2c.c
1511
ts->x_res = DIV_ROUND_CLOSEST(ts->prop.max_x, ts->phy_x);
drivers/input/touchscreen/elants_i2c.c
1512
ts->y_res = DIV_ROUND_CLOSEST(ts->prop.max_y, ts->phy_y);
drivers/input/touchscreen/elants_i2c.c
578
ts->x_res = DIV_ROUND_CLOSEST(ts->x_max, phy_x);
drivers/input/touchscreen/elants_i2c.c
580
ts->y_res = DIV_ROUND_CLOSEST(ts->y_max, phy_y);
drivers/input/touchscreen/resistive-adc-touch.c
78
Rt = DIV_ROUND_CLOSEST(Rt, 16);
drivers/input/touchscreen/resistive-adc-touch.c
81
Rt = DIV_ROUND_CLOSEST(Rt, 256);
drivers/input/touchscreen/wdt87xx_i2c.c
1025
unsigned int res = DIV_ROUND_CLOSEST(MAX_UNIT_AXIS, wdt->param.phy_w);
drivers/input/touchscreen/wdt87xx_i2c.c
467
param->max_y = DIV_ROUND_CLOSEST(MAX_UNIT_AXIS * param->phy_h,
drivers/input/touchscreen/wdt87xx_i2c.c
973
y = DIV_ROUND_CLOSEST(y * param->phy_h, param->phy_w);
drivers/leds/led-class-multicolor.c
22
DIV_ROUND_CLOSEST(brightness *
drivers/leds/leds-aw200xx.c
301
imax = DIV_ROUND_CLOSEST(imax, 100) * 100;
drivers/leds/leds-ipaq-micro.c
93
msg.tx_data[2] = (u8) DIV_ROUND_CLOSEST(*delay_on, 100);
drivers/leds/leds-ipaq-micro.c
97
msg.tx_data[3] = (u8) DIV_ROUND_CLOSEST(*delay_off, 100);
drivers/leds/leds-mt6323.c
326
duty_hw = DIV_ROUND_CLOSEST(*delay_on * 100000ul, period * spec->unit_duty);
drivers/leds/leds-pca963x.c
245
return scaling ? DIV_ROUND_CLOSEST(val * scaling, 1000) : val;
drivers/leds/rgb/leds-group-multicolor.c
45
mono_brightness = DIV_ROUND_CLOSEST(brightness * intensity * mono_max_brightness,
drivers/media/cec/platform/meson/ao-cec-g12a.c
246
f1 = DIV_ROUND_CLOSEST(parent_rate, n1);
drivers/media/cec/platform/meson/ao-cec-g12a.c
247
f2 = DIV_ROUND_CLOSEST(parent_rate, n2);
drivers/media/cec/platform/meson/ao-cec-g12a.c
249
p1 = DIV_ROUND_CLOSEST(100000000 * m1, f1 * (m1 + m2));
drivers/media/cec/platform/meson/ao-cec-g12a.c
250
p2 = DIV_ROUND_CLOSEST(100000000 * m2, f2 * (m1 + m2));
drivers/media/cec/platform/meson/ao-cec-g12a.c
257
return DIV_ROUND_CLOSEST(parent_rate, n1);
drivers/media/dvb-frontends/cxd2841er.c
363
reg_value = DIV_ROUND_CLOSEST(symbol_rate * 16384, 1000);
drivers/media/dvb-frontends/dib7000p.c
1207
int f_rel = DIV_ROUND_CLOSEST(rf_khz, xtal) * xtal - rf_khz;
drivers/media/dvb-frontends/horus3a.c
187
frequency = DIV_ROUND_CLOSEST(frequency, 1000) * 1000;
drivers/media/dvb-frontends/horus3a.c
196
ms = DIV_ROUND_CLOSEST((frequency * mixdiv) / 2, 1000);
drivers/media/dvb-frontends/m88ds3103.c
238
itmp = DIV_ROUND_CLOSEST(itmp, 8 * M88DS3103_SNR_ITERATIONS);
drivers/media/dvb-frontends/m88ds3103.c
988
s32tmp = DIV_ROUND_CLOSEST(s32tmp, dev->mclk / 1000);
drivers/media/dvb-frontends/mt312.c
185
DIV_ROUND_CLOSEST(monitor * 15625, 4));
drivers/media/dvb-frontends/mt312.c
289
buf[0] = DIV_ROUND_CLOSEST(state->xtal * state->freq_mult * 2, 1000000);
drivers/media/dvb-frontends/mt312.c
292
buf[1] = DIV_ROUND_CLOSEST(state->xtal, 22000 * 4);
drivers/media/dvb-frontends/mt312.c
608
sr = DIV_ROUND_CLOSEST(p->symbol_rate * 4, 15625);
drivers/media/dvb-frontends/stb6100.c
388
nfrac = DIV_ROUND_CLOSEST((fvco - (nint * state->reference << psd2))
drivers/media/dvb-frontends/tda10021.c
176
ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, FIN);
drivers/media/dvb-frontends/ts2020.c
205
div_ref = DIV_ROUND_CLOSEST(f_ref_khz, 2000);
drivers/media/dvb-frontends/ves1820.c
157
ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, fin);
drivers/media/i2c/cx25840/cx25840-ir.c
142
DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, freq * 16));
drivers/media/i2c/cx25840/cx25840-ir.c
147
return DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, (divider + 1) * 16);
drivers/media/i2c/cx25840/cx25840-ir.c
153
return DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ,
drivers/media/i2c/cx25840/cx25840-ir.c
176
DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000));
drivers/media/i2c/cx25840/cx25840-ir.c
182
return DIV_ROUND_CLOSEST(count * 1000,
drivers/media/i2c/cx25840/cx25840-ir.c
189
return DIV_ROUND_CLOSEST(count, CX25840_IR_REFCLK_FREQ / 1000000);
drivers/media/i2c/cx25840/cx25840-ir.c
202
return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000,
drivers/media/i2c/cx25840/cx25840-ir.c
363
if (*carrier_range_low < DIV_ROUND_CLOSEST(c16, 16 + 3)) {
drivers/media/i2c/cx25840/cx25840-ir.c
365
*carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 4);
drivers/media/i2c/cx25840/cx25840-ir.c
368
*carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 3);
drivers/media/i2c/cx25840/cx25840-ir.c
371
if (*carrier_range_high > DIV_ROUND_CLOSEST(c16, 16 - 3)) {
drivers/media/i2c/cx25840/cx25840-ir.c
373
*carrier_range_high = DIV_ROUND_CLOSEST(c16, 16 - 4);
drivers/media/i2c/cx25840/cx25840-ir.c
376
*carrier_range_high = DIV_ROUND_CLOSEST(c16, 16 - 3);
drivers/media/i2c/cx25840/cx25840-ir.c
442
n = DIV_ROUND_CLOSEST(duty_cycle * 100, 625); /* 16ths of 100% */
drivers/media/i2c/cx25840/cx25840-ir.c
448
return DIV_ROUND_CLOSEST((n + 1) * 100, 16);
drivers/media/i2c/imx296.c
705
hratio = DIV_ROUND_CLOSEST(crop->width, width);
drivers/media/i2c/imx296.c
706
vratio = DIV_ROUND_CLOSEST(crop->height, height);
drivers/media/i2c/ir-kbd-i2c.c
541
code_block->carrier_pulse = DIV_ROUND_CLOSEST(
drivers/media/i2c/ir-kbd-i2c.c
543
code_block->carrier_space = DIV_ROUND_CLOSEST(
drivers/media/i2c/ir-kbd-i2c.c
559
l = DIV_ROUND_CLOSEST((XTAL_FREQ / 1000) * txbuf[i], 40000);
drivers/media/i2c/mt9m111.c
1093
fps = DIV_ROUND_CLOSEST(fract->denominator, fract->numerator);
drivers/media/i2c/mt9m114.c
1265
hscale = DIV_ROUND_CLOSEST(crop->width, fmt->format.width ? : 1);
drivers/media/i2c/mt9m114.c
1266
vscale = DIV_ROUND_CLOSEST(crop->height, fmt->format.height ? : 1);
drivers/media/i2c/mt9p031.c
433
xskip = DIV_ROUND_CLOSEST(crop->width, format->width);
drivers/media/i2c/mt9p031.c
434
yskip = DIV_ROUND_CLOSEST(crop->height, format->height);
drivers/media/i2c/mt9p031.c
612
hratio = DIV_ROUND_CLOSEST(__crop->width, width);
drivers/media/i2c/mt9p031.c
613
vratio = DIV_ROUND_CLOSEST(__crop->height, height);
drivers/media/i2c/mt9v111.c
1192
DIV_ROUND_CLOSEST(mt9v111->sysclk, 2), 1,
drivers/media/i2c/mt9v111.c
1193
DIV_ROUND_CLOSEST(mt9v111->sysclk, 2));
drivers/media/i2c/mt9v111.c
489
pclk = DIV_ROUND_CLOSEST(mt9v111->sysclk, 2);
drivers/media/i2c/mt9v111.c
500
unsigned int t_fps = DIV_ROUND_CLOSEST(pclk, t_frame);
drivers/media/i2c/mt9v111.c
544
ret = mt9v111->sysclk < DIV_ROUND_CLOSEST(MT9V111_MAX_CLKIN, 2) ?
drivers/media/i2c/mt9v111.c
762
DIV_ROUND_CLOSEST(MT9V111_MAX_CLKIN, 2) ? 15 :
drivers/media/i2c/ov5640.c
2767
fps = clamp_val(DIV_ROUND_CLOSEST(fi->denominator, fi->numerator),
drivers/media/i2c/ov5693.c
1011
unsigned int fps = DIV_ROUND_CLOSEST(OV5693_PIXEL_RATE, framesize);
drivers/media/i2c/ov5693.c
837
DIV_ROUND_CLOSEST(crop->width, width), 1, 2);
drivers/media/i2c/ov5693.c
839
DIV_ROUND_CLOSEST(crop->height, height), 1, 2);
drivers/media/i2c/ov772x.c
699
div = DIV_ROUND_CLOSEST(pll_out, pclk);
drivers/media/i2c/ov772x.c
700
t_pclk = DIV_ROUND_CLOSEST(fin * pll_mult, div);
drivers/media/i2c/ov8865.c
2853
fps = DIV_ROUND_CLOSEST(sensor->ctrls.pixel_rate->val, framesize);
drivers/media/i2c/tc358743.c
335
return DIV_ROUND_CLOSEST((unsigned)t->pixelclock,
drivers/media/i2c/tc358743.c
377
DIV_ROUND_CLOSEST(10000, frame_interval) : 0;
drivers/media/i2c/tc358746.c
944
fin = DIV_ROUND_CLOSEST(refclk, p);
drivers/media/i2c/thp7312.c
781
? DIV_ROUND_CLOSEST(fi->interval.denominator, fi->interval.numerator)
drivers/media/i2c/vd55g1.c
934
u8 d_gain = DIV_ROUND_CLOSEST(sensor->dgain_ctrl->val, 1 << 8);
drivers/media/i2c/vd55g1.c
935
u8 a_gain = DIV_ROUND_CLOSEST(32, (32 - sensor->again_ctrl->val));
drivers/media/i2c/vd56g3.c
562
DIV_ROUND_CLOSEST((int)vd56g3_ev_bias_qmenu[ctrl->val] *
drivers/media/pci/cx23885/cx23888-ir.c
181
DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, freq * 16));
drivers/media/pci/cx23885/cx23888-ir.c
186
return DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, (divider + 1) * 16);
drivers/media/pci/cx23885/cx23888-ir.c
192
return DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ,
drivers/media/pci/cx23885/cx23888-ir.c
215
DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000));
drivers/media/pci/cx23885/cx23888-ir.c
221
return DIV_ROUND_CLOSEST(count * 1000,
drivers/media/pci/cx23885/cx23888-ir.c
228
return DIV_ROUND_CLOSEST(count, CX23888_IR_REFCLK_FREQ / 1000000);
drivers/media/pci/cx23885/cx23888-ir.c
241
return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000,
drivers/media/pci/cx23885/cx23888-ir.c
376
if (*carrier_range_low < DIV_ROUND_CLOSEST(c16, 16 + 3)) {
drivers/media/pci/cx23885/cx23888-ir.c
378
*carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 4);
drivers/media/pci/cx23885/cx23888-ir.c
381
*carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 3);
drivers/media/pci/cx23885/cx23888-ir.c
384
if (*carrier_range_high > DIV_ROUND_CLOSEST(c16, 16 - 3)) {
drivers/media/pci/cx23885/cx23888-ir.c
386
*carrier_range_high = DIV_ROUND_CLOSEST(c16, 16 - 4);
drivers/media/pci/cx23885/cx23888-ir.c
389
*carrier_range_high = DIV_ROUND_CLOSEST(c16, 16 - 3);
drivers/media/pci/cx23885/cx23888-ir.c
462
n = DIV_ROUND_CLOSEST(duty_cycle * 100, 625); /* 16ths of 100% */
drivers/media/pci/cx23885/cx23888-ir.c
468
return DIV_ROUND_CLOSEST((n + 1) * 100, 16);
drivers/media/pci/pluto2/pluto2.c
430
return DIV_ROUND_CLOSEST(numerator, denominator);
drivers/media/platform/amphion/vpu_windsor.c
1037
return DIV_ROUND_CLOSEST(bitrate, WINDSOR_BITRATE_UNIT);
drivers/media/platform/chips-media/coda/coda-jpeg.c
1001
temp = DIV_ROUND_CLOSEST((unsigned int)q_tab[i] * scale, 100);
drivers/media/platform/microchip/microchip-isc-clk.c
119
return DIV_ROUND_CLOSEST(parent_rate, isc_clk->div + 1);
drivers/media/platform/microchip/microchip-isc-clk.c
146
rate = DIV_ROUND_CLOSEST(parent_rate, div);
drivers/media/platform/microchip/microchip-isc-clk.c
207
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/media/platform/ti/omap3isp/isp.c
235
divider = DIV_ROUND_CLOSEST(parent_rate, *rate);
drivers/media/platform/verisilicon/hantro_jpeg.c
177
temp = DIV_ROUND_CLOSEST((unsigned int)qp * scale, 100);
drivers/media/platform/verisilicon/hantro_postproc.c
117
return DIV_ROUND_CLOSEST(ctx->src_fmt.width, ctx->dst_fmt.width);
drivers/media/rc/ene_ir.c
635
dev->tx_sample = DIV_ROUND_CLOSEST(sample, sample_period);
drivers/media/rc/gpio-ir-tx.c
106
pulse = DIV_ROUND_CLOSEST(gpio_ir->duty_cycle * (NSEC_PER_SEC / 100),
drivers/media/rc/gpio-ir-tx.c
108
space = DIV_ROUND_CLOSEST((100 - gpio_ir->duty_cycle) *
drivers/media/rc/iguanair.c
285
cycles = DIV_ROUND_CLOSEST(24000000, carrier * 2) -
drivers/media/rc/iguanair.c
331
periods = DIV_ROUND_CLOSEST(txbuf[i] * ir->carrier, 1000000);
drivers/media/rc/ir-hix5hd2.c
146
rate = DIV_ROUND_CLOSEST(priv->rate, 1000000);
drivers/media/rc/ir_toy.c
314
u16 v = DIV_ROUND_CLOSEST(txbuf[i], UNIT_US);
drivers/media/rc/ir_toy.c
380
buf[1] = DIV_ROUND_CLOSEST(48000000, 16 * carrier) - 1;
drivers/media/rc/ite-cir.c
203
DIV_ROUND_CLOSEST(10000 * (high_freq - low_freq),
drivers/media/rc/ite-cir.c
79
freq = DIV_ROUND_CLOSEST(freq - ITE_LCF_MIN_CARRIER_FREQ, 1000);
drivers/media/rc/mceusb.c
709
period = DIV_ROUND_CLOSEST((1U << data[0] * 2) *
drivers/media/rc/meson-ir-tx.c
116
unsigned int tb_us = DIV_ROUND_CLOSEST(USEC_PER_SEC, ir->carrier);
drivers/media/rc/meson-ir-tx.c
118
delay = (DIV_ROUND_CLOSEST(time, tb_us) - 1) & IRB_DELAY_MASK;
drivers/media/rc/meson-ir-tx.c
140
delay = (DIV_ROUND_CLOSEST(time, tb_us) - 1) & IRB_DELAY_MASK;
drivers/media/rc/meson-ir-tx.c
81
unsigned int cnt = DIV_ROUND_CLOSEST(ir->clk_rate, ir->carrier);
drivers/media/rc/meson-ir-tx.c
82
unsigned int pulse_cnt = DIV_ROUND_CLOSEST(cnt * ir->duty_cycle, 100);
drivers/media/rc/mtk-cir.c
161
val = DIV_ROUND_CLOSEST(clk_get_rate(ir->bus),
drivers/media/rc/nuvoton-cir.c
259
val = DIV_ROUND_CLOSEST(val, SAMPLE_PERIOD);
drivers/media/rc/pwm-ir-tx.c
102
state.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, pwm_ir->carrier);
drivers/media/rc/pwm-ir-tx.c
72
state.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, pwm_ir->carrier);
drivers/media/rc/serial_ir.c
226
pulse = DIV_ROUND_CLOSEST(serial_ir.duty_cycle * (NSEC_PER_SEC / 100),
drivers/media/rc/serial_ir.c
228
space = DIV_ROUND_CLOSEST((100 - serial_ir.duty_cycle) *
drivers/media/rc/sunxi-cir.c
145
return DIV_ROUND_CLOSEST(USEC_PER_SEC * (ithr + 1),
drivers/media/rc/winbond-cir.c
318
.carrier = DIV_ROUND_CLOSEST(counter * 1000000u,
drivers/media/rc/winbond-cir.c
543
freq = DIV_ROUND_CLOSEST(carrier, 1000);
drivers/media/rc/winbond-cir.c
638
buf[i] = DIV_ROUND_CLOSEST(b[i], 10);
drivers/media/test-drivers/vivid/vivid-sdr-cap.c
531
src_phase_step = DIV_ROUND_CLOSEST(FIXP_2PI * BEEP_FREQ,
drivers/media/test-drivers/vivid/vivid-sdr-cap.c
567
*vbuf++ = DIV_ROUND_CLOSEST(fixp_i, FIXP_FRAC * 10);
drivers/media/test-drivers/vivid/vivid-sdr-cap.c
568
*vbuf++ = DIV_ROUND_CLOSEST(fixp_q, FIXP_FRAC * 10);
drivers/media/test-drivers/vivid/vivid-sdr-cap.c
575
*vbuf++ = DIV_ROUND_CLOSEST(fixp_i, FIXP_FRAC * 10);
drivers/media/test-drivers/vivid/vivid-sdr-cap.c
576
*vbuf++ = DIV_ROUND_CLOSEST(fixp_q, FIXP_FRAC * 10);
drivers/media/tuners/msi001.c
222
k_thresh = DIV_ROUND_CLOSEST(k_thresh, uitmp);
drivers/media/tuners/msi001.c
223
k_frac = DIV_ROUND_CLOSEST(k_frac, uitmp);
drivers/media/tuners/qm1d1b0004.c
118
word = DIV_ROUND_CLOSEST(frequency, pll);
drivers/media/tuners/qm1d1c0042.c
209
a = DIV_ROUND_CLOSEST(freq, state->cfg.xtal_freq);
drivers/media/tuners/tda18212.c
130
buf[3] = DIV_ROUND_CLOSEST(if_khz, 50);
drivers/media/tuners/tda18250.c
594
utmp = DIV_ROUND_CLOSEST(if_khz, 50);
drivers/media/usb/uvc/uvc_ctrl.c
2528
value = min + DIV_ROUND_CLOSEST((u32)(value - min), step) * step;
drivers/media/v4l2-core/tuner-core.c
1212
DIV_ROUND_CLOSEST(abs_freq * 2, 125) :
drivers/media/v4l2-core/tuner-core.c
1213
DIV_ROUND_CLOSEST(abs_freq, 62500);
drivers/media/v4l2-core/v4l2-dv-timings.c
791
hsync = DIV_ROUND_CLOSEST(hsync, GTF_CELL_GRAN) * GTF_CELL_GRAN;
drivers/mfd/sm501.c
422
diff = DIV_ROUND_CLOSEST(mclk, divider << shift) - freq;
drivers/mmc/host/dw_mmc-rockchip.c
143
delay = DIV_ROUND_CLOSEST(delay,
drivers/mmc/host/dw_mmc-rockchip.c
73
degrees += DIV_ROUND_CLOSEST(delay_num * factor, 1000000);
drivers/mmc/host/moxart-mmc.c
602
mmc->f_max = DIV_ROUND_CLOSEST(host->sysclk, 2);
drivers/mmc/host/moxart-mmc.c
603
mmc->f_min = DIV_ROUND_CLOSEST(host->sysclk, CLK_DIV_MASK * 2);
drivers/mmc/host/sdhci-of-arasan.c
285
freq = DIV_ROUND_CLOSEST(clock, 1000000);
drivers/net/dsa/b53/b53_common.c
2680
atc = DIV_ROUND_CLOSEST(msecs, 500);
drivers/net/dsa/b53/b53_common.c
2682
atc = DIV_ROUND_CLOSEST(msecs, 1000);
drivers/net/dsa/realtek/rtl8365mb.c
920
val = DIV_ROUND_CLOSEST(val, 300); /* convert to 0.3 ns step */
drivers/net/ethernet/broadcom/b44.c
1292
(DIV_ROUND_CLOSEST(ssb_clockspeed(sdev->bus),
drivers/net/ethernet/intel/libeth/xdp.c
371
quarter = DIV_ROUND_CLOSEST(count, 4);
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
140
return DIV_ROUND_CLOSEST(state * MLXSW_THERMAL_MAX_DUTY,
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
146
return DIV_ROUND_CLOSEST(duty * MLXSW_THERMAL_MAX_STATE,
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
4033
upper_bound = DIV_ROUND_CLOSEST(ecmp_size * weight, total);
drivers/net/ethernet/micrel/ksz884x.c
2019
num = DIV_ROUND_CLOSEST(num * 100, BROADCAST_STORM_VALUE);
drivers/net/ethernet/realtek/r8169_main.c
2241
return DIV_ROUND_CLOSEST(timer * BITS_PER_BYTE, speed);
drivers/net/ethernet/sfc/ptp.c
514
nic_minor = DIV_ROUND_CLOSEST(nic_minor, 4);
drivers/net/ethernet/sfc/ptp.c
515
correction = DIV_ROUND_CLOSEST(correction, 4);
drivers/net/ethernet/sfc/siena/ptp.c
527
nic_minor = DIV_ROUND_CLOSEST(nic_minor, 4);
drivers/net/ethernet/sfc/siena/ptp.c
528
correction = DIV_ROUND_CLOSEST(correction, 4);
drivers/net/ethernet/spacemit/k1_emac.c
1838
return DIV_ROUND_CLOSEST(ps * 10, 156);
drivers/net/ethernet/spacemit/k1_emac.c
1843
return DIV_ROUND_CLOSEST(unit * 156, 10);
drivers/net/ethernet/ti/cpsw_priv.c
854
DIV_ROUND_CLOSEST(val * priv->shp_cfg_speed, 100));
drivers/net/ieee802154/adf7242.c
610
db = DIV_ROUND_CLOSEST(db + 29, 2);
drivers/net/ipa/ipa_endpoint.c
1075
ticks = DIV_ROUND_CLOSEST(microseconds * rate, 128 * USEC_PER_SEC);
drivers/net/ipa/ipa_endpoint.c
1587
extra = DIV_ROUND_CLOSEST(unused * len, total_len);
drivers/net/ipa/ipa_endpoint.c
946
ticks = DIV_ROUND_CLOSEST(microseconds, 100);
drivers/net/ipa/ipa_endpoint.c
952
ticks = DIV_ROUND_CLOSEST(microseconds, 1000);
drivers/net/ipa/ipa_endpoint.c
959
ticks = DIV_ROUND_CLOSEST(microseconds, 100);
drivers/net/ipa/ipa_endpoint.c
989
ticks = DIV_ROUND_CLOSEST(microseconds, IPA_AGGR_GRANULARITY);
drivers/net/ipa/ipa_main.c
340
return DIV_ROUND_CLOSEST(usec * TIMER_FREQUENCY, USEC_PER_SEC) - 1;
drivers/net/phy/marvell.c
2959
temp = clamp_val(DIV_ROUND_CLOSEST(temp, 5) + 5, 0, 0x1f);
drivers/net/phy/mediatek/mtk-ge-soc.c
712
txreserve_val = DIV_ROUND_CLOSEST(lower_idx + upper_idx, 2);
drivers/net/phy/sfp.c
1112
*value = DIV_ROUND_CLOSEST(*value, 10);
drivers/net/phy/sfp.c
1119
*value = DIV_ROUND_CLOSEST(*value * slope, 256) + offset;
drivers/net/phy/sfp.c
1130
*value = DIV_ROUND_CLOSEST(*value * 1000, 256);
drivers/net/phy/sfp.c
1138
*value = DIV_ROUND_CLOSEST(*value, 10);
drivers/net/phy/sfp.c
1146
*value = DIV_ROUND_CLOSEST(*value, 500);
drivers/net/phy/sfp.c
1154
*value = DIV_ROUND_CLOSEST(*value, 10);
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
17746
pwr_est = max(DIV_ROUND_CLOSEST(4 * num, den), -8);
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
26953
i_pwr = DIV_ROUND_CLOSEST(est[rx_core].i_pwr, num_samps);
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
26954
q_pwr = DIV_ROUND_CLOSEST(est[rx_core].q_pwr, num_samps);
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
27636
i_pwr = DIV_ROUND_CLOSEST(est[rx_core].i_pwr,
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
27638
q_pwr = DIV_ROUND_CLOSEST(est[rx_core].q_pwr,
drivers/net/wireless/mediatek/mt76/mt7915/init.c
87
val = DIV_ROUND_CLOSEST(clamp_val(val, 60 * 1000, 130 * 1000), 1000);
drivers/net/wireless/mediatek/mt76/mt7996/init.c
132
val = DIV_ROUND_CLOSEST(clamp_val(val, 40 * 1000, 130 * 1000), 1000);
drivers/net/wireless/mediatek/mt7601u/mac.c
347
atomic_set(&dev->avg_ampdu_len, n ? DIV_ROUND_CLOSEST(sum, n) : 1);
drivers/net/wireless/realtek/rtw88/rtw8822c.c
3933
tmp_gs = DIV_ROUND_CLOSEST(tmp_gs, 10);
drivers/net/wireless/realtek/rtw89/rtw8852b_common.c
627
pwrofst = max(DIV_ROUND_CLOSEST(ext_loss_avg, 4) + 16, EDCCA_PWROFST_DEFAULT);
drivers/net/wireless/realtek/rtw89/rtw8852c.c
1117
sco = DIV_ROUND_CLOSEST(1 << 18, central_freq);
drivers/net/wireless/realtek/rtw89/rtw8852c.c
1137
sco = DIV_ROUND_CLOSEST(1 << 18, central_freq);
drivers/net/wireless/realtek/rtw89/rtw8922a.c
1276
sco = DIV_ROUND_CLOSEST(1 << 18, central_freq);
drivers/nvmem/imx-ocotp.c
280
strobe_prog = DIV_ROUND_CLOSEST(clk_rate * TIMING_STROBE_PROG_US,
drivers/pci/pci.c
90
upper = max(DIV_ROUND_CLOSEST(delay_ms, 5), 1U);
drivers/phy/cadence/cdns-dphy.c
170
psm_div = DIV_ROUND_CLOSEST(psm_clk_hz, 1000000);
drivers/phy/freescale/phy-fsl-imx8mq-usb.c
286
return DIV_ROUND_CLOSEST(percent - 94U, 2);
drivers/phy/intel/phy-intel-keembay-emmc.c
84
mhz = DIV_ROUND_CLOSEST(clk_get_rate(priv->emmcclk), 1000000);
drivers/phy/intel/phy-intel-lgm-emmc.c
76
quot = DIV_ROUND_CLOSEST(rate, 50000000);
drivers/phy/mediatek/phy-mtk-tphy.c
736
calibration_val = DIV_ROUND_CLOSEST(tmp, U3P_SR_COEF_DIVISOR);
drivers/phy/mediatek/phy-mtk-xsphy.c
163
calib_val = DIV_ROUND_CLOSEST(tmp, XSP_SR_COEF_DIVISOR);
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
887
vco += DIV_ROUND_CLOSEST(parent_rate * frac, (1 << 24));
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
902
inno->pixclock = DIV_ROUND_CLOSEST((unsigned long)vco, 1000) * 1000;
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
2120
dbncp_val = DIV_ROUND_CLOSEST(nanosecs, NPCM8XX_DEBOUNCE_NSEC);
drivers/pinctrl/sunxi/pinctrl-sunxi.c
1541
debounce_freq = DIV_ROUND_CLOSEST(USEC_PER_SEC, debounce);
drivers/pinctrl/visconti/pinctrl-common.c
99
set_val = DIV_ROUND_CLOSEST(arg, 2) - 1;
drivers/platform/x86/amd/pmf/spc.c
201
avg = DIV_ROUND_CLOSEST(avg, size);
drivers/power/supply/ab8500_fg.c
1169
percent = DIV_ROUND_CLOSEST(di->bat_cap.permille, 10);
drivers/power/supply/ab8500_fg.c
1218
DIV_ROUND_CLOSEST(di->bat_cap.prev_percent *
drivers/power/supply/ab8500_fg.c
1290
int percent = DIV_ROUND_CLOSEST(di->bat_cap.permille, 10);
drivers/power/supply/axp288_charger.c
332
scaled_val = DIV_ROUND_CLOSEST(scaled_val, 1000);
drivers/power/supply/axp288_charger.c
340
scaled_val = DIV_ROUND_CLOSEST(val->intval, 1000);
drivers/power/supply/ip5xxx_power.c
443
val->intval = 2600000 + DIV_ROUND_CLOSEST(raw * 26855, 100);
drivers/power/supply/ip5xxx_power.c
451
val->intval = 2600000 + DIV_ROUND_CLOSEST(raw * 26855, 100);
drivers/power/supply/ip5xxx_power.c
459
val->intval = DIV_ROUND_CLOSEST(raw * 149197, 200);
drivers/power/supply/power_supply_hwmon.c
245
pspval.intval = DIV_ROUND_CLOSEST(pspval.intval, 1000);
drivers/power/supply/power_supply_hwmon.c
300
pspval.intval = DIV_ROUND_CLOSEST(pspval.intval, 100);
drivers/power/supply/qcom_battmgr.c
1253
return DIV_ROUND_CLOSEST(temperature, 10);
drivers/power/supply/qcom_battmgr.c
1439
battmgr->status.temperature = DIV_ROUND_CLOSEST(val, 10);
drivers/power/supply/sc27xx_fuel_gauge.c
149
return DIV_ROUND_CLOSEST(vol * data->vol_1000mv_adc, 1000);
drivers/power/supply/sc27xx_fuel_gauge.c
438
temp = DIV_ROUND_CLOSEST(delta_clbcnt * 10, 36 * SC27XX_FGU_SAMPLE_HZ);
drivers/power/supply/sc27xx_fuel_gauge.c
445
delta_cap = DIV_ROUND_CLOSEST(temp * 100, data->total_cap);
drivers/power/supply/sc27xx_fuel_gauge.c
665
value = DIV_ROUND_CLOSEST(value * 10,
drivers/power/supply/sc27xx_fuel_gauge.c
949
int cur_cap = DIV_ROUND_CLOSEST(data->total_cap * capacity, 100);
drivers/power/supply/sc27xx_fuel_gauge.c
955
return DIV_ROUND_CLOSEST(cur_cap * 36 * data->cur_1000ma_adc * SC27XX_FGU_SAMPLE_HZ, 10);
drivers/power/supply/sc27xx_fuel_gauge.c
983
data->vol_1000mv_adc = DIV_ROUND_CLOSEST(cal_4200mv * 10, 42);
drivers/power/supply/sc27xx_fuel_gauge.c
985
DIV_ROUND_CLOSEST(data->vol_1000mv_adc * 4 * data->calib_resist,
drivers/pwm/pwm-clps711x.c
33
pwm->args.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, freq);
drivers/pwm/pwm-stmpe.c
187
duty = DIV_ROUND_CLOSEST(duty, period_ns);
drivers/regulator/max77857-regulator.c
344
range->step = DIV_ROUND_CLOSEST(vref_step * (rbot + rtop), rbot);
drivers/regulator/mcp16502.c
308
ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
drivers/regulator/mcp16502.c
315
ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
drivers/regulator/ti-abb-regulator.c
473
clk_rate = DIV_ROUND_CLOSEST(clk_get_rate(abb->clk), 1000000);
drivers/regulator/ti-abb-regulator.c
476
cycle_rate = DIV_ROUND_CLOSEST(clock_cycles * 10, clk_rate);
drivers/regulator/ti-abb-regulator.c
479
sr2_wt_cnt_val = DIV_ROUND_CLOSEST(abb->settling_time * 10, cycle_rate);
drivers/rtc/rtc-armada38x.c
434
off = DIV_ROUND_CLOSEST(ppb_cor, 954);
drivers/rtc/rtc-armada38x.c
437
off = DIV_ROUND_CLOSEST(ppb_cor, 3815);
drivers/rtc/rtc-at91rm9200.c
321
*offset = DIV_ROUND_CLOSEST(AT91_RTC_CORR_DIVIDEND, val);
drivers/rtc/rtc-at91rm9200.c
356
corr = DIV_ROUND_CLOSEST(AT91_RTC_CORR_DIVIDEND, offset * AT91_RTC_CORR_LOW_RATIO);
drivers/rtc/rtc-at91rm9200.c
358
corr = DIV_ROUND_CLOSEST(AT91_RTC_CORR_DIVIDEND, offset);
drivers/rtc/rtc-ds1307.c
876
ctrl_reg = DIV_ROUND_CLOSEST(offset,
drivers/rtc/rtc-ds1307.c
880
ctrl_reg = DIV_ROUND_CLOSEST(abs(offset),
drivers/rtc/rtc-pcf2123.c
160
reg = DIV_ROUND_CLOSEST(offset, OFFSET_STEP);
drivers/rtc/rtc-pcf85063.c
282
mode0 = DIV_ROUND_CLOSEST(offset, PCF85063_OFFSET_STEP0);
drivers/rtc/rtc-pcf85063.c
283
mode1 = DIV_ROUND_CLOSEST(offset, PCF85063_OFFSET_STEP1);
drivers/rtc/rtc-pcf8523.c
362
reg_m0 = clamp(DIV_ROUND_CLOSEST(offset, 4340), -64L, 63L);
drivers/rtc/rtc-pcf8523.c
363
reg_m1 = clamp(DIV_ROUND_CLOSEST(offset, 4069), -64L, 63L);
drivers/rtc/rtc-renesas-rtca3.c
508
cycles10 = DIV_ROUND_CLOSEST(offset, priv->ppb.ten_sec);
drivers/rtc/rtc-renesas-rtca3.c
509
cycles60 = DIV_ROUND_CLOSEST(offset, priv->ppb.sixty_sec);
drivers/rtc/rtc-rs5c372.c
608
steps = DIV_ROUND_CLOSEST(offset, 1017);
drivers/rtc/rtc-rs5c372.c
627
steps = DIV_ROUND_CLOSEST(offset, ppb_per_step);
drivers/rtc/rtc-rv3028.c
486
*offset = DIV_ROUND_CLOSEST(steps * OFFSET_STEP_PPT, 1000);
drivers/rtc/rtc-rv3028.c
498
offset = DIV_ROUND_CLOSEST(offset, OFFSET_STEP_PPT);
drivers/rtc/rtc-rv3032.c
381
*offset = DIV_ROUND_CLOSEST(steps * OFFSET_STEP_PPT, 1000);
drivers/rtc/rtc-rv3032.c
391
offset = DIV_ROUND_CLOSEST(offset, OFFSET_STEP_PPT);
drivers/rtc/rtc-rv3032.c
662
hfd = DIV_ROUND_CLOSEST(req->rate, RV3032_HFD_STEP);
drivers/rtc/rtc-rv3032.c
683
hfd = DIV_ROUND_CLOSEST(rate, RV3032_HFD_STEP);
drivers/rtc/rtc-rzn1.c
328
stepsh = DIV_ROUND_CLOSEST(offset, 1017);
drivers/rtc/rtc-rzn1.c
329
stepsl = DIV_ROUND_CLOSEST(offset, 3051);
drivers/rtc/rtc-zynqmp.c
185
tick_mult = DIV_ROUND_CLOSEST(RTC_PPB, freq);
drivers/rtc/rtc-zynqmp.c
215
tick_mult = DIV_ROUND_CLOSEST(RTC_PPB, freq);
drivers/scsi/pmcraid.c
3166
cpu_to_le64(DIV_ROUND_CLOSEST(sgcount + ioadl_count, 8));
drivers/spi/spi-dw-core.c
810
chip->rx_sample_dly = DIV_ROUND_CLOSEST(rx_sample_dly_ns,
drivers/spi/spi-imx.c
2121
word_delay_us = DIV_ROUND_CLOSEST(spi_delay_to_ns(&transfer->word_delay, transfer),
drivers/spi/spi-mtk-snfi.c
1421
val = DIV_ROUND_CLOSEST(val, NSEC_PER_SEC / spi_freq);
drivers/spi/spi-npcm-pspi.c
152
ckdiv = DIV_ROUND_CLOSEST(clk_get_rate(priv->clk), (2 * speed)) - 1;
drivers/spi/spi-pic32.c
141
div = DIV_ROUND_CLOSEST(clk_get_rate(pic32s->clk), 2 * spi_ck) - 1;
drivers/spi/spi-rockchip.c
819
u32 rsd = DIV_ROUND_CLOSEST(rsd_nsecs * (rs->freq >> 8), 1000000000 >> 8);
drivers/spi/spi-rzv2h-rspi.c
465
min_rate_spr = DIV_ROUND_CLOSEST(clk_min_rate, rate_div) - 1;
drivers/spi/spi-rzv2h-rspi.c
475
max_rate_spr = DIV_ROUND_CLOSEST(clk_max_rate, rate_div) - 1;
drivers/spi/spi-stm32.c
569
div = DIV_ROUND_CLOSEST(spi->clk_rate & ~0x1, speed_hz);
drivers/spi/spi-stm32.c
589
spi->cur_half_period = DIV_ROUND_CLOSEST(USEC_PER_SEC, 2 * spi->cur_speed);
drivers/staging/media/deprecated/atmel/atmel-isc-clk.c
119
return DIV_ROUND_CLOSEST(parent_rate, isc_clk->div + 1);
drivers/staging/media/deprecated/atmel/atmel-isc-clk.c
146
rate = DIV_ROUND_CLOSEST(parent_rate, div);
drivers/staging/media/deprecated/atmel/atmel-isc-clk.c
207
div = DIV_ROUND_CLOSEST(parent_rate, rate);
drivers/staging/media/imx/imx-media-fim.c
175
error_avg = DIV_ROUND_CLOSEST(fim->sum, fim->num_avg);
drivers/staging/media/ipu3/ipu3-css.c
1545
return DIV_ROUND_CLOSEST(val, align) * align;
drivers/staging/sm750fb/ddk750_chip.c
105
divisor = DIV_ROUND_CLOSEST(get_mxclk_freq(), frequency);
drivers/staging/sm750fb/ddk750_chip.c
157
divisor = DIV_ROUND_CLOSEST(get_mxclk_freq(), frequency);
drivers/thermal/renesas/rcar_gen3_thermal.c
153
DIV_ROUND_CLOSEST((priv->ptat[1] - priv->ptat[2]) * priv->info->scale,
drivers/thermal/renesas/rcar_gen3_thermal.c
193
decicelsius = DIV_ROUND_CLOSEST(coef->a * (thcode - reg), coef->b / 10);
drivers/thermal/renesas/rcar_gen3_thermal.c
210
celsius = DIV_ROUND_CLOSEST(mcelsius, 1000);
drivers/thermal/renesas/rcar_gen3_thermal.c
221
return thcode - DIV_ROUND_CLOSEST((celsius - adj) * coef->b, coef->a);
drivers/thermal/renesas/rzg3s_thermal.c
81
ts_code_ave = DIV_ROUND_CLOSEST(MCELSIUS(ts_code_ave), TSU_READ_STEPS);
drivers/thermal/tegra/tegra30-tsensor.c
198
c1 = DIV_ROUND_CLOSEST(ts->calib.a * counter + ts->calib.b, 1000000);
drivers/thermal/tegra/tegra30-tsensor.c
200
c2 = DIV_ROUND_CLOSEST(ts->calib.p, c1);
drivers/thermal/tegra/tegra30-tsensor.c
204
*temp = DIV_ROUND_CLOSEST(c1 * (c2 + c3 + c4), 1000);
drivers/thermal/tegra/tegra30-tsensor.c
213
c1 = DIV_ROUND_CLOSEST(ts->calib.p - temp * 1000, ts->calib.m);
drivers/thermal/tegra/tegra30-tsensor.c
216
return DIV_ROUND_CLOSEST(c2 * 1000000 - ts->calib.b, ts->calib.a);
drivers/thermal/tegra/tegra30-tsensor.c
368
id, DIV_ROUND_CLOSEST(temps.crit_trip, 1000));
drivers/thermal/tegra/tegra30-tsensor.c
481
ts->calib.a = DIV_ROUND_CLOSEST((t2_90C - t1_25C) * 1000000,
drivers/thermal/tegra/tegra30-tsensor.c
497
ts->calib.r = DIV_ROUND_CLOSEST(ts->calib.n, ts->calib.m * 2);
drivers/thunderbolt/usb4.c
2268
return DIV_ROUND_CLOSEST(uframes * 8000, MEGA);
drivers/tty/serial/8250/8250_bcm7271.c
685
quot = DIV_ROUND_CLOSEST(rate, baud);
drivers/tty/serial/8250/8250_dwlib.c
83
*frac = DIV_ROUND_CLOSEST(rem << d->dlf_size, base_baud);
drivers/tty/serial/8250/8250_early.c
144
divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud);
drivers/tty/serial/8250/8250_exar.c
442
quot_16 = DIV_ROUND_CLOSEST(p->uartclk, baud);
drivers/tty/serial/8250/8250_ingenic.c
107
divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud);
drivers/tty/serial/8250/8250_loongson.c
91
quot = DIV_ROUND_CLOSEST((port->uartclk << 4), baud);
drivers/tty/serial/8250/8250_mtk.c
399
fraction = DIV_ROUND_CLOSEST(fraction, 10);
drivers/tty/serial/8250/8250_of.c
54
return DIV_ROUND_CLOSEST(port->uartclk, 16 * baud + 2) - 2;
drivers/tty/serial/8250/8250_omap.c
246
div_13 = DIV_ROUND_CLOSEST(uartclk, 13 * baud);
drivers/tty/serial/8250/8250_omap.c
247
div_16 = DIV_ROUND_CLOSEST(uartclk, 16 * baud);
drivers/tty/serial/8250/8250_pci.c
1205
unsigned int sdiv = DIV_ROUND_CLOSEST(sclk, baud);
drivers/tty/serial/8250/8250_pci.c
1227
squot = DIV_ROUND_CLOSEST(srem * quot_scale, spre);
drivers/tty/serial/8250/8250_pci.c
1238
quot = DIV_ROUND_CLOSEST(sdiv, spre);
drivers/tty/serial/amba-pl011.c
2119
quot = DIV_ROUND_CLOSEST(port->uartclk * 8, baud);
drivers/tty/serial/amba-pl011.c
2121
quot = DIV_ROUND_CLOSEST(port->uartclk * 4, baud);
drivers/tty/serial/atmel_serial.c
2262
div = DIV_ROUND_CLOSEST(port->uartclk, baud * 2);
drivers/tty/serial/max310x.c
573
fdiv = DIV_ROUND_CLOSEST(freq, div);
drivers/tty/serial/meson_uart.c
325
val |= DIV_ROUND_CLOSEST(port->uartclk / xtal_div, baud) - 1;
drivers/tty/serial/meson_uart.c
328
val = DIV_ROUND_CLOSEST(port->uartclk / 4, baud) - 1;
drivers/tty/serial/mps2-uart.c
354
DIV_ROUND_CLOSEST(port->uartclk, UARTn_BAUDDIV_MASK),
drivers/tty/serial/mps2-uart.c
355
DIV_ROUND_CLOSEST(port->uartclk, 16));
drivers/tty/serial/mps2-uart.c
357
bauddiv = DIV_ROUND_CLOSEST(port->uartclk, baud);
drivers/tty/serial/msm_serial.c
1087
divisor = DIV_ROUND_CLOSEST(target, 16 * baud);
drivers/tty/serial/msm_serial.c
1117
divisor = DIV_ROUND_CLOSEST(target, 16 * baud);
drivers/tty/serial/mvebu-uart.c
501
d_divisor = DIV_ROUND_CLOSEST(port->uartclk, baud * m_divisor);
drivers/tty/serial/mvebu-uart.c
509
d_divisor = DIV_ROUND_CLOSEST(port->uartclk, baud * m_divisor);
drivers/tty/serial/mvebu-uart.c
531
return DIV_ROUND_CLOSEST(port->uartclk, d_divisor * m_divisor);
drivers/tty/serial/mxs-auart.c
1034
div = DIV_ROUND_CLOSEST(u->uartclk * 32, baud);
drivers/tty/serial/pch_uart.c
434
div = DIV_ROUND_CLOSEST(priv->uartclk / 16, baud);
drivers/tty/serial/sc16is7xx.c
569
return DIV_ROUND_CLOSEST((clk / prescaler) / 16, div);
drivers/tty/serial/sccnxp.c
311
div_std = DIV_ROUND_CLOSEST(port->uartclk, 2 * 16 * baud);
drivers/tty/serial/sccnxp.c
313
bestbaud = DIV_ROUND_CLOSEST(port->uartclk, 2 * 16 * div_std);
drivers/tty/serial/sccnxp.c
326
div_std = DIV_ROUND_CLOSEST(chip->freq_std, baud_std[i].baud);
drivers/tty/serial/sccnxp.c
327
tmp_baud = DIV_ROUND_CLOSEST(port->uartclk, div_std);
drivers/tty/serial/serial-tegra.c
411
divisor = DIV_ROUND_CLOSEST(rate, baud * 16);
drivers/tty/serial/serial_core.c
580
quot = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud);
drivers/tty/serial/sh-sci.c
2528
err = DIV_ROUND_CLOSEST(freq, sr) - bps;
drivers/tty/serial/sh-sci.c
2555
dl = DIV_ROUND_CLOSEST(freq, sr * bps);
drivers/tty/serial/sh-sci.c
2558
err = DIV_ROUND_CLOSEST(freq, sr * dl) - bps;
drivers/tty/serial/sh-sci.c
2619
br = DIV_ROUND_CLOSEST(freq, scrate);
drivers/tty/serial/sh-sci.c
2622
err = DIV_ROUND_CLOSEST(freq, br * prediv) - bps;
drivers/tty/serial/sh-sci.c
2837
int deviation = DIV_ROUND_CLOSEST(min_err * last_stop *
drivers/tty/serial/stm32-usart.c
1274
uart_clk_pres = DIV_ROUND_CLOSEST(uart_clk, stm32_usart_presc_val[presc]);
drivers/tty/serial/stm32-usart.c
1275
usartdiv = DIV_ROUND_CLOSEST(uart_clk_pres, baud);
drivers/tty/serial/stm32-usart.c
202
rs485_deat_dedt = DIV_ROUND_CLOSEST(rs485_deat_dedt, 1000);
drivers/tty/serial/stm32-usart.c
214
rs485_deat_dedt = DIV_ROUND_CLOSEST(rs485_deat_dedt, 1000);
drivers/tty/serial/stm32-usart.c
244
baud = DIV_ROUND_CLOSEST(port->uartclk, usartdiv);
drivers/tty/serial/vt8500_serial.c
663
vt8500_port->clk_predivisor = DIV_ROUND_CLOSEST(
drivers/tty/serial/xilinx_uartps.c
536
cd = DIV_ROUND_CLOSEST(clk, baud * (bdiv + 1));
drivers/usb/serial/cp210x.c
1019
div = DIV_ROUND_CLOSEST(48000000, 2 * prescale * baud);
drivers/usb/serial/f81232.c
132
return DIV_ROUND_CLOSEST(clockrate, baudrate);
drivers/usb/serial/f81534.c
540
return DIV_ROUND_CLOSEST(clockrate, baudrate);
drivers/usb/serial/ftdi_sio.c
1125
int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud);
drivers/usb/serial/ftdi_sio.c
1151
int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud);
drivers/usb/serial/ftdi_sio.c
1174
divisor3 = DIV_ROUND_CLOSEST(8 * base, 10 * baud);
drivers/video/backlight/pwm_bl.c
166
retval = DIV_ROUND_CLOSEST(lightness * 10, 9033);
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
701
var->width = DIV_ROUND_CLOSEST(w, 1000);
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
702
var->height = DIV_ROUND_CLOSEST(h, 1000);
drivers/w1/masters/mxc_w1.c
116
clkdiv = DIV_ROUND_CLOSEST(clkrate, 1000000);
drivers/watchdog/realtek_otto_wdt.c
109
return DIV_ROUND_CLOSEST(1 << (25 + prescale), ctrl->clk_rate_khz);
drivers/watchdog/starfive-wdt.c
202
return DIV_ROUND_CLOSEST(ticks, wdt->freq);
include/drm/drm_color_mgmt.h
49
return DIV_ROUND_CLOSEST(user_input * ((1 << bit_precision) - 1),
include/linux/units.h
102
return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DECIDEGREE);
include/linux/units.h
126
return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DECIDEGREE);
include/linux/units.h
131
return t + DIV_ROUND_CLOSEST(ABSOLUTE_ZERO_MILLICELSIUS,
include/linux/units.h
137
return t - DIV_ROUND_CLOSEST(ABSOLUTE_ZERO_MILLICELSIUS,
include/linux/units.h
88
return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DEGREE);
include/linux/units.h
95
return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DEGREE);
include/net/red.h
110
#define RED_ONE_PERCENT ((u32)DIV_ROUND_CLOSEST(1ULL<<32, 100))
include/net/red.h
461
max_p_delta = DIV_ROUND_CLOSEST(p->max_P, p->qth_delta);
kernel/sched/sched.h
3609
#define UCLAMP_BUCKET_DELTA DIV_ROUND_CLOSEST(SCHED_CAPACITY_SCALE, UCLAMP_BUCKETS)
kernel/time/sched_clock.c
226
r = DIV_ROUND_CLOSEST(r, 1000000);
kernel/time/sched_clock.c
229
r = DIV_ROUND_CLOSEST(r, 1000);
net/bluetooth/hci_event.c
6965
DIV_ROUND_CLOSEST(get_unaligned_le24(ev->c_latency),
net/bluetooth/hci_event.c
6968
DIV_ROUND_CLOSEST(get_unaligned_le24(ev->p_latency),
net/bluetooth/hci_event.c
6980
DIV_ROUND_CLOSEST(get_unaligned_le24(ev->c_latency),
net/bluetooth/hci_event.c
6983
DIV_ROUND_CLOSEST(get_unaligned_le24(ev->p_latency),
net/ipv4/tcp_cdg.c
230
gmin = DIV_ROUND_CLOSEST(gmin, 64);
net/ipv4/tcp_cdg.c
231
gmax = DIV_ROUND_CLOSEST(gmax, 64);
net/mac80211/rc80211_minstrel_ht_debugfs.c
121
tx_time = DIV_ROUND_CLOSEST(duration, 1000);
net/mac80211/rc80211_minstrel_ht_debugfs.c
264
tx_time = DIV_ROUND_CLOSEST(duration, 1000);
sound/core/oss/mixer_oss.c
429
return DIV_ROUND_CLOSEST(nrange * (val - omin), orange) + nmin;
sound/core/oss/rate.c
181
res = DIV_ROUND_CLOSEST(frames << SHIFT, data->pitch);
sound/core/oss/rate.c
212
res = DIV_ROUND_CLOSEST(frames << SHIFT, data->pitch);
sound/pci/ens1370.c
745
freq = DIV_ROUND_CLOSEST(rate << 15, 3000);
sound/pci/ens1370.c
765
freq = DIV_ROUND_CLOSEST(rate << 15, 3000);
sound/pci/maestro3.c
1240
freq = DIV_ROUND_CLOSEST(runtime->rate << 15, 48000);
sound/pci/sis7019.c
361
delta = DIV_ROUND_CLOSEST(rate << 12, 48000) & 0x0000ffff;
sound/pci/sonicvibes.c
559
div = DIV_ROUND_CLOSEST(rate * 65536, SV_FULLRATE);
sound/pci/trident/trident_main.c
1029
val = DIV_ROUND_CLOSEST(48000U << 12, runtime->rate);
sound/pci/trident/trident_main.c
675
delta = DIV_ROUND_CLOSEST(rate << 12, 48000) & 0x0000ffff;
sound/soc/adi/axi-spdif.c
97
clkdiv = DIV_ROUND_CLOSEST(clk_get_rate(spdif->clk_ref),
sound/soc/atmel/atmel-pdmic.c
535
*rate_min = DIV_ROUND_CLOSEST(mic_min_freq, 128);
sound/soc/atmel/atmel_ssc_dai.c
499
cmr_div = DIV_ROUND_CLOSEST(ssc_p->mck_rate, 2 * bclk_rate);
sound/soc/codecs/es8328.c
561
round_freq = DIV_ROUND_CLOSEST(freq, 100) * 100;
sound/soc/codecs/max98088.c
1061
pclk = DIV_ROUND_CLOSEST(max98088->sysclk, max98088->mclk_prescaler);
sound/soc/codecs/max98088.c
991
pclk = DIV_ROUND_CLOSEST(max98088->sysclk, max98088->mclk_prescaler);
sound/soc/codecs/pcm512x.c
1066
osr_div = DIV_ROUND_CLOSEST(dac_rate, osr_rate);
sound/soc/codecs/pcm512x.c
1072
dac_div = DIV_ROUND_CLOSEST(dacsrc_rate, dac_rate);
sound/soc/codecs/pcm512x.c
1079
ncp_div = DIV_ROUND_CLOSEST(dac_rate,
sound/soc/codecs/pcm512x.c
931
bclk_div = DIV_ROUND_CLOSEST(sck_rate, bclk_rate);
sound/soc/codecs/pcm512x.c
994
bclk_div = DIV_ROUND_CLOSEST(sck_rate, bclk_rate);
sound/soc/codecs/sma1307.c
1755
sma1307->set.mode_size = DIV_ROUND_CLOSEST(size - offset, num_mode + 1);
sound/soc/fsl/fsl_sai.c
474
ratio = DIV_ROUND_CLOSEST(clk_rate, freq);
sound/soc/loongson/loongson_i2s.c
76
bclk_ratio = DIV_ROUND_CLOSEST(clk_rate,
sound/soc/loongson/loongson_i2s.c
78
mclk_ratio = DIV_ROUND_CLOSEST(clk_rate, (sysclk * 2)) - 1;
sound/soc/loongson/loongson_i2s.c
89
bclk_ratio = DIV_ROUND_CLOSEST(sysclk,
sound/soc/meson/aiu-encoder-i2s.c
153
fs = DIV_ROUND_CLOSEST(clk_get_rate(aiu->i2s.clks[MCLK].clk), srate);
sound/soc/rockchip/rockchip_i2s.c
364
div_bclk = DIV_ROUND_CLOSEST(mclk_rate, bclk_rate);
sound/soc/rockchip/rockchip_i2s_tdm.c
687
div_bclk = DIV_ROUND_CLOSEST(mclk_rate, bclk_rate);
sound/soc/rockchip/rockchip_sai.c
677
div_bclk = DIV_ROUND_CLOSEST(mclk_rate, bclk_rate);
sound/soc/rockchip/rockchip_spdif.c
128
div = DIV_ROUND_CLOSEST(mclk_rate, bmc);
sound/soc/sophgo/cv1800b-tdm.c
311
*mclk_div = DIV_ROUND_CLOSEST(CV1800B_DEF_FREQ, target_mclk);
sound/soc/sophgo/cv1800b-tdm.c
414
bclk_div = DIV_ROUND_CLOSEST(mclk_rate, tmp);
sound/soc/spear/spdif_out.c
97
divider = DIV_ROUND_CLOSEST(clk_get_rate(host->clk), (rate * 128));
sound/soc/stm/stm32_i2s.c
292
ratio = DIV_ROUND_CLOSEST(input_rate, output_rate);
sound/soc/stm/stm32_i2s.c
348
ratio = DIV_ROUND_CLOSEST(max_rate, rate);
sound/soc/stm/stm32_sai_sub.c
328
div = DIV_ROUND_CLOSEST(input_rate, output_rate);
sound/soc/stm/stm32_sai_sub.c
368
ratio = DIV_ROUND_CLOSEST(max_rate, rate);
sound/soc/stm/stm32_sai_sub.c
434
sai_ck_max_rate /= DIV_ROUND_CLOSEST(256, roundup_pow_of_two(sai->fs_length));
sound/soc/xilinx/xlnx_spdif.c
112
clk_div = DIV_ROUND_CLOSEST(ctx->aclk, MAX_CHANNELS * AES_SAMPLE_WIDTH *
sound/usb/misc/ua101.c
652
DIV_ROUND_CLOSEST(ua->rate, ua->packets_per_second);
sound/usb/misc/ua101.c
672
DIV_ROUND_CLOSEST(ua->rate * ua->playback.queue_length,