/linux-master/drivers/hwmon/ |
H A D | max31730.c | 57 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 D | ltc2991.c | 93 *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 D | ad7314.c | 83 DIV_ROUND_CLOSEST(data * 3125, 100));
|
H A D | sparx5-temp.c | 58 value = DIV_ROUND_CLOSEST(value * 3522, 4096) - 1094;
|
H A D | as370-hwmon.c | 56 *temp = DIV_ROUND_CLOSEST(val * 251802, 4096) - 85525;
|
H A D | axi-fan-control.c | 116 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 D | adc128d818.c | 157 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 D | intel_llc.c | 111 ia_freq = DIV_ROUND_CLOSEST(ia_freq, 100);
|
/linux-master/drivers/clk/at91/ |
H A D | clk-generated.c | 105 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 D | pwm-clps711x.c | 34 pwm->args.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, freq);
|
/linux-master/drivers/clk/ |
H A D | clk-lmk04832.c | 472 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 D | ddk750_chip.c | 105 divisor = DIV_ROUND_CLOSEST(get_mxclk_freq(), frequency); 157 divisor = DIV_ROUND_CLOSEST(get_mxclk_freq(), frequency);
|
/linux-master/drivers/clocksource/ |
H A D | jcore-pit.c | 113 freq = DIV_ROUND_CLOSEST(NSEC_PER_SEC, buspd); 114 pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd);
|
H A D | timer-stm32-lp.c | 114 if (DIV_ROUND_CLOSEST(*rate, 1 << i) < STM32_TARGET_CLKRATE) 121 *rate = DIV_ROUND_CLOSEST(*rate, (1 << i));
|
H A D | timer-stm32.c | 212 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 D | clk-iproc-asiu.c | 112 div = DIV_ROUND_CLOSEST(*parent_rate, rate); 138 div = DIV_ROUND_CLOSEST(parent_rate, rate);
|
/linux-master/drivers/clk/zynqmp/ |
H A D | pll.c | 117 fbdiv = DIV_ROUND_CLOSEST(rate, *prate); 209 fbdiv = DIV_ROUND_CLOSEST(rate, parent_rate);
|
/linux-master/drivers/power/supply/ |
H A D | sc27xx_fuel_gauge.c | 149 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 D | power_supply_hwmon.c | 230 pspval.intval = DIV_ROUND_CLOSEST(pspval.intval, 1000); 280 pspval.intval = DIV_ROUND_CLOSEST(pspval.intval, 100);
|
/linux-master/kernel/time/ |
H A D | sched_clock.c | 213 r = DIV_ROUND_CLOSEST(r, 1000000); 216 r = DIV_ROUND_CLOSEST(r, 1000);
|
/linux-master/drivers/input/touchscreen/ |
H A D | resistive-adc-touch.c | 78 Rt = DIV_ROUND_CLOSEST(Rt, 16); 81 Rt = DIV_ROUND_CLOSEST(Rt, 256);
|
/linux-master/drivers/media/rc/ |
H A D | pwm-ir-tx.c | 72 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 D | mp2975.c | 245 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 D | red.h | 110 #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 D | ad7124.c | 273 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);
|