Searched refs:DIV_ROUND_CLOSEST (Results 51 - 75 of 483) sorted by relevance

1234567891011>>

/linux-master/drivers/hwmon/
H A Dmax31730.c57 return DIV_ROUND_CLOSEST((temp >> 4) * 1000, 16);
207 val = DIV_ROUND_CLOSEST(val, 125);
219 val = DIV_ROUND_CLOSEST(val << 4, 1000) << 4;
H A Dltc2991.c93 *val = DIV_ROUND_CLOSEST(sign_extend32(reg_val, 14) * 30518,
127 *val = DIV_ROUND_CLOSEST(sign_extend32(reg_val, 14) * 19075,
158 *val = DIV_ROUND_CLOSEST(sign_extend32(reg_val, 12) * 1000, 16);
H A Dad7314.c83 DIV_ROUND_CLOSEST(data * 3125, 100));
H A Dsparx5-temp.c58 value = DIV_ROUND_CLOSEST(value * 3522, 4096) - 1094;
H A Das370-hwmon.c56 *temp = DIV_ROUND_CLOSEST(val * 251802, 4096) - 85525;
H A Daxi-fan-control.c116 return DIV_ROUND_CLOSEST(pwm_width * SYSFS_PWM_MAX, pwm_period);
126 new_width = DIV_ROUND_CLOSEST(__val * pwm_period, SYSFS_PWM_MAX);
148 return DIV_ROUND_CLOSEST(60 * ctl->clk_rate, ctl->ppr * tach);
352 u32 tach_tol = DIV_ROUND_CLOSEST(new_tach * 25, 100);
H A Dadc128d818.c157 val = DIV_ROUND_CLOSEST(data->in[index][nr] * data->vref, 4095);
178 regval = clamp_val(DIV_ROUND_CLOSEST(val, 10), 0, 255);
216 regval = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127);
450 data->vref = DIV_ROUND_CLOSEST(vref, 1000);
/linux-master/drivers/gpu/drm/i915/gt/
H A Dintel_llc.c111 ia_freq = DIV_ROUND_CLOSEST(ia_freq, 100);
/linux-master/drivers/clk/at91/
H A Dclk-generated.c105 return DIV_ROUND_CLOSEST(parent_rate, gck->gckdiv + 1);
160 min_rate = DIV_ROUND_CLOSEST(parent_rate, GENERATED_MAX_DIV + 1);
165 div = DIV_ROUND_CLOSEST(parent_rate, req->rate);
256 div = DIV_ROUND_CLOSEST(parent_rate, rate);
/linux-master/drivers/pwm/
H A Dpwm-clps711x.c34 pwm->args.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, freq);
/linux-master/drivers/clk/
H A Dclk-lmk04832.c472 num = DIV_ROUND_CLOSEST(rate, div);
473 pll2_r = DIV_ROUND_CLOSEST(prate, div);
491 return DIV_ROUND_CLOSEST(prate * 2 * pll2_p * pll2_n, pll2_r);
888 return DIV_ROUND_CLOSEST(prate, sysref_div);
898 sysref_div = DIV_ROUND_CLOSEST(*prate, rate);
899 sclk_rate = DIV_ROUND_CLOSEST(*prate, sysref_div);
919 sysref_div = DIV_ROUND_CLOSEST(prate, rate);
1067 rate = DIV_ROUND_CLOSEST(prate, dclk_div);
1080 dclk_div = DIV_ROUND_CLOSEST(*prate, rate);
1081 dclk_rate = DIV_ROUND_CLOSEST(*prat
[all...]
/linux-master/drivers/staging/sm750fb/
H A Dddk750_chip.c105 divisor = DIV_ROUND_CLOSEST(get_mxclk_freq(), frequency);
157 divisor = DIV_ROUND_CLOSEST(get_mxclk_freq(), frequency);
/linux-master/drivers/clocksource/
H A Djcore-pit.c113 freq = DIV_ROUND_CLOSEST(NSEC_PER_SEC, buspd);
114 pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd);
H A Dtimer-stm32-lp.c114 if (DIV_ROUND_CLOSEST(*rate, 1 << i) < STM32_TARGET_CLKRATE)
121 *rate = DIV_ROUND_CLOSEST(*rate, (1 << i));
H A Dtimer-stm32.c212 prescaler = DIV_ROUND_CLOSEST(timer_of_rate(to),
227 to->of_clk.rate = DIV_ROUND_CLOSEST(to->of_clk.rate, prescaler);
/linux-master/drivers/clk/bcm/
H A Dclk-iproc-asiu.c112 div = DIV_ROUND_CLOSEST(*parent_rate, rate);
138 div = DIV_ROUND_CLOSEST(parent_rate, rate);
/linux-master/drivers/clk/zynqmp/
H A Dpll.c117 fbdiv = DIV_ROUND_CLOSEST(rate, *prate);
209 fbdiv = DIV_ROUND_CLOSEST(rate, parent_rate);
/linux-master/drivers/power/supply/
H A Dsc27xx_fuel_gauge.c149 return DIV_ROUND_CLOSEST(vol * data->vol_1000mv_adc, 1000);
438 temp = DIV_ROUND_CLOSEST(delta_clbcnt * 10, 36 * SC27XX_FGU_SAMPLE_HZ);
445 delta_cap = DIV_ROUND_CLOSEST(temp * 100, data->total_cap);
665 value = DIV_ROUND_CLOSEST(value * 10,
949 int cur_cap = DIV_ROUND_CLOSEST(data->total_cap * capacity, 100);
955 return DIV_ROUND_CLOSEST(cur_cap * 36 * data->cur_1000ma_adc * SC27XX_FGU_SAMPLE_HZ, 10);
983 data->vol_1000mv_adc = DIV_ROUND_CLOSEST(cal_4200mv * 10, 42);
985 DIV_ROUND_CLOSEST(data->vol_1000mv_adc * 4 * data->calib_resist,
H A Dpower_supply_hwmon.c230 pspval.intval = DIV_ROUND_CLOSEST(pspval.intval, 1000);
280 pspval.intval = DIV_ROUND_CLOSEST(pspval.intval, 100);
/linux-master/kernel/time/
H A Dsched_clock.c213 r = DIV_ROUND_CLOSEST(r, 1000000);
216 r = DIV_ROUND_CLOSEST(r, 1000);
/linux-master/drivers/input/touchscreen/
H A Dresistive-adc-touch.c78 Rt = DIV_ROUND_CLOSEST(Rt, 16);
81 Rt = DIV_ROUND_CLOSEST(Rt, 256);
/linux-master/drivers/media/rc/
H A Dpwm-ir-tx.c72 state.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, pwm_ir->carrier);
102 state.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, pwm_ir->carrier);
/linux-master/drivers/hwmon/pmbus/
H A Dmp2975.c245 return max_t(int, DIV_ROUND_CLOSEST(ret, data->info.phases[page]),
246 DIV_ROUND_CLOSEST(ph_curr, data->curr_sense_gain[page]));
328 ret = DIV_ROUND_CLOSEST(ret, MP2975_VIN_UV_LIMIT_UNIT);
485 ret = DIV_ROUND_CLOSEST(ret, MP2975_VIN_UV_LIMIT_UNIT);
510 ret = DIV_ROUND_CLOSEST(data->vref[page] * 10 - 50 *
520 ret = DIV_ROUND_CLOSEST(ret, 4);
529 ret = DIV_ROUND_CLOSEST(ret, 4);
934 DIV_ROUND_CLOSEST(data->vref_off[i] *
/linux-master/include/net/
H A Dred.h110 #define RED_ONE_PERCENT ((u32)DIV_ROUND_CLOSEST(1ULL<<32, 100))
461 max_p_delta = DIV_ROUND_CLOSEST(p->max_P, p->qth_delta);
/linux-master/drivers/iio/adc/
H A Dad7124.c273 odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * 32);
283 st->channels[channel].cfg.odr = DIV_ROUND_CLOSEST(fclk, odr_sel_bits * 32);
296 return DIV_ROUND_CLOSEST(fadc * 230, 1000);
298 return DIV_ROUND_CLOSEST(fadc * 262, 1000);
312 sinc4_3db_odr = DIV_ROUND_CLOSEST(freq * 1000, 230);
313 sinc3_3db_odr = DIV_ROUND_CLOSEST(freq * 1000, 262);
661 res = DIV_ROUND_CLOSEST(vref, full_scale);
662 gain = DIV_ROUND_CLOSEST(res, val2);

Completed in 220 milliseconds

1234567891011>>