Searched refs:DIV_ROUND_CLOSEST (Results 176 - 200 of 482) sorted by relevance

1234567891011>>

/linux-master/drivers/gpu/drm/i915/gt/
H A Dintel_rps.c1614 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 Dipa_endpoint.c946 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 Dadt7462.c803 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 Dnzxt-smart2.c218 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 Dtmp401.c274 return DIV_ROUND_CLOSEST(temp * 125, 32);
286 return DIV_ROUND_CLOSEST(temp * (1 << (8 - zbits)), 1000) << zbits;
H A Demc2103.c243 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 Dserial_ir.c226 pulse = DIV_ROUND_CLOSEST(serial_ir.duty_cycle * (NSEC_PER_SEC / 100),
228 space = DIV_ROUND_CLOSEST((100 - serial_ir.duty_cycle) *
H A Diguanair.c283 cycles = DIV_ROUND_CLOSEST(24000000, carrier * 2) -
329 periods = DIV_ROUND_CLOSEST(txbuf[i] * ir->carrier, 1000000);
H A Dir_toy.c314 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 Dmax20730.c61 #define VOLT_FROM_REG(val) DIV_ROUND_CLOSEST((val), 1 << 9)
414 d = DIV_ROUND_CLOSEST(d, 10);
/linux-master/drivers/rtc/
H A Drtc-rs5c372.c608 steps = DIV_ROUND_CLOSEST(offset, 1017);
627 steps = DIV_ROUND_CLOSEST(offset, ppb_per_step);
H A Drtc-pcf85063.c277 mode0 = DIV_ROUND_CLOSEST(offset, PCF85063_OFFSET_STEP0);
278 mode1 = DIV_ROUND_CLOSEST(offset, PCF85063_OFFSET_STEP1);
H A Drtc-armada38x.c434 off = DIV_ROUND_CLOSEST(ppb_cor, 954);
437 off = DIV_ROUND_CLOSEST(ppb_cor, 3815);
/linux-master/drivers/gpu/drm/i915/display/
H A Dintel_pch_refclk.c136 return DIV_ROUND_CLOSEST(p->iclk_virtual_root_freq,
151 p->desired_divisor = DIV_ROUND_CLOSEST(p->iclk_virtual_root_freq,
H A Dintel_backlight.c1014 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 Dintel_dpll.c322 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 Dintel_dp_aux.c86 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 Dintel_guc_slpc.c344 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 Domap_ssi_core.c305 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 Dpinctrl-common.c99 set_val = DIV_ROUND_CLOSEST(arg, 2) - 1;
/linux-master/drivers/clk/renesas/
H A Dclk-div6.c99 div = DIV_ROUND_CLOSEST(parent_rate, rate);
/linux-master/drivers/iio/adc/
H A Dad7780.c161 gain = DIV_ROUND_CLOSEST(gain, val2);
/linux-master/drivers/clocksource/
H A Dtimer-sp804.c215 common_clkevt->reload = DIV_ROUND_CLOSEST(rate, HZ);
/linux-master/drivers/comedi/drivers/
H A Dadv_pci1760.c182 divisor = DIV_ROUND_CLOSEST(ns, PCI1760_PWM_TIMEBASE);
/linux-master/sound/soc/spear/
H A Dspdif_out.c97 divider = DIV_ROUND_CLOSEST(clk_get_rate(host->clk), (rate * 128));

Completed in 649 milliseconds

1234567891011>>