/linux-master/include/linux/ |
H A D | units.h | 66 return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DEGREE); 73 return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DEGREE); 80 return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DECIDEGREE); 104 return DIV_ROUND_CLOSEST(t, MILLIDEGREE_PER_DECIDEGREE); 109 return t + DIV_ROUND_CLOSEST(ABSOLUTE_ZERO_MILLICELSIUS, 115 return t - DIV_ROUND_CLOSEST(ABSOLUTE_ZERO_MILLICELSIUS,
|
H A D | util_macros.h | 13 if (__fc_x op DIV_ROUND_CLOSEST(__fc_a[__fc_i] + \
|
/linux-master/drivers/clk/ |
H A D | clk-clps711x.c | 74 f_spi = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 96); 76 f_pwm = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 128); 83 f_spi = DIV_ROUND_CLOSEST(f_cpu, 576); 84 f_pwm = DIV_ROUND_CLOSEST(f_cpu, 768); 89 f_tim = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 26); 91 f_tim = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 24); 93 f_tim = DIV_ROUND_CLOSEST(f_cpu, 144);
|
/linux-master/drivers/gpu/drm/nouveau/nvkm/subdev/volt/ |
H A D | gk20a.c | 56 mv = DIV_ROUND_CLOSEST(coef->c2 * speedo, s_scale); 57 mv = DIV_ROUND_CLOSEST((mv + coef->c1) * speedo, s_scale) + coef->c0; 74 mv = DIV_ROUND_CLOSEST(coef->c3 * speedo, s_scale) + coef->c4 + 75 DIV_ROUND_CLOSEST(coef->c5 * temp, t_scale); 76 mv = DIV_ROUND_CLOSEST(mv * temp, t_scale) + cvb_mv;
|
/linux-master/drivers/gpu/drm/vkms/ |
H A D | vkms_formats.c | 165 dst_pixels[3] = DIV_ROUND_CLOSEST(in_pixel->a, 257); 166 dst_pixels[2] = DIV_ROUND_CLOSEST(in_pixel->r, 257); 167 dst_pixels[1] = DIV_ROUND_CLOSEST(in_pixel->g, 257); 168 dst_pixels[0] = DIV_ROUND_CLOSEST(in_pixel->b, 257); 174 dst_pixels[2] = DIV_ROUND_CLOSEST(in_pixel->r, 257); 175 dst_pixels[1] = DIV_ROUND_CLOSEST(in_pixel->g, 257); 176 dst_pixels[0] = DIV_ROUND_CLOSEST(in_pixel->b, 257);
|
/linux-master/drivers/clk/sunxi-ng/ |
H A D | ccu_phase.c | 52 step = DIV_ROUND_CLOSEST(360, parent_div); 104 step = DIV_ROUND_CLOSEST(360, parent_div); 105 delay = DIV_ROUND_CLOSEST(degrees, step);
|
/linux-master/drivers/hwmon/pmbus/ |
H A D | xdpe12284.c | 52 return 1 + DIV_ROUND_CLOSEST(val - 500, 10); 56 return 1 + DIV_ROUND_CLOSEST(val - 250, 5); 60 return 1 + DIV_ROUND_CLOSEST(val - 200, 10); 64 return DIV_ROUND_CLOSEST((1550 - val) * 100,
|
H A D | mp2888.c | 121 ret = DIV_ROUND_CLOSEST(ret * 200 - 19600, data->curr_sense_gain); 214 ret = data->total_curr_resolution ? ret : DIV_ROUND_CLOSEST(ret, 2); 270 word = DIV_ROUND_CLOSEST(word, MP2888_TEMP_UNIT); 276 word = data->total_curr_resolution ? DIV_ROUND_CLOSEST(word, 8) : 277 DIV_ROUND_CLOSEST(word, 4); 283 word = data->total_curr_resolution ? DIV_ROUND_CLOSEST(word, 4) : 284 DIV_ROUND_CLOSEST(word, 2);
|
H A D | lm25066.c | 254 ret = DIV_ROUND_CLOSEST(ret * 293, 6140); 258 ret = DIV_ROUND_CLOSEST(ret * 2832, 45400); 262 ret = DIV_ROUND_CLOSEST(ret * 70, 453); 267 ret = DIV_ROUND_CLOSEST(ret * 725, 2180); 335 ret = DIV_ROUND_CLOSEST(ret * 293, 6140); 343 ret = DIV_ROUND_CLOSEST(ret * 293, 6140); 411 word = DIV_ROUND_CLOSEST((int)word * 6140, 293); 418 word = DIV_ROUND_CLOSEST((int)word * 6140, 293);
|
/linux-master/drivers/leds/ |
H A D | leds-ipaq-micro.c | 93 msg.tx_data[2] = (u8) DIV_ROUND_CLOSEST(*delay_on, 100); 97 msg.tx_data[3] = (u8) DIV_ROUND_CLOSEST(*delay_off, 100);
|
/linux-master/drivers/hwmon/ |
H A D | mc13783-adc.c | 79 val = DIV_ROUND_CLOSEST(val * 9, 2); 85 val = DIV_ROUND_CLOSEST(val * 9, 4) + 2400; 104 val = DIV_ROUND_CLOSEST(val * 9, 4); 123 val = DIV_ROUND_CLOSEST(val * 4800, 1024); 126 val = DIV_ROUND_CLOSEST(val * 2555, 1024); 149 ret = DIV_ROUND_CLOSEST(-2635920 + val * 4244, 10);
|
H A D | ads7828.c | 66 DIV_ROUND_CLOSEST(regval * data->lsb_resol, 1000)); 133 vref_mv = DIV_ROUND_CLOSEST(vref_uv, 1000); 152 data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 4096); 156 data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 256);
|
H A D | lan966x-hwmon.c | 147 tmp = DIV_ROUND_CLOSEST(hwmon->clk_rate, 256); 148 *val = DIV_ROUND_CLOSEST(tmp, data); 194 val = DIV_ROUND_CLOSEST(hwmon->clk_rate, val); 195 val = DIV_ROUND_CLOSEST(val, 256) - 1; 307 div = DIV_ROUND_CLOSEST(hwmon->clk_rate, LAN966X_PVT_CLK);
|
H A D | ina2xx.c | 162 return DIV_ROUND_CLOSEST(avg * INA226_TOTAL_CONV_TIME_DEFAULT, 1000); 173 avg = DIV_ROUND_CLOSEST(interval * 1000, 272 val = DIV_ROUND_CLOSEST((s16)regval, data->config->shunt_div); 277 val = DIV_ROUND_CLOSEST(val, 1000); 285 val = DIV_ROUND_CLOSEST(val, 1000); 354 val = DIV_ROUND_CLOSEST(val, data->config->bus_voltage_lsb); 357 val = DIV_ROUND_CLOSEST(val, data->power_lsb_uW); 462 unsigned int dividend = DIV_ROUND_CLOSEST(1000000000, 469 data->current_lsb_uA = DIV_ROUND_CLOSEST(dividend, val);
|
H A D | tmp513.c | 208 *val = DIV_ROUND_CLOSEST(*val * 10 * MILLI, data->shunt_uohms); 224 *val = DIV_ROUND_CLOSEST(*val, MILLI); 236 *val = DIV_ROUND_CLOSEST(*val * 625, 10); 264 val = DIV_ROUND_CLOSEST(val * data->shunt_uohms, 10 * MILLI); 274 val = clamp_val(DIV_ROUND_CLOSEST(val, 4), 0, max_val); 278 regval = clamp_val(DIV_ROUND_CLOSEST(val, data->pwr_lsb_uw), 0, 287 regval = DIV_ROUND_CLOSEST(val * 10, 625) << TMP51X_TEMP_SHIFT; 292 regval = DIV_ROUND_CLOSEST(val, 500); 566 DIV_ROUND_CLOSEST(40960, div));
|
H A D | wm831x-hwmon.c | 41 return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(ret, 1000)); 57 ret = DIV_ROUND_CLOSEST(ret * 10000, 10983);
|
/linux-master/arch/arm/mach-footbridge/ |
H A D | dc21285-timer.c | 110 unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16); 129 unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16);
|
/linux-master/arch/x86/kernel/ |
H A D | tsc_msr.c | 199 freq = DIV_ROUND_CLOSEST(tscref, md->divider); 204 res = DIV_ROUND_CLOSEST(tscref * ratio, md->divider);
|
/linux-master/arch/arm/mach-rpc/ |
H A D | time.c | 25 #define RPC_LATCH DIV_ROUND_CLOSEST(RPC_CLOCK_FREQ, HZ)
|
/linux-master/include/drm/ |
H A D | drm_color_mgmt.h | 49 return DIV_ROUND_CLOSEST(user_input * ((1 << bit_precision) - 1),
|
/linux-master/drivers/media/rc/ |
H A D | meson-ir-tx.c | 81 unsigned int cnt = DIV_ROUND_CLOSEST(ir->clk_rate, ir->carrier); 82 unsigned int pulse_cnt = DIV_ROUND_CLOSEST(cnt * ir->duty_cycle, 100); 116 unsigned int tb_us = DIV_ROUND_CLOSEST(USEC_PER_SEC, ir->carrier); 118 delay = (DIV_ROUND_CLOSEST(time, tb_us) - 1) & IRB_DELAY_MASK; 140 delay = (DIV_ROUND_CLOSEST(time, tb_us) - 1) & IRB_DELAY_MASK;
|
/linux-master/drivers/media/pci/cx23885/ |
H A D | cx23888-ir.c | 181 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, freq * 16)); 186 return DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, (divider + 1) * 16); 192 return DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, 215 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000)); 221 return DIV_ROUND_CLOSEST(count * 1000, 228 return DIV_ROUND_CLOSEST(count, CX23888_IR_REFCLK_FREQ / 1000000); 241 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000, 376 if (*carrier_range_low < DIV_ROUND_CLOSEST(c16, 16 + 3)) { 378 *carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 4); 381 *carrier_range_low = DIV_ROUND_CLOSEST(c1 [all...] |
/linux-master/drivers/media/i2c/cx25840/ |
H A D | cx25840-ir.c | 142 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, freq * 16)); 147 return DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, (divider + 1) * 16); 153 return DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, 176 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); 182 return DIV_ROUND_CLOSEST(count * 1000, 189 return DIV_ROUND_CLOSEST(count, CX25840_IR_REFCLK_FREQ / 1000000); 202 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000, 363 if (*carrier_range_low < DIV_ROUND_CLOSEST(c16, 16 + 3)) { 365 *carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 4); 368 *carrier_range_low = DIV_ROUND_CLOSEST(c1 [all...] |
/linux-master/drivers/clk/rockchip/ |
H A D | clk-mmc-phase.c | 69 degrees += DIV_ROUND_CLOSEST(delay_num * factor, 1000000); 129 delay = DIV_ROUND_CLOSEST(delay,
|
/linux-master/drivers/clk/tegra/ |
H A D | cvb.c | 20 mv = DIV_ROUND_CLOSEST(cvb->c2 * speedo, s_scale); 21 mv = DIV_ROUND_CLOSEST((mv + cvb->c1) * speedo, s_scale) + cvb->c0;
|