Searched refs:DIV_ROUND_CLOSEST (Results 1 - 178 of 178) sorted by relevance

/linux-4.1.27/drivers/clk/
H A Dclk-clps711x.c76 f_spi = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 96); _clps711x_clk_init()
78 f_pwm = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 128); _clps711x_clk_init()
85 f_spi = DIV_ROUND_CLOSEST(f_cpu, 576); _clps711x_clk_init()
86 f_pwm = DIV_ROUND_CLOSEST(f_cpu, 768); _clps711x_clk_init()
91 f_tim = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 26); _clps711x_clk_init()
93 f_tim = DIV_ROUND_CLOSEST(CLPS711X_EXT_FREQ, 24); _clps711x_clk_init()
95 f_tim = DIV_ROUND_CLOSEST(f_cpu, 144); _clps711x_clk_init()
H A Dclk-axi-clkgen.c171 dout = DIV_ROUND_CLOSEST(fvco, fout); axi_clkgen_calc_params()
H A Dclk-si570.c325 * This is a re-implementation of DIV_ROUND_CLOSEST si570_set_frequency_small()
/linux-4.1.27/drivers/hwmon/pmbus/
H A Dlm25066.c237 ret = DIV_ROUND_CLOSEST(ret * 293, 6140); lm25066_read_word_data()
241 ret = DIV_ROUND_CLOSEST(ret * 20, 625); lm25066_read_word_data()
245 ret = DIV_ROUND_CLOSEST(ret * 2832, 45400); lm25066_read_word_data()
249 ret = DIV_ROUND_CLOSEST(ret * 70, 453); lm25066_read_word_data()
253 ret = DIV_ROUND_CLOSEST(ret * 725, 2180); lm25066_read_word_data()
325 ret = DIV_ROUND_CLOSEST(ret * 293, 6140); lm25056_read_word_data()
333 ret = DIV_ROUND_CLOSEST(ret * 293, 6140); lm25056_read_word_data()
404 word = DIV_ROUND_CLOSEST((int)word * 6140, 293); lm25066_write_word_data()
412 word = DIV_ROUND_CLOSEST((int)word * 6140, 293); lm25066_write_word_data()
H A Dzl6100.c116 mantissa = DIV_ROUND_CLOSEST(val, 1000); zl6100_d2l()
189 ret = zl6100_d2l(DIV_ROUND_CLOSEST(zl6100_l2d(ret) * 9, 10)); zl6100_read_word_data()
192 ret = zl6100_d2l(DIV_ROUND_CLOSEST(zl6100_l2d(ret) * 11, 10)); zl6100_read_word_data()
249 word = zl6100_d2l(DIV_ROUND_CLOSEST(zl6100_l2d(word) * 10, 9)); zl6100_write_word_data()
258 word = zl6100_d2l(DIV_ROUND_CLOSEST(zl6100_l2d(word) * 10, 11)); zl6100_write_word_data()
H A Dpmbus_core.c508 val = DIV_ROUND_CLOSEST(val, 10); pmbus_reg2data_direct()
527 return DIV_ROUND_CLOSEST(160000 - (val - 2) * 625, 100); pmbus_reg2data_vid()
575 val = DIV_ROUND_CLOSEST(val, 1000); pmbus_data2reg_linear()
586 val = DIV_ROUND_CLOSEST(val, 1000L); pmbus_data2reg_linear()
607 mantissa = DIV_ROUND_CLOSEST(val, 1000); pmbus_data2reg_linear()
648 val = DIV_ROUND_CLOSEST(val, 10); pmbus_data2reg_direct()
660 return 2 + DIV_ROUND_CLOSEST((1600 - val) * 100, 625); pmbus_data2reg_vid()
/linux-4.1.27/arch/arm/mach-rpc/
H A Dtime.c28 #define RPC_LATCH DIV_ROUND_CLOSEST(RPC_CLOCK_FREQ, HZ)
62 return DIV_ROUND_CLOSEST(offset, RPC_LATCH) * 1000; ioc_timer_gettimeoffset()
/linux-4.1.27/arch/arm/mach-footbridge/
H A Ddc21285-timer.c118 unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16); footbridge_timer_init()
135 unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16); footbridge_sched_clock()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
H A Dgk20a.c68 mv = DIV_ROUND_CLOSEST(coef->c2 * speedo, s_scale); gk20a_volt_get_cvb_voltage()
69 mv = DIV_ROUND_CLOSEST((mv + coef->c1) * speedo, s_scale) + coef->c0; gk20a_volt_get_cvb_voltage()
86 mv = DIV_ROUND_CLOSEST(coef->c3 * speedo, s_scale) + coef->c4 + gk20a_volt_get_cvb_t_voltage()
87 DIV_ROUND_CLOSEST(coef->c5 * temp, t_scale); gk20a_volt_get_cvb_t_voltage()
88 mv = DIV_ROUND_CLOSEST(mv * temp, t_scale) + cvb_mv; gk20a_volt_get_cvb_t_voltage()
/linux-4.1.27/include/linux/
H A Dutil_macros.h10 if (__fc_x op DIV_ROUND_CLOSEST(__fc_a[__fc_i] + \
H A Dkernel.h96 #define DIV_ROUND_CLOSEST(x, divisor)( \ macro
/linux-4.1.27/drivers/clocksource/
H A Dtime-efm32.c163 DIV_ROUND_CLOSEST(rate, 1024), 200, 16, efm32_clocksource_init()
226 clock_event_ddata.periodic_top = DIV_ROUND_CLOSEST(rate, 1024 * HZ); efm32_clockevent_init()
229 DIV_ROUND_CLOSEST(rate, 1024), efm32_clockevent_init()
H A Dclps711x-timer.c89 writew(DIV_ROUND_CLOSEST(rate, HZ), base); _clps711x_clkevt_init()
H A Dmoxart_timer.c148 clock_count_per_tick = DIV_ROUND_CLOSEST(pclk, HZ); moxart_timer_init()
H A Dcadence_ttc_timer.c208 ttc_set_interval(timer, DIV_ROUND_CLOSEST(ttce->ttc.freq, ttc_set_mode()
245 factor = DIV_ROUND_CLOSEST(ndata->new_rate, ttc_rate_change_clocksource_cb()
250 factor = DIV_ROUND_CLOSEST(ndata->old_rate, ttc_rate_change_clocksource_cb()
H A Darm_global_timer.c117 gt_compare_set(DIV_ROUND_CLOSEST(gt_clk_rate, HZ), 1); gt_clockevent_set_mode()
H A Dasm9260_timer.c215 priv.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); asm9260_timer_init()
H A Dfsl_ftm_timer.c307 priv->periodic_cyc = DIV_ROUND_CLOSEST(freq, ftm_calc_closest_round_cyc()
H A Dnomadik-mtu.c221 nmdk_cycle = DIV_ROUND_CLOSEST(rate, HZ); nmdk_timer_init()
H A Dtimer-atmel-pit.c197 data->cycle = DIV_ROUND_CLOSEST(pit_rate, HZ); at91sam926x_pit_common_init()
H A Dtimer-u300.c386 u300_clockevent_data.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); u300_timer_init_of()
/linux-4.1.27/drivers/hwmon/
H A Dads7828.c77 DIV_ROUND_CLOSEST(regval * data->lsb_resol, 1000)); ads7828_show_in()
142 data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 4096); ads7828_probe()
146 data->lsb_resol = DIV_ROUND_CLOSEST(vref_mv * 1000, 256); ads7828_probe()
H A Dda9052-hwmon.c47 return DIV_ROUND_CLOSEST(value * 2000, 1023) + 2500; volt_reg_to_mv()
53 return DIV_ROUND_CLOSEST(value * 2500, 1023); input_reg_to_mv()
59 return DIV_ROUND_CLOSEST(value * 5000, 1023); vbbat_reg_to_mv()
118 return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(ret * 39, 10)); da9052_read_ich()
H A Dina2xx.c153 return DIV_ROUND_CLOSEST(avg * INA226_TOTAL_CONV_TIME_DEFAULT, 1000); ina226_reg_to_interval()
160 avg = DIV_ROUND_CLOSEST(interval * 1000, ina226_interval_to_reg()
178 u16 val = DIV_ROUND_CLOSEST(data->config->calibration_factor, ina2xx_calibrate()
286 val = DIV_ROUND_CLOSEST((s16)data->regs[reg], ina2xx_get_value()
292 val = DIV_ROUND_CLOSEST(val, 1000); ina2xx_get_value()
302 val = DIV_ROUND_CLOSEST(data->config->calibration_factor, ina2xx_get_value()
H A Dwm831x-hwmon.c53 return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(ret, 1000)); show_voltage()
69 ret = DIV_ROUND_CLOSEST(ret * 10000, 10983); show_chip_temp()
H A Dwm8350-hwmon.c45 val = DIV_ROUND_CLOSEST(val, 1000); show_voltage()
H A Dda9055-hwmon.c124 return DIV_ROUND_CLOSEST(value * 1000, DA9055_VSYS_DIV) + 2500; volt_reg_to_mv()
126 return DIV_ROUND_CLOSEST(value * 1000, DA9055_ADCIN_DIV); volt_reg_to_mv()
198 return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(-4084 * (tjunc - toffset) da9055_read_tjunc()
H A Dltc4222.c73 val = DIV_ROUND_CLOSEST(val * 5, 4); ltc4222_get_value()
78 val = DIV_ROUND_CLOSEST(val * 125, 4); ltc4222_get_value()
89 val = DIV_ROUND_CLOSEST(val * 125, 2); ltc4222_get_value()
H A Dmc13783-adc.c85 val = DIV_ROUND_CLOSEST(val * 9, 2); mc13783_adc_read_bp()
91 val = DIV_ROUND_CLOSEST(val * 9, 4) + 2400; mc13783_adc_read_bp()
109 val = DIV_ROUND_CLOSEST(val * 9, 4); mc13783_adc_read_gp()
H A Dlm95234.c225 DIV_ROUND_CLOSEST(data->temp[index] * 125, 32)); show_temp()
313 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, index ? 255 : 127); set_tcrit2()
362 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 255); set_tcrit1()
403 val = DIV_ROUND_CLOSEST(val, 1000); set_tcrit1_hyst()
443 val = clamp_val(DIV_ROUND_CLOSEST(val, 500), -128, 127); set_offset()
463 DIV_ROUND_CLOSEST(data->interval * 1000, HZ)); show_interval()
H A Dad7314.c85 DIV_ROUND_CLOSEST(data * 3125, 100)); ad7314_show_temperature()
H A Dadc128d818.c154 val = DIV_ROUND_CLOSEST(data->in[index][nr] * data->vref, 4095); adc128_show_in()
174 regval = clamp_val(DIV_ROUND_CLOSEST(val, 10), 0, 255); adc128_set_in()
212 regval = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); adc128_set_temp()
431 data->vref = DIV_ROUND_CLOSEST(vref, 1000); adc128_probe()
H A Dhih6130.c70 return (DIV_ROUND_CLOSEST(ticks * 1650, 16382) - 400) * 100; hih6130_temp_ticks_to_millicelsius()
85 return DIV_ROUND_CLOSEST(ticks * 1000, 16382) * 100; hih6130_rh_ticks_to_per_cent_mille()
H A Dnct7802.c111 ret = DIV_ROUND_CLOSEST(1350000U, ret); nct7802_read_fan()
135 ret = DIV_ROUND_CLOSEST(1350000U, ret); nct7802_read_fan_min()
147 limit = DIV_ROUND_CLOSEST(1350000U, limit); nct7802_write_fan_min()
203 voltage = DIV_ROUND_CLOSEST(voltage, nct7802_vmul[nr]); nct7802_write_voltage()
279 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); store_temp()
H A Dlm63.c129 #define TEMP8_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), -128000, \
131 #define TEMP8U_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), 0, \
134 #define TEMP11_TO_REG(val) (DIV_ROUND_CLOSEST(clamp_val((val), -128000, \
136 #define TEMP11U_TO_REG(val) (DIV_ROUND_CLOSEST(clamp_val((val), 0, \
138 #define HYST_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), 0, 127000), \
206 return DIV_ROUND_CLOSEST(clamp_val(val, 0, 127500), 500); lut_temp_to_reg()
208 return DIV_ROUND_CLOSEST(clamp_val(val, 0, 127000), 1000); lut_temp_to_reg()
H A Dadt7x10.c213 return DIV_ROUND_CLOSEST(clamp_val(temp, ADT7X10_TEMP_MIN, ADT7X10_TEMP_TO_REG()
226 return DIV_ROUND_CLOSEST(reg * 1000, 128); ADT7X10_REG_TO_TEMP()
311 data->hyst = clamp_val(DIV_ROUND_CLOSEST(limit - hyst, 1000), adt7x10_set_t_hyst()
H A Demc6w201.c218 val = DIV_ROUND_CLOSEST(val * 0xC0, nominal_mv[nr]); set_in()
255 val = DIV_ROUND_CLOSEST(val, 1000); set_temp()
300 val = DIV_ROUND_CLOSEST(5400000U, val); set_fan()
H A Dina209.c120 return DIV_ROUND_CLOSEST(val, 100); ina209_from_reg()
179 return (DIV_ROUND_CLOSEST(clamp_val(val, 0, 32000), 4) << 3) ina209_to_reg()
204 return DIV_ROUND_CLOSEST(val, 20 * 1000); ina209_to_reg()
H A Dltc2945.c183 val = DIV_ROUND_CLOSEST(val, 625); ltc2945_val_to_reg()
190 val = DIV_ROUND_CLOSEST(val, 25) * 2; ltc2945_val_to_reg()
221 val = DIV_ROUND_CLOSEST(val, 25); ltc2945_val_to_reg()
H A Dmcp3021.c83 return DIV_ROUND_CLOSEST(data->vdd * val, 1 << data->output_res); volts_from_reg()
H A Dtmp103.c61 return DIV_ROUND_CLOSEST(val, 1000); tmp103_mc_to_reg()
H A Dds1621.c138 return DIV_ROUND_CLOSEST(((s16)reg / 16) * 625, 10); DS1621_TEMP_FROM_REG()
150 temp = DIV_ROUND_CLOSEST(temp * (1 << (8 - zbits)), 1000) << zbits; DS1621_TEMP_TO_REG()
H A Dadt7462.c813 temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; set_temp_min()
851 temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; set_temp_max()
916 temp = DIV_ROUND_CLOSEST(temp, x); set_volt_max()
958 temp = DIV_ROUND_CLOSEST(temp, x); set_volt_min()
1223 temp = DIV_ROUND_CLOSEST(temp, 1000); set_pwm_hyst()
1309 temp = DIV_ROUND_CLOSEST(temp, 1000) + 64; set_pwm_tmin()
H A Demc1403.c85 DIV_ROUND_CLOSEST(val, 1000)); store_temp()
163 hyst = clamp_val(DIV_ROUND_CLOSEST(hyst, 1000), 0, 255); store_hyst()
H A Dads1015.c131 return DIV_ROUND_CLOSEST(reg * fullscale, mask); ads1015_reg_to_mv()
H A Demc2103.c254 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -63, 127); set_temp_min()
276 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -63, 127); set_temp_max()
H A Dtmp401.c188 return DIV_ROUND_CLOSEST(temp * 125, 32); tmp401_register_to_temp()
199 return DIV_ROUND_CLOSEST(temp * (1 << (8 - zbits)), 1000) << zbits; tmp401_temp_to_register()
H A Dacpi_power_meter.c240 temp = DIV_ROUND_CLOSEST(temp, 1000); set_cap()
310 temp = DIV_ROUND_CLOSEST(temp, 1000); set_trip()
H A Dhwmon-vid.c122 return DIV_ROUND_CLOSEST(15500 - 125 * val, 10); vid_from_reg()
H A Ds3c-hwmon.c179 ret = DIV_ROUND_CLOSEST(ret, cfg->div); s3c_hwmon_ch_show()
H A Dadt7470.c478 temp = DIV_ROUND_CLOSEST(temp, 1000); set_temp_min()
512 temp = DIV_ROUND_CLOSEST(temp, 1000); set_temp_max()
789 temp = DIV_ROUND_CLOSEST(temp, 1000); set_pwm_tmin()
H A Dw83791d.c252 #define TEMP23_TO_REG(val) (DIV_ROUND_CLOSEST(clamp_val((val), -128000, \
256 #define TARGET_TEMP_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), 0, 127000), \
260 #define TOL_TEMP_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val((val), 0, 15000), \
H A Dlm75.c158 data->temp[nr] = DIV_ROUND_CLOSEST(temp << (resolution - 8), set_temp()
H A Dmax16065.c122 return clamp_val(DIV_ROUND_CLOSEST(mv * 256, range), 0, 255); MV_TO_LIMIT()
H A Dsch5627.c314 val = DIV_ROUND_CLOSEST( show_in()
H A Dsch5636.c189 val = DIV_ROUND_CLOSEST( show_in_value()
H A Dw83627ehf.c412 return DIV_ROUND_CLOSEST(reg * scale_in[nr], 100); in_from_reg()
417 return clamp_val(DIV_ROUND_CLOSEST(val * 100, scale_in[nr]), 0, 255); in_to_reg()
1269 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); store_temp_offset()
1516 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 127); store_target_temp()
1542 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 15); store_tolerance()
H A Dnct6775.c734 return DIV_ROUND_CLOSEST(reg * scale_in[nr], 100); in_from_reg()
739 return clamp_val(DIV_ROUND_CLOSEST(val * 100, scale_in[nr]), 0, 255); in_to_reg()
2029 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127); store_temp_offset()
2515 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, store_target_temp()
2590 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, data->tolerance_mask); store_temp_tolerance()
2712 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 255); store_weight_temp()
2880 data->auto_temp[nr][point] = DIV_ROUND_CLOSEST(val, 1000); store_auto_temp()
H A Dlm80.c90 #define TEMP_TO_REG(temp) (DIV_ROUND_CLOSEST(clamp_val((temp), \
H A Dmax6697.c315 temp = DIV_ROUND_CLOSEST(temp, 1000) + data->temp_offset; set_temp()
H A Dw83l786ng.c529 val = DIV_ROUND_CLOSEST(val, 0x11); store_pwm()
H A Dadt7475.c261 return DIV_ROUND_CLOSEST(reg * 2250, 1024); reg2volt()
262 return DIV_ROUND_CLOSEST(reg * (r[0] + r[1]) * 2250, r[1] * 1024); reg2volt()
H A Dnct6683.c495 return clamp_val(DIV_ROUND_CLOSEST(val, scale), 0, 127); in_to_reg()
H A Dlm85.c158 DIV_ROUND_CLOSEST(clamp_val((val), -127000, 127000), 1000)
H A Dlm90.c513 data->update_interval = DIV_ROUND_CLOSEST(update_interval, 64); lm90_set_convrate()
H A Dw83795.c320 reg1 = clamp_val(DIV_ROUND_CLOSEST(base_clock, val), 1, 128); pwm_freq_to_reg()
H A Dit87.c486 val = DIV_ROUND_CLOSEST(val, adc_lsb(data, nr)); in_to_reg()
/linux-4.1.27/arch/m32r/kernel/
H A Dtime.c78 elapsed_time = DIV_ROUND_CLOSEST(count, latch); m32r_gettimeoffset()
96 elapsed_time = DIV_ROUND_CLOSEST(count, latch); m32r_gettimeoffset()
181 latch = DIV_ROUND_CLOSEST(bus_clock/divide, HZ); time_init()
/linux-4.1.27/arch/arm/mach-ks8695/
H A Dtime.c63 u32 rate = DIV_ROUND_CLOSEST(KS8695_CLOCK_RATE, HZ); ks8695_set_mode()
64 u32 half = DIV_ROUND_CLOSEST(rate, 2); ks8695_set_mode()
85 u32 half = DIV_ROUND_CLOSEST(cycles, 2); ks8695_set_next_event()
/linux-4.1.27/drivers/leds/
H A Dleds-ipaq-micro.c95 msg.tx_data[2] = (u8) DIV_ROUND_CLOSEST(*delay_on, 100); micro_leds_blink_set()
99 msg.tx_data[3] = (u8) DIV_ROUND_CLOSEST(*delay_off, 100); micro_leds_blink_set()
H A Dleds-asic3.c28 #define MS_TO_CLK(ms) DIV_ROUND_CLOSEST(((ms)*1024), 32000)
/linux-4.1.27/drivers/media/i2c/cx25840/
H A Dcx25840-ir.c156 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); ns_to_clock_divider()
162 return DIV_ROUND_CLOSEST((divider + 1) * 1000, clock_divider_to_ns()
169 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, freq * 16)); carrier_freq_to_clock_divider()
174 return DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, (divider + 1) * 16); clock_divider_to_carrier_freq()
181 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, freq * rollovers)); freq_to_clock_divider()
187 return DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, clock_divider_to_freq()
210 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); ns_to_lpf_count()
216 return DIV_ROUND_CLOSEST(count * 1000, lpf_count_to_ns()
223 return DIV_ROUND_CLOSEST(count, CX25840_IR_REFCLK_FREQ / 1000000); lpf_count_to_us()
236 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000, clock_divider_to_resolution()
397 if (*carrier_range_low < DIV_ROUND_CLOSEST(c16, 16 + 3)) { control_rx_s_carrier_window()
399 *carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 4); control_rx_s_carrier_window()
402 *carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 3); control_rx_s_carrier_window()
405 if (*carrier_range_high > DIV_ROUND_CLOSEST(c16, 16 - 3)) { control_rx_s_carrier_window()
407 *carrier_range_high = DIV_ROUND_CLOSEST(c16, 16 - 4); control_rx_s_carrier_window()
410 *carrier_range_high = DIV_ROUND_CLOSEST(c16, 16 - 3); control_rx_s_carrier_window()
476 n = DIV_ROUND_CLOSEST(duty_cycle * 100, 625); /* 16ths of 100% */ cduty_tx_s_duty_cycle()
482 return DIV_ROUND_CLOSEST((n + 1) * 100, 16); cduty_tx_s_duty_cycle()
/linux-4.1.27/drivers/media/pci/cx23885/
H A Dcx23888-ir.c190 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000)); ns_to_clock_divider()
196 return DIV_ROUND_CLOSEST((divider + 1) * 1000, clock_divider_to_ns()
203 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, freq * 16)); carrier_freq_to_clock_divider()
208 return DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, (divider + 1) * 16); clock_divider_to_carrier_freq()
215 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, freq * rollovers)); freq_to_clock_divider()
221 return DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, clock_divider_to_freq()
244 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000)); ns_to_lpf_count()
250 return DIV_ROUND_CLOSEST(count * 1000, lpf_count_to_ns()
257 return DIV_ROUND_CLOSEST(count, CX23888_IR_REFCLK_FREQ / 1000000); lpf_count_to_us()
270 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000, clock_divider_to_resolution()
405 if (*carrier_range_low < DIV_ROUND_CLOSEST(c16, 16 + 3)) { control_rx_s_carrier_window()
407 *carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 4); control_rx_s_carrier_window()
410 *carrier_range_low = DIV_ROUND_CLOSEST(c16, 16 + 3); control_rx_s_carrier_window()
413 if (*carrier_range_high > DIV_ROUND_CLOSEST(c16, 16 - 3)) { control_rx_s_carrier_window()
415 *carrier_range_high = DIV_ROUND_CLOSEST(c16, 16 - 4); control_rx_s_carrier_window()
418 *carrier_range_high = DIV_ROUND_CLOSEST(c16, 16 - 3); control_rx_s_carrier_window()
491 n = DIV_ROUND_CLOSEST(duty_cycle * 100, 625); /* 16ths of 100% */ cduty_tx_s_duty_cycle()
497 return DIV_ROUND_CLOSEST((n + 1) * 100, 16); cduty_tx_s_duty_cycle()
/linux-4.1.27/drivers/media/platform/soc_camera/
H A Dsoc_scale_crop.h28 return DIV_ROUND_CLOSEST(size << shift, scale); soc_camera_shift_scale()
/linux-4.1.27/drivers/clk/at91/
H A Dclk-usb.c56 return DIV_ROUND_CLOSEST(parent_rate, (usbdiv + 1)); at91sam9x5_clk_usb_recalc_rate()
86 tmp_rate = DIV_ROUND_CLOSEST(tmp_parent_rate, div); at91sam9x5_clk_usb_determine_rate()
144 div = DIV_ROUND_CLOSEST(parent_rate, rate); at91sam9x5_clk_usb_set_rate()
291 tmprate = DIV_ROUND_CLOSEST(tmp_parent_rate, usb->divisors[i]); at91rm9200_clk_usb_round_rate()
322 div = DIV_ROUND_CLOSEST(parent_rate, rate); at91rm9200_clk_usb_set_rate()
H A Dclk-pll.c220 tmpmul = DIV_ROUND_CLOSEST(rate, parent_rate / tmpdiv); clk_pll_get_best_div_mul()
/linux-4.1.27/drivers/pwm/
H A Dpwm-clps711x.c51 return DIV_ROUND_CLOSEST(v * 0xf, pwm_get_period(pwm)); clps711x_get_duty()
63 pwm_set_period(pwm, DIV_ROUND_CLOSEST(NSEC_PER_SEC, freq)); clps711x_pwm_request()
/linux-4.1.27/arch/mips/jz4740/
H A Dtime.c121 jz4740_jiffies_per_tick = DIV_ROUND_CLOSEST(clk_rate, HZ); plat_time_init()
/linux-4.1.27/drivers/clk/sunxi/
H A Dclk-mod0.c226 step = DIV_ROUND_CLOSEST(360, mmc_div); mmc_get_phase()
278 step = DIV_ROUND_CLOSEST(360, mmc_div); mmc_set_phase()
279 delay = DIV_ROUND_CLOSEST(degrees, step); mmc_set_phase()
/linux-4.1.27/drivers/gpu/drm/tegra/
H A Ddsi.h88 ((DIV_ROUND_CLOSEST(value, period) - (hwinc)) & 0xff)
H A Ddsi.c917 state->period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, plld); tegra_dsi_encoder_atomic_check()
/linux-4.1.27/arch/powerpc/platforms/85xx/
H A Dp1022_rdk.c74 pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq); p1022rdk_set_pixel_clock()
H A Dp1022_ds.c404 pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq); p1022ds_set_pixel_clock()
/linux-4.1.27/arch/arm/plat-iop/
H A Dtime.c147 ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); iop_init_time()
/linux-4.1.27/arch/arm/mach-gemini/
H A Dtime.c65 u32 period = DIV_ROUND_CLOSEST(tick_rate, HZ); gemini_timer_set_mode()
/linux-4.1.27/arch/arm/mach-netx/
H A Dtime.c32 #define NETX_LATCH DIV_ROUND_CLOSEST(NETX_CLOCK_FREQ, HZ)
/linux-4.1.27/drivers/gpu/drm/i915/
H A Dintel_dsi_pll.c158 dsi_clk_khz = DIV_ROUND_CLOSEST(pclk * bpp, lane_count); dsi_clk_from_pclk()
381 pclk = DIV_ROUND_CLOSEST(dsi_clock * intel_dsi->lane_count, pipe_bpp); vlv_get_dsi_pclk()
H A Dintel_pm.c1792 linetime = DIV_ROUND_CLOSEST(mode->crtc_htotal * 1000 * 8, hsw_compute_linetime_wm()
1794 ips_linetime = DIV_ROUND_CLOSEST(mode->crtc_htotal * 1000 * 8, hsw_compute_linetime_wm()
4584 ia_freq = DIV_ROUND_CLOSEST(ia_freq, 100); __gen6_update_ring_freq()
6698 int div, czclk_freq = DIV_ROUND_CLOSEST(dev_priv->mem_freq, 4); byt_gpu_freq()
6704 return DIV_ROUND_CLOSEST(czclk_freq * (val + 6 - 0xbd), div); byt_gpu_freq()
6709 int mul, czclk_freq = DIV_ROUND_CLOSEST(dev_priv->mem_freq, 4); byt_freq_opcode()
6715 return DIV_ROUND_CLOSEST(mul * val, czclk_freq) + 0xbd - 6; byt_freq_opcode()
6726 return DIV_ROUND_CLOSEST(czclk_freq * val, 2 * div) / 2; chv_gpu_freq()
6738 return DIV_ROUND_CLOSEST(val * 2 * mul, czclk_freq) * 2; chv_freq_opcode()
H A Dintel_display.c409 clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n); vlv_clock()
410 clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p); vlv_clock()
550 clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n); pineview_clock()
551 clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p); pineview_clock()
565 clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n + 2); i9xx_clock()
566 clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p); i9xx_clock()
577 clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p); chv_clock()
872 clock.m2 = DIV_ROUND_CLOSEST(target * clock.p * clock.n, vlv_find_best_dpll()
5059 divider = DIV_ROUND_CLOSEST(dev_priv->hpll_freq << 1, cdclk) - 1; valleyview_set_cdclk()
5117 cmd = DIV_ROUND_CLOSEST(dev_priv->hpll_freq << 1, cdclk) - 1; cherryview_set_cdclk()
5206 if (DIV_ROUND_CLOSEST(dev_priv->vlv_cdclk_freq, 1000) >= dev_priv->rps.cz_freq) { vlv_program_pfi_credits()
5897 return DIV_ROUND_CLOSEST(dev_priv->hpll_freq << 1, divider + 1); valleyview_get_display_clock_speed()
H A Dintel_dp.c722 return DIV_ROUND_CLOSEST(intel_ddi_get_cdclk_freq(dev_priv), 2000); hsw_get_aux_clock_divider()
/linux-4.1.27/net/mac80211/
H A Drc80211_minstrel_ht_debugfs.c81 tx_time = DIV_ROUND_CLOSEST(mg->duration[j], 1000); minstrel_ht_stats_dump()
226 tx_time = DIV_ROUND_CLOSEST(mg->duration[j], 1000); minstrel_ht_stats_csv_dump()
/linux-4.1.27/drivers/media/platform/vivid/
H A Dvivid-sdr-cap.c449 src_phase_step = DIV_ROUND_CLOSEST(FIXP_2PI * BEEP_FREQ, vivid_sdr_cap_process()
484 *vbuf++ = DIV_ROUND_CLOSEST(fixp_i, FIXP_FRAC * 10); vivid_sdr_cap_process()
485 *vbuf++ = DIV_ROUND_CLOSEST(fixp_q, FIXP_FRAC * 10); vivid_sdr_cap_process()
/linux-4.1.27/drivers/i2c/busses/
H A Di2c-mxs.c743 low_count = DIV_ROUND_CLOSEST(divider * 13, (13 + 6)); mxs_i2c_derive_timing()
744 high_count = DIV_ROUND_CLOSEST(divider * 6, (13 + 6)); mxs_i2c_derive_timing()
749 low_count = DIV_ROUND_CLOSEST(divider * 47, (47 + 40)); mxs_i2c_derive_timing()
750 high_count = DIV_ROUND_CLOSEST(divider * 40, (47 + 40)); mxs_i2c_derive_timing()
/linux-4.1.27/drivers/iio/gyro/
H A Dadis16080.c117 *val = DIV_ROUND_CLOSEST(25 * 585, 85 - 25); adis16080_read_raw()
/linux-4.1.27/drivers/media/i2c/
H A Dmt9t001.c298 hratio = DIV_ROUND_CLOSEST(crop->width, format->width); mt9t001_s_stream()
299 vratio = DIV_ROUND_CLOSEST(crop->height, format->height); mt9t001_s_stream()
391 hratio = DIV_ROUND_CLOSEST(__crop->width, width); mt9t001_set_format()
392 vratio = DIV_ROUND_CLOSEST(__crop->height, height); mt9t001_set_format()
H A Dmt9p031.c418 xskip = DIV_ROUND_CLOSEST(crop->width, format->width); mt9p031_set_params()
419 yskip = DIV_ROUND_CLOSEST(crop->height, format->height); mt9p031_set_params()
571 hratio = DIV_ROUND_CLOSEST(__crop->width, width); mt9p031_set_format()
572 vratio = DIV_ROUND_CLOSEST(__crop->height, height); mt9p031_set_format()
/linux-4.1.27/drivers/tty/serial/8250/
H A D8250_early.c126 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud); init_port()
H A D8250_mtk.c103 tmp = DIV_ROUND_CLOSEST(port->uartclk, quot * baud); mtk8250_set_termios()
H A D8250_omap.c193 div_13 = DIV_ROUND_CLOSEST(uartclk, 13 * baud); omap_8250_get_divisor()
194 div_16 = DIV_ROUND_CLOSEST(uartclk, 16 * baud); omap_8250_get_divisor()
H A D8250_core.c2455 quot_16 = DIV_ROUND_CLOSEST(port->uartclk, baud); xr17v35x_get_divisor()
/linux-4.1.27/drivers/tty/serial/
H A Defm32-uart.c358 DIV_ROUND_CLOSEST(port->uartclk, 16 * 8192), efm32_uart_set_termios()
359 DIV_ROUND_CLOSEST(port->uartclk, 16)); efm32_uart_set_termios()
394 clkdiv = (DIV_ROUND_CLOSEST(4 * port->uartclk, 16 * baud) - 4) << 6; efm32_uart_set_termios()
571 *baud = DIV_ROUND_CLOSEST(4 * efm_port->port.uartclk, efm32_uart_console_get_options()
H A Dsccnxp.c295 div_std = DIV_ROUND_CLOSEST(chip->freq_std, baud_std[i].baud); sccnxp_set_baud()
296 tmp_baud = DIV_ROUND_CLOSEST(port->uartclk, div_std); sccnxp_set_baud()
H A Dsh-sci.c1807 return DIV_ROUND_CLOSEST(freq, s->sampling_rate * bps) - 1; sci_scbrr_calc()
1845 br = DIV_ROUND_CLOSEST(freq, (sr * sci_baud_calc_hscif()
1848 err = DIV_ROUND_CLOSEST(freq, ((br + 1) * bps * sr * sci_baud_calc_hscif()
1864 DIV_ROUND_CLOSEST(1000, sr << 1)) / 10); sci_baud_calc_hscif()
H A Dmax310x.c513 return DIV_ROUND_CLOSEST(clk, div); max310x_set_baud()
541 fdiv = DIV_ROUND_CLOSEST(freq, div); max310x_set_ref_clk()
H A Dvt8500_serial.c702 vt8500_port->clk_predivisor = DIV_ROUND_CLOSEST( vt8500_serial_probe()
H A Damba-pl011.c1788 quot = DIV_ROUND_CLOSEST(port->uartclk * 8, baud); pl011_set_termios()
1790 quot = DIV_ROUND_CLOSEST(port->uartclk * 4, baud); pl011_set_termios()
H A Dsc16is7xx.c465 return DIV_ROUND_CLOSEST(clk / 16, div); sc16is7xx_set_baud()
H A Dserial-tegra.c291 divisor = DIV_ROUND_CLOSEST(rate, baud * 16); tegra_set_baudrate()
H A Dpch_uart.c461 div = DIV_ROUND_CLOSEST(priv->uartclk / 16, baud); pch_uart_hal_set_line()
H A Dxilinx_uartps.c353 cd = DIV_ROUND_CLOSEST(clk, baud * (bdiv + 1)); cdns_uart_calc_baud_divs()
H A Dserial_core.c424 quot = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud); uart_get_divisor()
/linux-4.1.27/drivers/w1/masters/
H A Dmxc_w1.c121 clkdiv = DIV_ROUND_CLOSEST(clkrate, 1000000); mxc_w1_probe()
/linux-4.1.27/arch/mips/loongson1/common/
H A Dtime.c59 ls1x_jiffies_per_tick = DIV_ROUND_CLOSEST(mips_hpt_frequency, HZ); ls1x_pwmtimer_init()
/linux-4.1.27/arch/alpha/kernel/
H A Dsys_ruffian.c67 #define RUFFIAN_LATCH DIV_ROUND_CLOSEST(PIT_TICK_RATE, HZ)
/linux-4.1.27/sound/soc/adi/
H A Daxi-spdif.c98 clkdiv = DIV_ROUND_CLOSEST(clk_get_rate(spdif->clk_ref), axi_spdif_hw_params()
/linux-4.1.27/drivers/media/tuners/
H A Dmsi001.c219 thresh = DIV_ROUND_CLOSEST(thresh, tmp); msi001_set_tuner()
220 frac = DIV_ROUND_CLOSEST(frac, tmp); msi001_set_tuner()
H A Dtda18212.c143 buf[3] = DIV_ROUND_CLOSEST(if_khz, 50); tda18212_set_params()
/linux-4.1.27/include/net/
H A Dred.h109 #define RED_ONE_PERCENT ((u32)DIV_ROUND_CLOSEST(1ULL<<32, 100))
402 max_p_delta = DIV_ROUND_CLOSEST(p->max_P, p->qth_delta); red_adaptative_algo()
/linux-4.1.27/sound/soc/codecs/
H A Dpcm512x.c868 bclk_rate = DIV_ROUND_CLOSEST(sck_rate, bclk_div); pcm512x_set_dividers()
931 bclk_div = DIV_ROUND_CLOSEST(sck_rate, bclk_rate); pcm512x_set_dividers()
1003 osr_div = DIV_ROUND_CLOSEST(dac_rate, osr_rate); pcm512x_set_dividers()
1009 dac_div = DIV_ROUND_CLOSEST(dacsrc_rate, dac_rate); pcm512x_set_dividers()
1016 ncp_div = DIV_ROUND_CLOSEST(dac_rate, pcm512x_set_dividers()
/linux-4.1.27/drivers/gpu/ipu-v3/
H A Dipu-di.c443 div = DIV_ROUND_CLOSEST(in_rate, sig->mode.pixelclock); ipu_di_config_clock()
460 div = DIV_ROUND_CLOSEST(clkrate, sig->mode.pixelclock); ipu_di_config_clock()
483 div = DIV_ROUND_CLOSEST(in_rate, sig->mode.pixelclock); ipu_di_config_clock()
/linux-4.1.27/drivers/mmc/host/
H A Dmoxart-mmc.c618 mmc->f_max = DIV_ROUND_CLOSEST(host->sysclk, 2); moxart_probe()
619 mmc->f_min = DIV_ROUND_CLOSEST(host->sysclk, CLK_DIV_MASK * 2); moxart_probe()
/linux-4.1.27/drivers/media/rc/
H A Diguanair.c308 cycles = DIV_ROUND_CLOSEST(24000000, carrier * 2) - iguanair_set_tx_carrier()
361 periods = DIV_ROUND_CLOSEST(txbuf[i] * ir->carrier, 1000000); iguanair_tx()
H A Dir-hix5hd2.c105 rate = DIV_ROUND_CLOSEST(priv->rate, 1000000); hix5hd2_ir_config()
H A Drc-core-priv.h150 #define TO_US(duration) DIV_ROUND_CLOSEST((duration), 1000)
H A Dwinbond-cir.c348 ev.carrier = DIV_ROUND_CLOSEST(counter * 1000000u, wbcir_carrier_report()
574 freq = DIV_ROUND_CLOSEST(carrier, 1000); wbcir_txcarrier()
665 buf[i] = DIV_ROUND_CLOSEST(b[i], 10); wbcir_tx()
H A Dite-cir.c121 DIV_ROUND_CLOSEST(freq - ITE_LCF_MIN_CARRIER_FREQ, ite_get_carrier_freq_bits()
257 DIV_ROUND_CLOSEST(10000 * (high_freq - low_freq), ite_set_carrier_params()
H A Dene_ir.c653 dev->tx_sample = DIV_ROUND_CLOSEST(sample, sample_period); ene_tx_sample()
H A Dmceusb.c635 period = DIV_ROUND_CLOSEST( mceusb_dev_printdata()
/linux-4.1.27/drivers/gpu/drm/rcar-du/
H A Drcar_du_crtc.c121 div = DIV_ROUND_CLOSEST(clk, mode_clock); rcar_du_crtc_set_display_timing()
132 extdiv = DIV_ROUND_CLOSEST(extclk, mode_clock); rcar_du_crtc_set_display_timing()
/linux-4.1.27/drivers/media/platform/coda/
H A Dcoda-jpeg.c201 temp = DIV_ROUND_CLOSEST((unsigned int)q_tab[i] * scale, 100); coda_scale_quant_table()
/linux-4.1.27/drivers/clk/shmobile/
H A Dclk-div6.c96 div = DIV_ROUND_CLOSEST(parent_rate, rate); cpg_div6_clock_calc_div()
/linux-4.1.27/drivers/clk/zynq/
H A Dpll.c68 fbdiv = DIV_ROUND_CLOSEST(rate, *prate); zynq_pll_round_rate()
/linux-4.1.27/arch/powerpc/platforms/86xx/
H A Dmpc8610_hpcd.c260 pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq) - 1; mpc8610hpcd_set_pixel_clock()
/linux-4.1.27/arch/arm/common/
H A Dtimer-sp.c201 clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); __sp804_clockevents_init()
/linux-4.1.27/arch/arm/kernel/
H A Dsmp_twd.c48 writel_relaxed(DIV_ROUND_CLOSEST(twd_timer_rate, HZ), twd_set_mode()
H A Dtopology.c66 * in order to return at most 1 when DIV_ROUND_CLOSEST
/linux-4.1.27/sound/soc/spear/
H A Dspdif_out.c97 divider = DIV_ROUND_CLOSEST(clk_get_rate(host->clk), (rate * 128)); spdif_out_clock()
/linux-4.1.27/drivers/gpu/drm/atmel-hlcdc/
H A Datmel_hlcdc_plane.c619 patched_src_w = DIV_ROUND_CLOSEST(patched_crtc_w * state->src_w, atmel_hlcdc_plane_atomic_check()
621 patched_src_h = DIV_ROUND_CLOSEST(patched_crtc_h * state->src_h, atmel_hlcdc_plane_atomic_check()
/linux-4.1.27/drivers/media/dvb-frontends/
H A Dves1820.c168 ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, fin); ves1820_set_symbolrate()
H A Dm88ds3103.c528 u16tmp = DIV_ROUND_CLOSEST((c->symbol_rate / 1000) << 15, priv->mclk_khz / 2); m88ds3103_set_frontend()
551 s32tmp = DIV_ROUND_CLOSEST(s32tmp, priv->mclk_khz); m88ds3103_set_frontend()
938 tmp = DIV_ROUND_CLOSEST(tmp, 8 * M88DS3103_SNR_ITERATIONS); m88ds3103_read_snr()
H A Dstb6100.c397 nfrac = DIV_ROUND_CLOSEST((fvco - (nint * state->reference << psd2)) stb6100_set_frequency()
H A Dtda10021.c179 ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, FIN); tda10021_set_symbolrate()
H A Ddib7000p.c1199 int f_rel = DIV_ROUND_CLOSEST(rf_khz, xtal) * xtal - rf_khz; dib7000p_spur_protect()
/linux-4.1.27/drivers/regulator/
H A Dti-abb-regulator.c482 clk_rate = DIV_ROUND_CLOSEST(clk_get_rate(abb->clk), 1000000); ti_abb_init_timings()
485 cycle_rate = DIV_ROUND_CLOSEST(clock_cycles * 10, clk_rate); ti_abb_init_timings()
488 sr2_wt_cnt_val = DIV_ROUND_CLOSEST(abb->settling_time * 10, cycle_rate); ti_abb_init_timings()
/linux-4.1.27/drivers/spi/
H A Dspi-pxa2xx.c707 q1 = DIV_ROUND_CLOSEST(fref1, rate); quark_x1000_get_clk_div()
732 q2 = DIV_ROUND_CLOSEST(fref2, rate); quark_x1000_get_clk_div()
757 q1 = DIV_ROUND_CLOSEST(fref, rate); quark_x1000_get_clk_div()
H A Dspi-rockchip.c534 rsd = DIV_ROUND_CLOSEST(rs->rsd_nsecs * (rs->max_freq >> 8), rockchip_spi_config()
/linux-4.1.27/drivers/net/dsa/
H A Dmv88e6352.c270 temp = clamp_val(DIV_ROUND_CLOSEST(temp, 5) + 5, 0, 0x1f); mv88e6352_set_temp_limit()
/linux-4.1.27/drivers/hsi/controllers/
H A Domap_ssi.c431 omap_ssi->fck_rate = DIV_ROUND_CLOSEST(ssi_get_clk_rate(ssi), 1000); ssi_hw_init()
/linux-4.1.27/drivers/usb/serial/
H A Df81232.c60 return DIV_ROUND_CLOSEST(F81232_MAX_BAUDRATE, baudrate); calc_baud_divisor()
/linux-4.1.27/arch/arm/mach-davinci/
H A Dclock.c359 ratio = DIV_ROUND_CLOSEST(input, rate); davinci_set_sysclk_rate()
/linux-4.1.27/arch/arm/mach-ixp4xx/
H A Dcommon.c53 #define IXP4XX_LATCH DIV_ROUND_CLOSEST(IXP4XX_TIMER_FREQ, \
/linux-4.1.27/drivers/media/v4l2-core/
H A Dtuner-core.c1170 DIV_ROUND_CLOSEST(abs_freq * 2, 125) : tuner_g_frequency()
1171 DIV_ROUND_CLOSEST(abs_freq, 62500); tuner_g_frequency()
/linux-4.1.27/drivers/staging/comedi/drivers/
H A Dni_labpc_common.c372 pacer->next_div = DIV_ROUND_CLOSEST(convert_period, labpc_adc_timing()
374 pacer->next_div2 = DIV_ROUND_CLOSEST(scan_period, labpc_adc_timing()
H A Dcomedi_8254.c455 divisor = DIV_ROUND_CLOSEST(*nanosec, i8254->osc_base); comedi_8254_ns_to_timer()
H A Daddi_apci_3120.c294 divisor = DIV_ROUND_CLOSEST(ns, timer_base); apci3120_ns_to_timer()
H A Ds626.c1954 divider = DIV_ROUND_CLOSEST(*nanosec, base); s626_ns_to_timer()
/linux-4.1.27/drivers/input/touchscreen/
H A Delants_i2c.c475 ts->x_res = DIV_ROUND_CLOSEST(ts->x_max, phy_x); elants_i2c_query_ts_info()
477 ts->y_res = DIV_ROUND_CLOSEST(ts->y_max, phy_y); elants_i2c_query_ts_info()
/linux-4.1.27/drivers/hid/
H A Dhid-rmi.c863 data->x_size_mm = DIV_ROUND_CLOSEST(x_size, 10); rmi_populate_f11()
864 data->y_size_mm = DIV_ROUND_CLOSEST(y_size, 10); rmi_populate_f11()
H A Dhid-input.c290 return DIV_ROUND_CLOSEST(logical_extents, physical_extents); hidinput_calc_abs_res()
/linux-4.1.27/sound/usb/misc/
H A Dua101.c669 DIV_ROUND_CLOSEST(ua->rate, ua->packets_per_second); capture_pcm_open()
690 DIV_ROUND_CLOSEST(ua->rate * ua->playback.queue_length, playback_pcm_open()
/linux-4.1.27/drivers/memory/
H A Demif.c718 fifo_we_slave_ratio = DIV_ROUND_CLOSEST( get_ext_phy_ctrl_2_intelliphy_4d5()
729 fifo_we_slave_ratio = DIV_ROUND_CLOSEST( get_ext_phy_ctrl_3_intelliphy_4d5()
740 fifo_we_slave_ratio = DIV_ROUND_CLOSEST( get_ext_phy_ctrl_4_intelliphy_4d5()
/linux-4.1.27/drivers/gpu/drm/radeon/
H A Dradeon_display.c905 *ref_div = min(max(DIV_ROUND_CLOSEST(den, post_div), 1u), ref_div_max); avivo_get_fb_ref_div()
906 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); avivo_get_fb_ref_div()
910 *ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div); avivo_get_fb_ref_div()
/linux-4.1.27/drivers/media/pci/pluto2/
H A Dpluto2.c444 return DIV_ROUND_CLOSEST(numerator, denominator); divide()
/linux-4.1.27/drivers/gpu/drm/gma500/
H A Doaktrail_hdmi.c196 nf = DIV_ROUND_CLOSEST((target * 10 * np * nr), refclk); oaktrail_hdmi_find_dpll()
/linux-4.1.27/drivers/char/
H A Di8k.c638 val = clamp_val(DIV_ROUND_CLOSEST(val, i8k_pwm_mult), 0, i8k_fan_max); i8k_hwmon_set_pwm()
/linux-4.1.27/arch/m68k/amiga/
H A Dconfig.c475 jiffy_ticks = DIV_ROUND_CLOSEST(amiga_eclock, HZ); amiga_sched_init()
/linux-4.1.27/arch/arm/mach-ep93xx/
H A Dcore.c120 #define TIMER4_TICKS_PER_JIFFY DIV_ROUND_CLOSEST(EP93XX_TIMER4_CLOCK, HZ)
/linux-4.1.27/net/dsa/
H A Ddsa.c121 ret = ds->drv->set_temp_limit(ds, DIV_ROUND_CLOSEST(temp, 1000)); temp1_max_store()
/linux-4.1.27/drivers/ide/
H A Dide-cd.c1158 cd->current_speed = DIV_ROUND_CLOSEST(curspeed, 176); ide_cdrom_update_speed()
1159 cd->max_speed = DIV_ROUND_CLOSEST(maxspeed, 176); ide_cdrom_update_speed()
/linux-4.1.27/drivers/power/
H A Dab8500_fg.c1161 percent = DIV_ROUND_CLOSEST(di->bat_cap.permille, 10); ab8500_fg_capacity_level()
1210 DIV_ROUND_CLOSEST(di->bat_cap.prev_percent * ab8500_fg_calculate_scaled_capacity()
1282 int percent = DIV_ROUND_CLOSEST(di->bat_cap.permille, 10); ab8500_fg_check_capacity_limits()
/linux-4.1.27/drivers/video/fbdev/omap2/omapfb/
H A Domapfb-main.c712 var->width = DIV_ROUND_CLOSEST(w, 1000); check_fb_var()
713 var->height = DIV_ROUND_CLOSEST(h, 1000); check_fb_var()
/linux-4.1.27/arch/x86/kernel/
H A Dtsc.c261 DIV_ROUND_CLOSEST(NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR, set_cyc2ns_scale()
/linux-4.1.27/drivers/atm/
H A Dhorizon.c629 pre = DIV_ROUND_CLOSEST(br, c<<div); make_rate()
659 pre = DIV_ROUND_CLOSEST(br, c<<div); make_rate()
/linux-4.1.27/drivers/mfd/
H A Dsm501.c423 diff = DIV_ROUND_CLOSEST(mclk, divider << shift) - freq; sm501_calc_clock()
/linux-4.1.27/drivers/media/platform/omap3isp/
H A Disp.c238 divider = DIV_ROUND_CLOSEST(parent_rate, *rate); isp_xclk_calc_divider()
/linux-4.1.27/drivers/net/ethernet/broadcom/
H A Db44.c1320 (DIV_ROUND_CLOSEST(ssb_clockspeed(sdev->bus), b44_chip_reset()
/linux-4.1.27/kernel/sched/
H A Dfair.c1165 DIV_ROUND_CLOSEST(ns->compute_capacity, SCHED_CAPACITY_SCALE));
6504 env->imbalance = DIV_ROUND_CLOSEST( check_asym_packing()
/linux-4.1.27/drivers/scsi/
H A Dpmcraid.c3171 DIV_ROUND_CLOSEST(sgcount + ioadl_count, 8); pmcraid_init_ioadls()

Completed in 3932 milliseconds