/linux-master/drivers/gpu/drm/i915/gt/ |
H A D | intel_rps.c | 1614 return DIV_ROUND_CLOSEST(rps->gpll_ref_freq * (val - 0xb7), 1000); 1619 return DIV_ROUND_CLOSEST(1000 * val, rps->gpll_ref_freq) + 0xb7; 1628 return DIV_ROUND_CLOSEST(rps->gpll_ref_freq * val, 2 * 2 * 1000); 1634 return DIV_ROUND_CLOSEST(2 * 1000 * val, rps->gpll_ref_freq) * 2; 1642 return DIV_ROUND_CLOSEST(val * GT_FREQUENCY_MULTIPLIER, 1659 return DIV_ROUND_CLOSEST(val * GEN9_FREQ_SCALER, 1666 return DIV_ROUND_CLOSEST(val, GT_FREQUENCY_MULTIPLIER); 2206 return DIV_ROUND_CLOSEST(slpc->rp0_freq, 2526 return DIV_ROUND_CLOSEST(slpc->min_freq,
|
/linux-master/drivers/net/ipa/ |
H A D | ipa_endpoint.c | 946 ticks = DIV_ROUND_CLOSEST(microseconds, 100); 952 ticks = DIV_ROUND_CLOSEST(microseconds, 1000); 959 ticks = DIV_ROUND_CLOSEST(microseconds, 100); 989 ticks = DIV_ROUND_CLOSEST(microseconds, IPA_AGGR_GRANULARITY); 1075 ticks = DIV_ROUND_CLOSEST(microseconds * rate, 128 * USEC_PER_SEC); 1587 extra = DIV_ROUND_CLOSEST(unused * len, total_len);
|
/linux-master/drivers/hwmon/ |
H A D | adt7462.c | 803 temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; 839 temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; 901 temp = DIV_ROUND_CLOSEST(temp, x); 941 temp = DIV_ROUND_CLOSEST(temp, x); 1194 temp = DIV_ROUND_CLOSEST(temp, 1000); 1276 temp = DIV_ROUND_CLOSEST(temp, 1000) + 64;
|
H A D | nzxt-smart2.c | 218 return max(1L, DIV_ROUND_CLOSEST(min(val, orig_max) * new_max, orig_max)); 549 return clamp_val(1 + DIV_ROUND_CLOSEST(interval - 488, 256), 0, 255);
|
H A D | tmp401.c | 274 return DIV_ROUND_CLOSEST(temp * 125, 32); 286 return DIV_ROUND_CLOSEST(temp * (1 << (8 - zbits)), 1000) << zbits;
|
H A D | emc2103.c | 243 val = DIV_ROUND_CLOSEST(clamp_val(val, -63000, 127000), 1000); 265 val = DIV_ROUND_CLOSEST(clamp_val(val, -63000, 127000), 1000);
|
/linux-master/drivers/media/rc/ |
H A D | serial_ir.c | 226 pulse = DIV_ROUND_CLOSEST(serial_ir.duty_cycle * (NSEC_PER_SEC / 100), 228 space = DIV_ROUND_CLOSEST((100 - serial_ir.duty_cycle) *
|
H A D | iguanair.c | 283 cycles = DIV_ROUND_CLOSEST(24000000, carrier * 2) - 329 periods = DIV_ROUND_CLOSEST(txbuf[i] * ir->carrier, 1000000);
|
H A D | ir_toy.c | 314 u16 v = DIV_ROUND_CLOSEST(txbuf[i], UNIT_US); 380 buf[1] = DIV_ROUND_CLOSEST(48000000, 16 * carrier) - 1;
|
/linux-master/drivers/hwmon/pmbus/ |
H A D | max20730.c | 61 #define VOLT_FROM_REG(val) DIV_ROUND_CLOSEST((val), 1 << 9) 414 d = DIV_ROUND_CLOSEST(d, 10);
|
/linux-master/drivers/rtc/ |
H A D | rtc-rs5c372.c | 608 steps = DIV_ROUND_CLOSEST(offset, 1017); 627 steps = DIV_ROUND_CLOSEST(offset, ppb_per_step);
|
H A D | rtc-pcf85063.c | 277 mode0 = DIV_ROUND_CLOSEST(offset, PCF85063_OFFSET_STEP0); 278 mode1 = DIV_ROUND_CLOSEST(offset, PCF85063_OFFSET_STEP1);
|
H A D | rtc-armada38x.c | 434 off = DIV_ROUND_CLOSEST(ppb_cor, 954); 437 off = DIV_ROUND_CLOSEST(ppb_cor, 3815);
|
/linux-master/drivers/gpu/drm/i915/display/ |
H A D | intel_pch_refclk.c | 136 return DIV_ROUND_CLOSEST(p->iclk_virtual_root_freq, 151 p->desired_divisor = DIV_ROUND_CLOSEST(p->iclk_virtual_root_freq,
|
H A D | intel_backlight.c | 1014 return DIV_ROUND_CLOSEST(KHz(RUNTIME_INFO(i915)->rawclk_freq), 1023 return DIV_ROUND_CLOSEST(KHz(19200), pwm_freq_hz); 1041 return DIV_ROUND_CLOSEST(MHz(24), pwm_freq_hz * mul); 1065 return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * mul); 1076 return DIV_ROUND_CLOSEST(KHz(RUNTIME_INFO(i915)->rawclk_freq), 1098 return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * 32); 1116 return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * 128); 1140 return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * mul);
|
H A D | intel_dpll.c | 322 DIV_ROUND_CLOSEST(refclk * clock->m, clock->n); 324 DIV_ROUND_CLOSEST(clock->vco, clock->p); 340 DIV_ROUND_CLOSEST(refclk * clock->m, clock->n + 2); 342 DIV_ROUND_CLOSEST(clock->vco, clock->p); 353 DIV_ROUND_CLOSEST(refclk * clock->m, clock->n); 355 DIV_ROUND_CLOSEST(clock->vco, clock->p); 368 DIV_ROUND_CLOSEST(clock->vco, clock->p); 882 clock.m2 = DIV_ROUND_CLOSEST(target * clock.p * clock.n,
|
H A D | intel_dp_aux.c | 86 return DIV_ROUND_CLOSEST(RUNTIME_INFO(i915)->rawclk_freq, 2000); 107 return DIV_ROUND_CLOSEST(freq, 2000);
|
/linux-master/drivers/gpu/drm/i915/gt/uc/ |
H A D | intel_guc_slpc.c | 344 return DIV_ROUND_CLOSEST(REG_FIELD_GET(SLPC_MIN_UNSLICE_FREQ_MASK, 355 return DIV_ROUND_CLOSEST(REG_FIELD_GET(SLPC_MAX_UNSLICE_FREQ_MASK,
|
/linux-master/drivers/hsi/controllers/ |
H A D | omap_ssi_core.c | 305 omap_ssi->fck_rate = DIV_ROUND_CLOSEST(clk_data->new_rate, 1000); /* kHz */ 437 omap_ssi->fck_rate = DIV_ROUND_CLOSEST(ssi_get_clk_rate(ssi), 1000);
|
/linux-master/drivers/pinctrl/visconti/ |
H A D | pinctrl-common.c | 99 set_val = DIV_ROUND_CLOSEST(arg, 2) - 1;
|
/linux-master/drivers/clk/renesas/ |
H A D | clk-div6.c | 99 div = DIV_ROUND_CLOSEST(parent_rate, rate);
|
/linux-master/drivers/iio/adc/ |
H A D | ad7780.c | 161 gain = DIV_ROUND_CLOSEST(gain, val2);
|
/linux-master/drivers/clocksource/ |
H A D | timer-sp804.c | 215 common_clkevt->reload = DIV_ROUND_CLOSEST(rate, HZ);
|
/linux-master/drivers/comedi/drivers/ |
H A D | adv_pci1760.c | 182 divisor = DIV_ROUND_CLOSEST(ns, PCI1760_PWM_TIMEBASE);
|
/linux-master/sound/soc/spear/ |
H A D | spdif_out.c | 97 divider = DIV_ROUND_CLOSEST(clk_get_rate(host->clk), (rate * 128));
|