Symbol: DIV_ROUND_CLOSEST_ULL
drivers/acpi/battery.c
289
val->intval = DIV_ROUND_CLOSEST_ULL(battery->capacity_now * 100ULL,
drivers/clk/at91/clk-audio-pll.c
166
fr = DIV_ROUND_CLOSEST_ULL(fr, AUDIO_PLL_DIV_FRAC);
drivers/clk/at91/clk-audio-pll.c
234
tmp = DIV_ROUND_CLOSEST_ULL(tmp, parent_rate);
drivers/clk/at91/clk-master.c
222
return DIV_ROUND_CLOSEST_ULL(parent_rate, master->div);
drivers/clk/at91/clk-master.c
310
new_rate = DIV_ROUND_CLOSEST_ULL(new_parent_rate,
drivers/clk/at91/clk-master.c
397
return DIV_ROUND_CLOSEST_ULL(parent_rate, pres);
drivers/clk/at91/clk-master.c
435
master->pms.rate = DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres);
drivers/clk/at91/clk-master.c
458
DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres) ||
drivers/clk/at91/clk-master.c
584
return DIV_ROUND_CLOSEST_ULL(parent_rate, 3);
drivers/clk/at91/clk-master.c
586
return DIV_ROUND_CLOSEST_ULL(parent_rate, (1 << master->div));
drivers/clk/at91/clk-sam9x60-pll.c
210
nfrac = DIV_ROUND_CLOSEST_ULL((u64)remainder * (1 << 22),
drivers/clk/at91/clk-sam9x60-pll.c
213
tmprate += DIV_ROUND_CLOSEST_ULL((u64)nfrac * parent_rate,
drivers/clk/at91/clk-sam9x60-pll.c
442
return DIV_ROUND_CLOSEST_ULL(parent_rate, (div->div + 1));
drivers/clk/at91/clk-sam9x60-pll.c
474
tmp_rate = DIV_ROUND_CLOSEST_ULL(tmp_parent_rate, divid);
drivers/clk/at91/clk-sam9x60-pll.c
79
DIV_ROUND_CLOSEST_ULL((u64)parent_rate * frac->frac, (1 << 22));
drivers/clk/bcm/clk-kona.c
697
scaled_parent_rate = DIV_ROUND_CLOSEST_ULL(scaled_rate,
drivers/clk/bcm/clk-kona.c
709
result = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate, scaled_div);
drivers/clk/bcm/clk-kona.c
756
scaled_parent_rate = DIV_ROUND_CLOSEST_ULL(scaled_rate,
drivers/clk/bcm/clk-kona.c
768
best_scaled_div = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate,
drivers/clk/bcm/clk-kona.c
781
result = DIV_ROUND_CLOSEST_ULL(scaled_parent_rate, best_scaled_div);
drivers/clk/clk-axi-clkgen.c
410
tmp = DIV_ROUND_CLOSEST_ULL(tmp, dout * d);
drivers/clk/clk-axi-clkgen.c
466
tmp = DIV_ROUND_CLOSEST_ULL(tmp, dout * d);
drivers/clk/clk-rp1.c
458
div_fp64 = DIV_ROUND_CLOSEST_ULL(div_fp64, parent_rate);
drivers/clk/clk-rp1.c
865
div = DIV_ROUND_CLOSEST_ULL(div, rate);
drivers/clk/clk-rp1.c
867
div = DIV_ROUND_CLOSEST_ULL(parent_rate, rate);
drivers/clk/clk-sparx5.c
116
div = DIV_ROUND_CLOSEST_ULL(parent_rate, rate);
drivers/clk/clk-versaclock3.c
558
frc = DIV_ROUND_CLOSEST_ULL(req->best_parent_rate,
drivers/clk/meson/clk-mpll.c
55
*sdm = DIV_ROUND_CLOSEST_ULL(frac, requested_rate);
drivers/clk/meson/clk-pll.c
113
val = DIV_ROUND_CLOSEST_ULL(val * frac_max, parent_rate);
drivers/clk/meson/clk-pll.c
162
return DIV_ROUND_CLOSEST_ULL(val, parent_rate);
drivers/clk/meson/sclk-div.c
44
int div = DIV_ROUND_CLOSEST_ULL((u64)prate, rate);
drivers/clk/renesas/rcar-gen3-cpg.c
179
return DIV_ROUND_CLOSEST_ULL((u64)parent_rate * mult,
drivers/clk/renesas/rcar-gen3-cpg.c
207
mult = DIV_ROUND_CLOSEST_ULL(rate * 32ULL, prate);
drivers/clk/renesas/rcar-gen3-cpg.c
210
req->rate = DIV_ROUND_CLOSEST_ULL((u64)prate * mult, 32);
drivers/clk/renesas/rcar-gen3-cpg.c
76
mult = DIV_ROUND_CLOSEST_ULL(req->rate, prate);
drivers/clk/renesas/rcar-gen3-cpg.c
90
mult = DIV_ROUND_CLOSEST_ULL(rate, parent_rate * pll_clk->fixed_mult);
drivers/clk/renesas/rcar-gen4-cpg.c
125
ni = DIV_ROUND_CLOSEST_ULL(req->rate, prate);
drivers/clk/renesas/rcar-gen4-cpg.c
154
ni = DIV_ROUND_CLOSEST_ULL(rate, prate);
drivers/clk/renesas/rcar-gen4-cpg.c
284
return DIV_ROUND_CLOSEST_ULL((u64)parent_rate * mult,
drivers/clk/renesas/rcar-gen4-cpg.c
312
mult = DIV_ROUND_CLOSEST_ULL(rate * 32ULL, prate);
drivers/clk/renesas/rcar-gen4-cpg.c
315
req->rate = DIV_ROUND_CLOSEST_ULL((u64)prate * mult, 32);
drivers/clk/renesas/rzg2l-cpg.c
1095
return DIV_ROUND_CLOSEST_ULL(rate, PDIV(val1));
drivers/clk/renesas/rzg2l-cpg.c
1133
return DIV_ROUND_CLOSEST_ULL(rate, (mr * pr));
drivers/clk/renesas/rzv2h-cpg.c
289
output_m = DIV_ROUND_CLOSEST_ULL(mul_u32_u32(p.m, fref) * MILLI,
drivers/clk/renesas/rzv2h-cpg.c
292
output_k_range = DIV_ROUND_CLOSEST_ULL(mul_u32_u32(fref, MILLI),
drivers/clk/renesas/rzv2h-cpg.c
434
return DIV_ROUND_CLOSEST_ULL(parent_rate, div);
drivers/clk/renesas/rzv2h-cpg.c
471
req->rate = DIV_ROUND_CLOSEST_ULL(dsi_params->div.freq_millihz, MILLI);
drivers/clk/renesas/rzv2h-cpg.c
584
req->rate = DIV_ROUND_CLOSEST_ULL(dsi_info->pll_dsi_parameters.pll.freq_millihz, MILLI);
drivers/clk/renesas/rzv2h-cpg.c
719
return DIV_ROUND_CLOSEST_ULL(rate, FIELD_GET(CPG_PLL_CLK1_PDIV, clk1));
drivers/clk/spacemit/ccu_mix.c
123
unsigned long tmp = DIV_ROUND_CLOSEST_ULL(parent_rate, j);
drivers/clk/sprd/pll.c
135
rate = DIV_ROUND_CLOSEST_ULL(refin * kint * k1,
drivers/clk/sprd/pll.c
204
kint = DIV_ROUND_CLOSEST_ULL(tmp, refin * 100);
drivers/clk/x86/clk-cgu.c
467
div = DIV_ROUND_CLOSEST_ULL((u64)prate, rate);
drivers/clk/x86/clk-cgu.c
470
div = DIV_ROUND_CLOSEST_ULL((u64)div, 5);
drivers/clk/x86/clk-cgu.c
496
div = DIV_ROUND_CLOSEST_ULL((u64)req->best_parent_rate, req->rate);
drivers/clk/x86/clk-cgu.c
501
div = DIV_ROUND_CLOSEST_ULL((u64)div, 5);
drivers/clk/x86/clk-cgu.c
521
rate64 = DIV_ROUND_CLOSEST_ULL(rate64, 5);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
364
o = DIV_ROUND_CLOSEST_ULL(vco_freq, rate);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
367
freq = DIV_ROUND_CLOSEST_ULL(vco_freq, o);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
404
vco_freq = DIV_ROUND_CLOSEST_ULL((parent_rate * m), d);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
405
o = DIV_ROUND_CLOSEST_ULL(vco_freq, rate);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
408
freq = DIV_ROUND_CLOSEST_ULL(vco_freq, o);
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
582
return DIV_ROUND_CLOSEST_ULL(parent_rate * mul, d * (o * 1000 + f));
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
693
f = DIV_ROUND_CLOSEST_ULL(req->rate * WZRD_FRAC_POINTS,
drivers/clk/xilinx/xlnx_vcu.c
323
feedback_div = DIV_ROUND_CLOSEST_ULL(req->rate, req->best_parent_rate);
drivers/crypto/intel/qat/qat_common/adf_clock.c
25
return (u64)DIV_ROUND_CLOSEST_ULL(timespec64_to_ns(ts), NSEC_PER_USEC);
drivers/crypto/intel/qat/qat_common/adf_clock.c
30
return (u64)DIV_ROUND_CLOSEST_ULL(timespec64_to_ns(ts), NSEC_PER_MSEC);
drivers/crypto/intel/qat/qat_common/adf_clock.c
90
temp = DIV_ROUND_CLOSEST_ULL(temp, delta_us);
drivers/gpio/gpio-rockchip.c
217
div_reg = DIV_ROUND_CLOSEST_ULL(div, 2 * USEC_PER_SEC) - 1;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5046
return DIV_ROUND_CLOSEST_ULL(input * AMDGPU_MAX_BL_LEVEL, max - min);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5052
return min + DIV_ROUND_CLOSEST_ULL(input * (max - min), AMDGPU_MAX_BL_LEVEL);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5130
return min + DIV_ROUND_CLOSEST_ULL((u64)(max - min) * brightness, max);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5144
return DIV_ROUND_CLOSEST_ULL((u64)max * (brightness - min),
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
333
phy_hsclk = DIV_ROUND_CLOSEST_ULL(dsi2->lane_mbps * USEC_PER_SEC, 16);
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
339
tmp = DIV_ROUND_CLOSEST_ULL(phy_hsclk << 16, ipi_clk);
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
346
tmp = DIV_ROUND_CLOSEST_ULL(phy_hsclk << 16, sys_clk);
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
480
phy_hs_clk = DIV_ROUND_CLOSEST_ULL(dsi2->lane_mbps * USEC_PER_SEC, 16);
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
483
hsa_time = DIV_ROUND_CLOSEST_ULL(tmp << 16, pixel_clk);
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
487
hbp_time = DIV_ROUND_CLOSEST_ULL(tmp << 16, pixel_clk);
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
491
hact_time = DIV_ROUND_CLOSEST_ULL(tmp << 16, pixel_clk);
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
495
hline_time = DIV_ROUND_CLOSEST_ULL(tmp << 16, pixel_clk);
drivers/gpu/drm/display/drm_hdmi_helper.c
257
return DIV_ROUND_CLOSEST_ULL(clock * bpc, 8);
drivers/gpu/drm/display/drm_hdmi_helper.c
387
unsigned long tmds_clock_khz = DIV_ROUND_CLOSEST_ULL(tmds_char_rate, 1000);
drivers/gpu/drm/display/drm_hdmi_helper.c
421
cts = DIV_ROUND_CLOSEST_ULL(tmds_char_rate * n,
drivers/gpu/drm/drm_modes.c
1307
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(num, 1000), den);
drivers/gpu/drm/drm_vblank.c
1568
diff = DIV_ROUND_CLOSEST_ULL(diff_ns, framedur_ns);
drivers/gpu/drm/drm_vblank.c
339
diff = DIV_ROUND_CLOSEST_ULL(diff_ns, framedur_ns);
drivers/gpu/drm/i915/display/intel_backlight.c
58
target_val = DIV_ROUND_CLOSEST_ULL(target_val, source_max - source_min);
drivers/gpu/drm/i915/display/intel_color.c
824
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(val, (1 << 16) - 1),
drivers/gpu/drm/i915/display/intel_cx0_phy.c
2188
tmpclk = DIV_ROUND_CLOSEST_ULL(mul_u32_u32(refclk, (multiplier << 16) + frac_quot) +
drivers/gpu/drm/i915/display/intel_cx0_phy.c
2753
vco = DIV_ROUND_CLOSEST_ULL(mul_u32_u32(ref, (multiplier << (17 - 2)) + frac) >> 17, 10);
drivers/gpu/drm/i915/display/intel_dp_mst.c
485
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(mode->htotal - mode->hdisplay,
drivers/gpu/drm/i915/display/intel_dpll.c
369
DIV_ROUND_CLOSEST_ULL(mul_u32_u32(refclk, clock->m), clock->n << 22);
drivers/gpu/drm/i915/display/intel_dpll.c
951
m2 = DIV_ROUND_CLOSEST_ULL(mul_u32_u32(target, clock.p * clock.n) << 22,
drivers/gpu/drm/i915/display/intel_snps_phy.c
1944
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(refclk, (multiplier << 16) + frac_quot) +
drivers/gpu/drm/i915/gt/intel_engine_cs.c
2025
DIV_ROUND_CLOSEST_ULL(intel_context_get_total_runtime_ns(rq->context),
drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
176
return DIV_ROUND_CLOSEST_ULL(res, 1000);
drivers/gpu/drm/i915/gvt/handlers.c
610
clock.vco = DIV_ROUND_CLOSEST_ULL(mul_u32_u32(refclk, clock.m), clock.n << 22);
drivers/gpu/drm/i915/i915_hwmon.c
233
val = DIV_ROUND_CLOSEST_ULL((u64)val << hwmon->scl_shift_time, SF_TIME);
drivers/gpu/drm/i915/i915_hwmon.c
486
nval = DIV_ROUND_CLOSEST_ULL((u64)val << hwmon->scl_shift_power, SF_POWER);
drivers/gpu/drm/i915/i915_hwmon.c
537
uval = DIV_ROUND_CLOSEST_ULL(val << POWER_SETUP_I1_SHIFT, SF_POWER);
drivers/gpu/drm/i915/i915_hwmon.c
652
uval = DIV_ROUND_CLOSEST_ULL(val << POWER_SETUP_I1_SHIFT, SF_CURR);
drivers/gpu/drm/imx/lcdc/imx-lcdc.c
208
clk_div = DIV_ROUND_CLOSEST_ULL(clk_get_rate(lcdc->clk_per),
drivers/gpu/drm/mediatek/mtk_hdmi_common.c
92
return DIV_ROUND_CLOSEST_ULL((u64)hdmi_mode_clock_to_hz(tmds_clock) * n,
drivers/gpu/drm/meson/meson_vclk.c
113
#define FREQ_1000_1001(_freq) DIV_ROUND_CLOSEST_ULL((_freq) * 1000ULL, 1001ULL)
drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
173
ssc_step_size = DIV_ROUND_CLOSEST_ULL(ssc_step_size, 1000000);
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
227
ssc_step_size = DIV_ROUND_CLOSEST_ULL(ssc_step_size, 1000000);
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
479
unsigned long hsfreq = DIV_ROUND_CLOSEST_ULL(hsfreq_millihz, MILLI);
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
570
*hsfreq_millihz = DIV_ROUND_CLOSEST_ULL(mul_u32_u32(vclk_rate, bpp * MILLI),
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
597
hsfreq_millihz = DIV_ROUND_CLOSEST_ULL(cpg_dsi_parameters.div.freq_millihz * bpp,
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
643
hsfreq = DIV_ROUND_CLOSEST_ULL(hsfreq_millihz, MILLI);
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
773
hsfreq = DIV_ROUND_CLOSEST_ULL(hsfreq_millihz, MILLI);
drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c
163
target_phyclk = DIV_ROUND_CLOSEST_ULL(lane_rate_kbps * lanes * 1000, bpp);
drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c
187
hstx_clk = DIV_ROUND_CLOSEST_ULL(dsi2->lane_mbps * USEC_PER_SEC, 16);
drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c
194
tmp = DIV_ROUND_CLOSEST_ULL(tmp << 16, ui);
drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c
199
tmp = DIV_ROUND_CLOSEST_ULL(tmp << 16, ui);
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
1745
unsigned long max_dclk = DIV_ROUND_CLOSEST_ULL(VOP2_MAX_DCLK_RATE * 8,
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
537
px_clock_hz = DIV_ROUND_CLOSEST_ULL(1000ULL * pll_out_khz * lanes, bpp);
drivers/gpu/drm/xe/xe_hwmon.c
419
reg_val = DIV_ROUND_CLOSEST_ULL((u64)value << hwmon->scl_shift_power, SF_POWER);
drivers/gpu/drm/xe/xe_hwmon.c
629
val = DIV_ROUND_CLOSEST_ULL((u64)val << hwmon->scl_shift_time, SF_TIME) + 1;
drivers/gpu/drm/xe/xe_hwmon.c
901
uval = DIV_ROUND_CLOSEST_ULL(value << POWER_SETUP_I1_SHIFT, scale_factor);
drivers/hwmon/axi-fan-control.c
102
temp = DIV_ROUND_CLOSEST_ULL((temp + 280230) * 65535ULL, 509314);
drivers/hwmon/axi-fan-control.c
85
temp = DIV_ROUND_CLOSEST_ULL(temp * 509314ULL, 65535) - 280230;
drivers/hwmon/htu31.c
62
return -40000 + DIV_ROUND_CLOSEST_ULL(165000ULL * val, 65535);
drivers/hwmon/htu31.c
67
return DIV_ROUND_CLOSEST_ULL(100000ULL * val, 65535);
drivers/hwmon/lochnagar-hwmon.c
215
power = DIV_ROUND_CLOSEST_ULL(power, LN2_PWR_UNITS);
drivers/hwmon/ltc2945.c
129
val = DIV_ROUND_CLOSEST_ULL(val, shunt_resistor);
drivers/hwmon/ltc2945.c
160
val = DIV_ROUND_CLOSEST_ULL(val, shunt_resistor);
drivers/hwmon/ltc2945.c
199
val = DIV_ROUND_CLOSEST_ULL(val, 625 * 1000);
drivers/hwmon/ltc2945.c
205
val = DIV_ROUND_CLOSEST_ULL(val, 25 * 1000) * 2;
drivers/hwmon/ltc2945.c
215
val = DIV_ROUND_CLOSEST_ULL(val, 25);
drivers/hwmon/ltc2945.c
233
val = DIV_ROUND_CLOSEST_ULL(val, 25 * 1000);
drivers/hwmon/ltc2947-core.c
1005
st->lsb_energy = DIV_ROUND_CLOSEST_ULL(aux, rate_hz);
drivers/hwmon/ltc4282.c
230
*val = DIV_ROUND_CLOSEST_ULL(be16_to_cpu(in) * (u64)fs, U16_MAX);
drivers/hwmon/ltc4282.c
503
temp = DIV_ROUND_CLOSEST_ULL(power * temp, U16_MAX);
drivers/hwmon/ltc4282.c
558
*val = DIV_ROUND_CLOSEST_ULL(temp * energy, st->rsense);
drivers/hwmon/ltc4282.c
640
temp = DIV_ROUND_CLOSEST_ULL(temp, DECA * MICRO);
drivers/hwmon/ltc4282.c
935
u32 in = DIV_ROUND_CLOSEST_ULL((u64)val * st->rsense, DECA * MICRO);
drivers/hwmon/pmbus/max20730.c
475
u64 temp = DIV_ROUND_CLOSEST_ULL((u64)ret * data->vout_voltage_divider[1],
drivers/hwmon/pmbus/mp2856.c
101
mantissa = clamp_val(DIV_ROUND_CLOSEST_ULL(val, 1000), 0, 0x3ff);
drivers/hwmon/pmbus/mp2975.c
198
mantissa = clamp_val(DIV_ROUND_CLOSEST_ULL(val, 1000), 0, 0x3ff);
drivers/hwmon/pmbus/pmbus_core.c
1013
val = DIV_ROUND_CLOSEST_ULL(val, 1000);
drivers/hwmon/pmbus/pmbus_core.c
1024
val = DIV_ROUND_CLOSEST_ULL(val, 1000);
drivers/hwmon/pmbus/pmbus_core.c
1045
mantissa = clamp_val(DIV_ROUND_CLOSEST_ULL(val, 1000), 0, 0x3ff);
drivers/hwmon/pmbus/pmbus_core.c
1095
return 2 + DIV_ROUND_CLOSEST_ULL((1600LL - val) * 100LL, 625);
drivers/hwmon/pmbus/tps25990.c
63
*m = DIV_ROUND_CLOSEST_ULL(val, 1000000);
drivers/hwmon/tmp513.c
557
max_curr_ma = DIV_ROUND_CLOSEST_ULL(vshunt_max * MICRO, data->shunt_uohms);
drivers/hwmon/tmp513.c
563
data->curr_lsb_ua = DIV_ROUND_CLOSEST_ULL(max_curr_ma * MILLI, 32767);
drivers/hwmon/tmp513.c
566
div = DIV_ROUND_CLOSEST_ULL(data->curr_lsb_ua * data->shunt_uohms, MICRO);
drivers/i2c/busses/i2c-designware-common.c
547
return DIV_ROUND_CLOSEST_ULL((u64)ic_clk * (tSYMBOL + tf), MICRO) - 3 + offset;
drivers/i2c/busses/i2c-designware-common.c
567
return DIV_ROUND_CLOSEST_ULL((u64)ic_clk * (tLOW + tf), MICRO) - 1 + offset;
drivers/i2c/busses/i2c-designware-common.c
645
fsleep(DIV_ROUND_CLOSEST_ULL(10 * MICRO, t->bus_freq_hz));
drivers/iio/adc/ad4030.c
470
put_unaligned_be16(DIV_ROUND_CLOSEST_ULL(gain * AD4030_GAIN_MIDLE_POINT,
drivers/iio/adc/ad4170-4.c
1402
offset = DIV_ROUND_CLOSEST_ULL(offset, chan_info->scale_tbl[pga][1]);
drivers/iio/adc/ad7192.c
928
*val += DIV_ROUND_CLOSEST_ULL((u64)st->aincom_mv * NANO,
drivers/iio/adc/ad7405.c
77
*val = DIV_ROUND_CLOSEST_ULL(st->ref_frequency, st->dec_rate);
drivers/iio/adc/ad7606.c
786
*val = DIV_ROUND_CLOSEST_ULL(NSEC_PER_SEC, cnvst_pwm_state.period);
drivers/iio/adc/ad7768-1.c
711
tmp = DIV_ROUND_CLOSEST_ULL(gain_nano << precision, NANO);
drivers/iio/adc/ad7768-1.c
714
gain_nano = DIV_ROUND_CLOSEST_ULL(gain_nano * PERMYRIAD,
drivers/iio/adc/ad7779.c
413
gain = DIV_ROUND_CLOSEST_ULL((u64)val * 5592405LL, MEGA);
drivers/iio/adc/ad7780.c
160
gain = DIV_ROUND_CLOSEST_ULL(vref, full_scale);
drivers/iio/adc/at91-sama5d2_adc.c
1893
div1 = DIV_ROUND_CLOSEST_ULL(((u64)vtemp * clb->p6), vbg);
drivers/iio/adc/at91-sama5d2_adc.c
1894
div1 = DIV_ROUND_CLOSEST_ULL((div1 * 1000), AT91_ADC_TS_VTEMP_DT);
drivers/iio/adc/at91-sama5d2_adc.c
1895
div2 = DIV_ROUND_CLOSEST_ULL((u64)clb->p4, AT91_ADC_TS_VTEMP_DT);
drivers/iio/dac/adi-axi-dac.c
208
*freq = DIV_ROUND_CLOSEST_ULL(raw * st->dac_clk, BIT(16));
drivers/iio/dac/adi-axi-dac.c
251
scale = DIV_ROUND_CLOSEST_ULL((u64)raw * MEGA,
drivers/iio/dac/adi-axi-dac.c
287
phase = DIV_ROUND_CLOSEST_ULL((u64)raw * AXI_DAC_2_PI_MEGA, U16_MAX);
drivers/iio/dac/adi-axi-dac.c
415
raw = DIV_ROUND_CLOSEST_ULL((u64)phase * U16_MAX, AXI_DAC_2_PI_MEGA);
drivers/iio/imu/adis16480.c
698
*val = DIV_ROUND_CLOSEST_ULL(temp, st->chip_info->temp_scale);
drivers/iio/imu/bmi270/bmi270_core.c
1159
raw = DIV_ROUND_CLOSEST_ULL(tmp, BMI270_G_MICRO_M_S_2);
drivers/iio/imu/bmi270/bmi270_core.c
1218
*val = DIV_ROUND_CLOSEST_ULL(tmp,
drivers/media/dvb-frontends/af9013.c
172
freq_cw = DIV_ROUND_CLOSEST_ULL((u64)sampling_freq * 0x800000,
drivers/media/dvb-frontends/af9033.c
435
utmp = DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x800000,
drivers/media/dvb-frontends/cx24120.c
1246
inv_vco = DIV_ROUND_CLOSEST_ULL(0x400000000ULL, vco);
drivers/media/dvb-frontends/cxd2820r_c.c
67
utmp = 0x4000 - DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x4000, CXD2820R_CLK);
drivers/media/dvb-frontends/cxd2820r_t.c
92
utmp = DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x1000000, CXD2820R_CLK);
drivers/media/dvb-frontends/cxd2820r_t2.c
109
utmp = DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x1000000, CXD2820R_CLK);
drivers/media/dvb-frontends/m88ds3103.c
1344
c->symbol_rate = DIV_ROUND_CLOSEST_ULL((u64)(buf[1] << 8 | buf[0] << 0) * dev->mclk, 0x10000);
drivers/media/dvb-frontends/m88ds3103.c
952
u16tmp = DIV_ROUND_CLOSEST_ULL((u64)c->symbol_rate * 0x10000, dev->mclk);
drivers/media/dvb-frontends/mn88472.c
316
utmp = DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x1000000, dev->clk);
drivers/media/dvb-frontends/mn88473.c
103
uitmp = DIV_ROUND_CLOSEST_ULL((u64) if_frequency * 0x1000000, dev->clk);
drivers/media/rc/ir-spi.c
49
buffer[i] = DIV_ROUND_CLOSEST_ULL((u64)buffer[i] * idata->freq,
drivers/misc/dw-xdata-pcie.c
158
rate = DIV_ROUND_CLOSEST_ULL(rate, time);
drivers/mmc/host/sdhci-msm.c
702
mclk_freq = DIV_ROUND_CLOSEST_ULL((host->clock * 8),
drivers/mmc/host/sdhci-msm.c
705
mclk_freq = DIV_ROUND_CLOSEST_ULL((host->clock * 4),
drivers/mmc/host/sdhci-of-arasan.c
1229
u32 mhz = DIV_ROUND_CLOSEST_ULL(clk_get_rate(pltfm_host->clk), 1000000);
drivers/mmc/host/sdhci-of-arasan.c
1806
mhz = DIV_ROUND_CLOSEST_ULL(clk_get_rate(pltfm_host->clk), 1000000);
drivers/mtd/nand/raw/denali.c
791
mult_x = DIV_ROUND_CLOSEST_ULL(denali->clk_x_rate, denali->clk_rate);
drivers/net/ethernet/ti/davinci_cpdma.c
471
idle_cnt = DIV_ROUND_CLOSEST_ULL(divident, divisor);
drivers/net/ethernet/ti/davinci_cpdma.c
475
new_rate = DIV_ROUND_CLOSEST_ULL(divident, divisor);
drivers/net/ethernet/ti/davinci_cpdma.c
496
send_cnt = DIV_ROUND_CLOSEST_ULL(divident, ch->rate);
drivers/net/phy/bcm54140.c
102
#define BCM54140_HWMON_FROM_IN_3V3(v) DIV_ROUND_CLOSEST_ULL(((v) << 12), 4400)
drivers/net/phy/bcm54140.c
84
#define BCM54140_HWMON_FROM_TEMP(v) DIV_ROUND_CLOSEST_ULL(413350L - (v), 491)
drivers/net/phy/bcm54140.c
93
#define BCM54140_HWMON_FROM_IN_1V0(v) DIV_ROUND_CLOSEST_ULL(((v) << 11), 2514)
drivers/net/pse-pd/pse_core.c
1872
uA = DIV_ROUND_CLOSEST_ULL(tmp_64, uV);
drivers/net/pse-pd/pse_core.c
776
ret = DIV_ROUND_CLOSEST_ULL(tmp_64, uV);
drivers/net/pse-pd/pse_core.c
812
mW = DIV_ROUND_CLOSEST_ULL(tmp_64, 1000000000);
drivers/net/pse-pd/si3474.c
371
tmp_64 = DIV_ROUND_CLOSEST_ULL(tmp_64, 1000);
drivers/net/pse-pd/si3474.c
453
return DIV_ROUND_CLOSEST_ULL(tmp_64, 1000000000);
drivers/net/pse-pd/tps23881.c
401
tmp_64 = DIV_ROUND_CLOSEST_ULL(tmp_64, 1000);
drivers/net/pse-pd/tps23881.c
452
return DIV_ROUND_CLOSEST_ULL(tmp_64, 1000000000);
drivers/net/pse-pd/tps23881.c
512
pw_pol = DIV_ROUND_CLOSEST_ULL(max_mW, TPS23881_MW_STEP);
drivers/nvmem/imx-ocotp.c
304
strobe_prog = DIV_ROUND_CLOSEST_ULL((u64)clk_rate * DEF_STROBE_PROG,
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
1166
max_prediv = DIV_ROUND_CLOSEST_ULL(fin, 6 * MSEC_PER_SEC);
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
1171
_fbdiv = DIV_ROUND_CLOSEST_ULL(fvco * _prediv, 2 * fin);
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
1183
tmp = DIV_ROUND_CLOSEST_ULL((_fbdiv * fin * 2 * 1000), _prediv);
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
1184
tmp += DIV_ROUND_CLOSEST_ULL((_dsm * fin * 1000), _prediv << 15);
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
1193
best_freq = DIV_ROUND_CLOSEST_ULL(tmp, 1000) * MSEC_PER_SEC;
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
2303
return DIV_ROUND_CLOSEST_ULL(rate * 8, hdptx->hdmi_cfg.bpc);
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
2335
req->rate = DIV_ROUND_CLOSEST_ULL(hdptx->hdmi_cfg.rate * 8, hdptx->hdmi_cfg.bpc);
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
2347
link_rate = DIV_ROUND_CLOSEST_ULL(rate * hdptx->hdmi_cfg.bpc, 8);
drivers/powercap/dtpm.c
246
power = DIV_ROUND_CLOSEST_ULL(
drivers/pwm/pwm-bcm2835.c
67
period_cycles = DIV_ROUND_CLOSEST_ULL(state->period * pc->rate, NSEC_PER_SEC);
drivers/pwm/pwm-bcm2835.c
76
val = DIV_ROUND_CLOSEST_ULL(state->duty_cycle * pc->rate, NSEC_PER_SEC);
drivers/pwm/pwm-dwc-core.c
52
tmp = DIV_ROUND_CLOSEST_ULL(state->duty_cycle, dwc->clk_ns);
drivers/pwm/pwm-dwc-core.c
57
tmp = DIV_ROUND_CLOSEST_ULL(state->period - state->duty_cycle,
drivers/pwm/pwm-imx-tpm.c
116
real_state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate);
drivers/pwm/pwm-imx-tpm.c
154
state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate);
drivers/pwm/pwm-imx-tpm.c
98
clock_unit = DIV_ROUND_CLOSEST_ULL(tmp, NSEC_PER_SEC);
drivers/pwm/pwm-lpss.c
142
base_unit = DIV_ROUND_CLOSEST_ULL(freq, c);
drivers/pwm/pwm-omap-dmtimer.c
218
DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * duty_cycles,
drivers/pwm/pwm-omap-dmtimer.c
220
DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * period_cycles,
drivers/pwm/pwm-omap-dmtimer.c
82
return DIV_ROUND_CLOSEST_ULL((u64)clk_rate * ns, NSEC_PER_SEC);
drivers/pwm/pwm-sprd.c
108
state->period = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate);
drivers/pwm/pwm-sprd.c
113
state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate);
drivers/pwm/pwm-sprd.c
144
prescale = DIV_ROUND_CLOSEST_ULL(tmp, SPRD_PWM_MOD_MAX) - 1;
drivers/pwm/pwm-stm32-lp.c
338
state->period = DIV_ROUND_CLOSEST_ULL(tmp, rate);
drivers/pwm/pwm-stm32-lp.c
343
state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate);
drivers/pwm/pwm-sun4i.c
159
state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
drivers/pwm/pwm-sun4i.c
162
state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
drivers/pwm/pwm-tegra.c
109
c = DIV_ROUND_CLOSEST_ULL(c, period_ns);
drivers/regulator/adp5055-regulator.c
162
DIV_ROUND_CLOSEST_ULL(192000 - adp5055->dvs_limit_upper[i], 12000));
drivers/regulator/adp5055-regulator.c
164
DIV_ROUND_CLOSEST_ULL(adp5055->dvs_limit_lower[i] + 190500, 12000));
drivers/regulator/pwm-regulator.c
185
voltage = DIV_ROUND_CLOSEST_ULL((u64)voltage * diff_uV, diff_duty);
drivers/regulator/pwm-regulator.c
218
dutycycle = DIV_ROUND_CLOSEST_ULL((u64)(req_min_uV - min_uV) *
drivers/regulator/vctrl-regulator.c
54
DIV_ROUND_CLOSEST_ULL((s64)(out_uV - out->min_uV) *
drivers/regulator/vctrl-regulator.c
76
DIV_ROUND_CLOSEST_ULL((s64)(ctrl_uV - ctrl->min_uV) *
drivers/rtc/rtc-renesas-rtca3.c
580
priv->ppb.ten_sec = DIV_ROUND_CLOSEST_ULL(1000000000ULL, (osc32k_rate * 10));
drivers/rtc/rtc-renesas-rtca3.c
581
priv->ppb.sixty_sec = DIV_ROUND_CLOSEST_ULL(1000000000ULL, (osc32k_rate * 60));
drivers/soc/amlogic/meson-clk-measure.c
835
return DIV_ROUND_CLOSEST_ULL((val & MSR_VAL_MASK) * 1000000ULL,
drivers/staging/media/imx/imx-media-fim.c
85
fim->nominal = DIV_ROUND_CLOSEST_ULL(1000000ULL * (u64)fi->numerator,
drivers/thermal/gov_power_allocator.c
375
pa->granted_power = DIV_ROUND_CLOSEST_ULL(req_range,
drivers/thermal/gov_power_allocator.c
401
pa->granted_power += DIV_ROUND_CLOSEST_ULL(extra_range,
drivers/tty/serial/8250/8250_bcm7271.c
699
*percent = (unsigned long)DIV_ROUND_CLOSEST_ULL(hires_err, baud);
drivers/usb/gadget/function/u_audio.c
144
ff = DIV_ROUND_CLOSEST_ULL((freq * pitch), 1953125);
drivers/video/backlight/pwm_bl.c
206
retval = DIV_ROUND_CLOSEST_ULL(retval, PWM_LUMINANCE_SCALE);
include/drm/drm_color_mgmt.h
46
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
include/drm/drm_color_mgmt.h
65
return DIV_ROUND_CLOSEST_ULL((u64)user_input * max,
include/linux/pwm.h
232
return DIV_ROUND_CLOSEST_ULL((u64)state->duty_cycle * scale,
include/linux/pwm.h
261
state->duty_cycle = DIV_ROUND_CLOSEST_ULL((u64)duty_cycle *
kernel/cgroup/cgroup.c
7396
frac = DIV_ROUND_CLOSEST_ULL(frac, power_of_ten(flen - dec_shift));
kernel/locking/qspinlock_stat.h
74
frac = DIV_ROUND_CLOSEST_ULL(frac, kicks);
kernel/locking/qspinlock_stat.h
89
sum = DIV_ROUND_CLOSEST_ULL(sum, kicks);
kernel/sched/core.c
9380
req.util = DIV_ROUND_CLOSEST_ULL(req.util, UCLAMP_PERCENT_SCALE);
kernel/sched/sched.h
263
return DIV_ROUND_CLOSEST_ULL(cgrp_weight * 1024, CGROUP_WEIGHT_DFL);
kernel/sched/sched.h
269
DIV_ROUND_CLOSEST_ULL(weight * CGROUP_WEIGHT_DFL, 1024),
net/ipv4/fib_semantics.c
856
upper_bound = DIV_ROUND_CLOSEST_ULL((u64)w << 31,
net/ipv4/nexthop.c
1921
upper_bound = DIV_ROUND_CLOSEST_ULL(btw, total);
net/ipv4/nexthop.c
1999
upper_bound = DIV_ROUND_CLOSEST_ULL((u64)w << 31, total) - 1;
net/ipv6/route.c
4830
upper_bound = DIV_ROUND_CLOSEST_ULL((u64) (*weight) << 31,
sound/soc/codecs/max98088.c
1062
ni = DIV_ROUND_CLOSEST_ULL(ni, pclk);
sound/soc/codecs/max98088.c
992
ni = DIV_ROUND_CLOSEST_ULL(ni, pclk);
sound/soc/codecs/max9860.c
398
n = DIV_ROUND_CLOSEST_ULL(65536ULL * 96 * params_rate(params),
sound/soc/codecs/max9867.c
332
unsigned int ni = DIV_ROUND_CLOSEST_ULL(96ULL * 0x10000 * params_rate(params),
sound/soc/codecs/pcm512x.c
841
K = DIV_ROUND_CLOSEST_ULL(10000ULL * pll_rate * P, pllin_rate);
sound/soc/loongson/loongson_i2s.c
92
mclk_ratio_frac = DIV_ROUND_CLOSEST_ULL(((u64)clk_rate << 16),