/linux-4.1.27/drivers/clk/ |
H A D | clk-clps711x.c | 76 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 D | clk-axi-clkgen.c | 171 dout = DIV_ROUND_CLOSEST(fvco, fout); axi_clkgen_calc_params()
|
H A D | clk-si570.c | 325 * This is a re-implementation of DIV_ROUND_CLOSEST si570_set_frequency_small()
|
/linux-4.1.27/drivers/hwmon/pmbus/ |
H A D | lm25066.c | 237 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 D | zl6100.c | 116 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 D | pmbus_core.c | 508 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 D | time.c | 28 #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 D | dc21285-timer.c | 118 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 D | gk20a.c | 68 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 D | util_macros.h | 10 if (__fc_x op DIV_ROUND_CLOSEST(__fc_a[__fc_i] + \
|
H A D | kernel.h | 96 #define DIV_ROUND_CLOSEST(x, divisor)( \ macro
|
/linux-4.1.27/drivers/clocksource/ |
H A D | time-efm32.c | 163 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 D | clps711x-timer.c | 89 writew(DIV_ROUND_CLOSEST(rate, HZ), base); _clps711x_clkevt_init()
|
H A D | moxart_timer.c | 148 clock_count_per_tick = DIV_ROUND_CLOSEST(pclk, HZ); moxart_timer_init()
|
H A D | cadence_ttc_timer.c | 208 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 D | arm_global_timer.c | 117 gt_compare_set(DIV_ROUND_CLOSEST(gt_clk_rate, HZ), 1); gt_clockevent_set_mode()
|
H A D | asm9260_timer.c | 215 priv.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); asm9260_timer_init()
|
H A D | fsl_ftm_timer.c | 307 priv->periodic_cyc = DIV_ROUND_CLOSEST(freq, ftm_calc_closest_round_cyc()
|
H A D | nomadik-mtu.c | 221 nmdk_cycle = DIV_ROUND_CLOSEST(rate, HZ); nmdk_timer_init()
|
H A D | timer-atmel-pit.c | 197 data->cycle = DIV_ROUND_CLOSEST(pit_rate, HZ); at91sam926x_pit_common_init()
|
H A D | timer-u300.c | 386 u300_clockevent_data.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); u300_timer_init_of()
|
/linux-4.1.27/drivers/hwmon/ |
H A D | ads7828.c | 77 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 D | da9052-hwmon.c | 47 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 D | ina2xx.c | 153 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 D | wm831x-hwmon.c | 53 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 D | wm8350-hwmon.c | 45 val = DIV_ROUND_CLOSEST(val, 1000); show_voltage()
|
H A D | da9055-hwmon.c | 124 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 D | ltc4222.c | 73 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 D | mc13783-adc.c | 85 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 D | lm95234.c | 225 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 D | ad7314.c | 85 DIV_ROUND_CLOSEST(data * 3125, 100)); ad7314_show_temperature()
|
H A D | adc128d818.c | 154 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 D | hih6130.c | 70 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 D | nct7802.c | 111 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 D | lm63.c | 129 #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 D | adt7x10.c | 213 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 D | emc6w201.c | 218 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 D | ina209.c | 120 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 D | ltc2945.c | 183 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 D | mcp3021.c | 83 return DIV_ROUND_CLOSEST(data->vdd * val, 1 << data->output_res); volts_from_reg()
|
H A D | tmp103.c | 61 return DIV_ROUND_CLOSEST(val, 1000); tmp103_mc_to_reg()
|
H A D | ds1621.c | 138 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 D | adt7462.c | 813 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 D | emc1403.c | 85 DIV_ROUND_CLOSEST(val, 1000)); store_temp() 163 hyst = clamp_val(DIV_ROUND_CLOSEST(hyst, 1000), 0, 255); store_hyst()
|
H A D | ads1015.c | 131 return DIV_ROUND_CLOSEST(reg * fullscale, mask); ads1015_reg_to_mv()
|
H A D | emc2103.c | 254 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 D | tmp401.c | 188 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 D | acpi_power_meter.c | 240 temp = DIV_ROUND_CLOSEST(temp, 1000); set_cap() 310 temp = DIV_ROUND_CLOSEST(temp, 1000); set_trip()
|
H A D | hwmon-vid.c | 122 return DIV_ROUND_CLOSEST(15500 - 125 * val, 10); vid_from_reg()
|
H A D | s3c-hwmon.c | 179 ret = DIV_ROUND_CLOSEST(ret, cfg->div); s3c_hwmon_ch_show()
|
H A D | adt7470.c | 478 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 D | w83791d.c | 252 #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 D | lm75.c | 158 data->temp[nr] = DIV_ROUND_CLOSEST(temp << (resolution - 8), set_temp()
|
H A D | max16065.c | 122 return clamp_val(DIV_ROUND_CLOSEST(mv * 256, range), 0, 255); MV_TO_LIMIT()
|
H A D | sch5627.c | 314 val = DIV_ROUND_CLOSEST( show_in()
|
H A D | sch5636.c | 189 val = DIV_ROUND_CLOSEST( show_in_value()
|
H A D | w83627ehf.c | 412 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 D | nct6775.c | 734 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 D | lm80.c | 90 #define TEMP_TO_REG(temp) (DIV_ROUND_CLOSEST(clamp_val((temp), \
|
H A D | max6697.c | 315 temp = DIV_ROUND_CLOSEST(temp, 1000) + data->temp_offset; set_temp()
|
H A D | w83l786ng.c | 529 val = DIV_ROUND_CLOSEST(val, 0x11); store_pwm()
|
H A D | adt7475.c | 261 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 D | nct6683.c | 495 return clamp_val(DIV_ROUND_CLOSEST(val, scale), 0, 127); in_to_reg()
|
H A D | lm85.c | 158 DIV_ROUND_CLOSEST(clamp_val((val), -127000, 127000), 1000)
|
H A D | lm90.c | 513 data->update_interval = DIV_ROUND_CLOSEST(update_interval, 64); lm90_set_convrate()
|
H A D | w83795.c | 320 reg1 = clamp_val(DIV_ROUND_CLOSEST(base_clock, val), 1, 128); pwm_freq_to_reg()
|
H A D | it87.c | 486 val = DIV_ROUND_CLOSEST(val, adc_lsb(data, nr)); in_to_reg()
|
/linux-4.1.27/arch/m32r/kernel/ |
H A D | time.c | 78 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 D | time.c | 63 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 D | leds-ipaq-micro.c | 95 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 D | leds-asic3.c | 28 #define MS_TO_CLK(ms) DIV_ROUND_CLOSEST(((ms)*1024), 32000)
|
/linux-4.1.27/drivers/media/i2c/cx25840/ |
H A D | cx25840-ir.c | 156 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 D | cx23888-ir.c | 190 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 D | soc_scale_crop.h | 28 return DIV_ROUND_CLOSEST(size << shift, scale); soc_camera_shift_scale()
|
/linux-4.1.27/drivers/clk/at91/ |
H A D | clk-usb.c | 56 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 D | clk-pll.c | 220 tmpmul = DIV_ROUND_CLOSEST(rate, parent_rate / tmpdiv); clk_pll_get_best_div_mul()
|
/linux-4.1.27/drivers/pwm/ |
H A D | pwm-clps711x.c | 51 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 D | time.c | 121 jz4740_jiffies_per_tick = DIV_ROUND_CLOSEST(clk_rate, HZ); plat_time_init()
|
/linux-4.1.27/drivers/clk/sunxi/ |
H A D | clk-mod0.c | 226 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 D | dsi.h | 88 ((DIV_ROUND_CLOSEST(value, period) - (hwinc)) & 0xff)
|
H A D | dsi.c | 917 state->period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, plld); tegra_dsi_encoder_atomic_check()
|
/linux-4.1.27/arch/powerpc/platforms/85xx/ |
H A D | p1022_rdk.c | 74 pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq); p1022rdk_set_pixel_clock()
|
H A D | p1022_ds.c | 404 pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq); p1022ds_set_pixel_clock()
|
/linux-4.1.27/arch/arm/plat-iop/ |
H A D | time.c | 147 ticks_per_jiffy = DIV_ROUND_CLOSEST(tick_rate, HZ); iop_init_time()
|
/linux-4.1.27/arch/arm/mach-gemini/ |
H A D | time.c | 65 u32 period = DIV_ROUND_CLOSEST(tick_rate, HZ); gemini_timer_set_mode()
|
/linux-4.1.27/arch/arm/mach-netx/ |
H A D | time.c | 32 #define NETX_LATCH DIV_ROUND_CLOSEST(NETX_CLOCK_FREQ, HZ)
|
/linux-4.1.27/drivers/gpu/drm/i915/ |
H A D | intel_dsi_pll.c | 158 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 D | intel_pm.c | 1792 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 D | intel_display.c | 409 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 D | intel_dp.c | 722 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 D | rc80211_minstrel_ht_debugfs.c | 81 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 D | vivid-sdr-cap.c | 449 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 D | i2c-mxs.c | 743 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 D | adis16080.c | 117 *val = DIV_ROUND_CLOSEST(25 * 585, 85 - 25); adis16080_read_raw()
|
/linux-4.1.27/drivers/media/i2c/ |
H A D | mt9t001.c | 298 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 D | mt9p031.c | 418 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 D | 8250_early.c | 126 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud); init_port()
|
H A D | 8250_mtk.c | 103 tmp = DIV_ROUND_CLOSEST(port->uartclk, quot * baud); mtk8250_set_termios()
|
H A D | 8250_omap.c | 193 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 D | 8250_core.c | 2455 quot_16 = DIV_ROUND_CLOSEST(port->uartclk, baud); xr17v35x_get_divisor()
|
/linux-4.1.27/drivers/tty/serial/ |
H A D | efm32-uart.c | 358 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 D | sccnxp.c | 295 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 D | sh-sci.c | 1807 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 D | max310x.c | 513 return DIV_ROUND_CLOSEST(clk, div); max310x_set_baud() 541 fdiv = DIV_ROUND_CLOSEST(freq, div); max310x_set_ref_clk()
|
H A D | vt8500_serial.c | 702 vt8500_port->clk_predivisor = DIV_ROUND_CLOSEST( vt8500_serial_probe()
|
H A D | amba-pl011.c | 1788 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 D | sc16is7xx.c | 465 return DIV_ROUND_CLOSEST(clk / 16, div); sc16is7xx_set_baud()
|
H A D | serial-tegra.c | 291 divisor = DIV_ROUND_CLOSEST(rate, baud * 16); tegra_set_baudrate()
|
H A D | pch_uart.c | 461 div = DIV_ROUND_CLOSEST(priv->uartclk / 16, baud); pch_uart_hal_set_line()
|
H A D | xilinx_uartps.c | 353 cd = DIV_ROUND_CLOSEST(clk, baud * (bdiv + 1)); cdns_uart_calc_baud_divs()
|
H A D | serial_core.c | 424 quot = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud); uart_get_divisor()
|
/linux-4.1.27/drivers/w1/masters/ |
H A D | mxc_w1.c | 121 clkdiv = DIV_ROUND_CLOSEST(clkrate, 1000000); mxc_w1_probe()
|
/linux-4.1.27/arch/mips/loongson1/common/ |
H A D | time.c | 59 ls1x_jiffies_per_tick = DIV_ROUND_CLOSEST(mips_hpt_frequency, HZ); ls1x_pwmtimer_init()
|
/linux-4.1.27/arch/alpha/kernel/ |
H A D | sys_ruffian.c | 67 #define RUFFIAN_LATCH DIV_ROUND_CLOSEST(PIT_TICK_RATE, HZ)
|
/linux-4.1.27/sound/soc/adi/ |
H A D | axi-spdif.c | 98 clkdiv = DIV_ROUND_CLOSEST(clk_get_rate(spdif->clk_ref), axi_spdif_hw_params()
|
/linux-4.1.27/drivers/media/tuners/ |
H A D | msi001.c | 219 thresh = DIV_ROUND_CLOSEST(thresh, tmp); msi001_set_tuner() 220 frac = DIV_ROUND_CLOSEST(frac, tmp); msi001_set_tuner()
|
H A D | tda18212.c | 143 buf[3] = DIV_ROUND_CLOSEST(if_khz, 50); tda18212_set_params()
|
/linux-4.1.27/include/net/ |
H A D | red.h | 109 #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 D | pcm512x.c | 868 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 D | ipu-di.c | 443 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 D | moxart-mmc.c | 618 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 D | iguanair.c | 308 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 D | ir-hix5hd2.c | 105 rate = DIV_ROUND_CLOSEST(priv->rate, 1000000); hix5hd2_ir_config()
|
H A D | rc-core-priv.h | 150 #define TO_US(duration) DIV_ROUND_CLOSEST((duration), 1000)
|
H A D | winbond-cir.c | 348 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 D | ite-cir.c | 121 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 D | ene_ir.c | 653 dev->tx_sample = DIV_ROUND_CLOSEST(sample, sample_period); ene_tx_sample()
|
H A D | mceusb.c | 635 period = DIV_ROUND_CLOSEST( mceusb_dev_printdata()
|
/linux-4.1.27/drivers/gpu/drm/rcar-du/ |
H A D | rcar_du_crtc.c | 121 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 D | coda-jpeg.c | 201 temp = DIV_ROUND_CLOSEST((unsigned int)q_tab[i] * scale, 100); coda_scale_quant_table()
|
/linux-4.1.27/drivers/clk/shmobile/ |
H A D | clk-div6.c | 96 div = DIV_ROUND_CLOSEST(parent_rate, rate); cpg_div6_clock_calc_div()
|
/linux-4.1.27/drivers/clk/zynq/ |
H A D | pll.c | 68 fbdiv = DIV_ROUND_CLOSEST(rate, *prate); zynq_pll_round_rate()
|
/linux-4.1.27/arch/powerpc/platforms/86xx/ |
H A D | mpc8610_hpcd.c | 260 pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq) - 1; mpc8610hpcd_set_pixel_clock()
|
/linux-4.1.27/arch/arm/common/ |
H A D | timer-sp.c | 201 clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); __sp804_clockevents_init()
|
/linux-4.1.27/arch/arm/kernel/ |
H A D | smp_twd.c | 48 writel_relaxed(DIV_ROUND_CLOSEST(twd_timer_rate, HZ), twd_set_mode()
|
H A D | topology.c | 66 * in order to return at most 1 when DIV_ROUND_CLOSEST
|
/linux-4.1.27/sound/soc/spear/ |
H A D | spdif_out.c | 97 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 D | atmel_hlcdc_plane.c | 619 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 D | ves1820.c | 168 ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, fin); ves1820_set_symbolrate()
|
H A D | m88ds3103.c | 528 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 D | stb6100.c | 397 nfrac = DIV_ROUND_CLOSEST((fvco - (nint * state->reference << psd2)) stb6100_set_frequency()
|
H A D | tda10021.c | 179 ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, FIN); tda10021_set_symbolrate()
|
H A D | dib7000p.c | 1199 int f_rel = DIV_ROUND_CLOSEST(rf_khz, xtal) * xtal - rf_khz; dib7000p_spur_protect()
|
/linux-4.1.27/drivers/regulator/ |
H A D | ti-abb-regulator.c | 482 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 D | spi-pxa2xx.c | 707 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 D | spi-rockchip.c | 534 rsd = DIV_ROUND_CLOSEST(rs->rsd_nsecs * (rs->max_freq >> 8), rockchip_spi_config()
|
/linux-4.1.27/drivers/net/dsa/ |
H A D | mv88e6352.c | 270 temp = clamp_val(DIV_ROUND_CLOSEST(temp, 5) + 5, 0, 0x1f); mv88e6352_set_temp_limit()
|
/linux-4.1.27/drivers/hsi/controllers/ |
H A D | omap_ssi.c | 431 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 D | f81232.c | 60 return DIV_ROUND_CLOSEST(F81232_MAX_BAUDRATE, baudrate); calc_baud_divisor()
|
/linux-4.1.27/arch/arm/mach-davinci/ |
H A D | clock.c | 359 ratio = DIV_ROUND_CLOSEST(input, rate); davinci_set_sysclk_rate()
|
/linux-4.1.27/arch/arm/mach-ixp4xx/ |
H A D | common.c | 53 #define IXP4XX_LATCH DIV_ROUND_CLOSEST(IXP4XX_TIMER_FREQ, \
|
/linux-4.1.27/drivers/media/v4l2-core/ |
H A D | tuner-core.c | 1170 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 D | ni_labpc_common.c | 372 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 D | comedi_8254.c | 455 divisor = DIV_ROUND_CLOSEST(*nanosec, i8254->osc_base); comedi_8254_ns_to_timer()
|
H A D | addi_apci_3120.c | 294 divisor = DIV_ROUND_CLOSEST(ns, timer_base); apci3120_ns_to_timer()
|
H A D | s626.c | 1954 divider = DIV_ROUND_CLOSEST(*nanosec, base); s626_ns_to_timer()
|
/linux-4.1.27/drivers/input/touchscreen/ |
H A D | elants_i2c.c | 475 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 D | hid-rmi.c | 863 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 D | hid-input.c | 290 return DIV_ROUND_CLOSEST(logical_extents, physical_extents); hidinput_calc_abs_res()
|
/linux-4.1.27/sound/usb/misc/ |
H A D | ua101.c | 669 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 D | emif.c | 718 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 D | radeon_display.c | 905 *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 D | pluto2.c | 444 return DIV_ROUND_CLOSEST(numerator, denominator); divide()
|
/linux-4.1.27/drivers/gpu/drm/gma500/ |
H A D | oaktrail_hdmi.c | 196 nf = DIV_ROUND_CLOSEST((target * 10 * np * nr), refclk); oaktrail_hdmi_find_dpll()
|
/linux-4.1.27/drivers/char/ |
H A D | i8k.c | 638 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 D | config.c | 475 jiffy_ticks = DIV_ROUND_CLOSEST(amiga_eclock, HZ); amiga_sched_init()
|
/linux-4.1.27/arch/arm/mach-ep93xx/ |
H A D | core.c | 120 #define TIMER4_TICKS_PER_JIFFY DIV_ROUND_CLOSEST(EP93XX_TIMER4_CLOCK, HZ)
|
/linux-4.1.27/net/dsa/ |
H A D | dsa.c | 121 ret = ds->drv->set_temp_limit(ds, DIV_ROUND_CLOSEST(temp, 1000)); temp1_max_store()
|
/linux-4.1.27/drivers/ide/ |
H A D | ide-cd.c | 1158 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 D | ab8500_fg.c | 1161 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 D | omapfb-main.c | 712 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 D | tsc.c | 261 DIV_ROUND_CLOSEST(NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR, set_cyc2ns_scale()
|
/linux-4.1.27/drivers/atm/ |
H A D | horizon.c | 629 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 D | sm501.c | 423 diff = DIV_ROUND_CLOSEST(mclk, divider << shift) - freq; sm501_calc_clock()
|
/linux-4.1.27/drivers/media/platform/omap3isp/ |
H A D | isp.c | 238 divider = DIV_ROUND_CLOSEST(parent_rate, *rate); isp_xclk_calc_divider()
|
/linux-4.1.27/drivers/net/ethernet/broadcom/ |
H A D | b44.c | 1320 (DIV_ROUND_CLOSEST(ssb_clockspeed(sdev->bus), b44_chip_reset()
|
/linux-4.1.27/kernel/sched/ |
H A D | fair.c | 1165 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 D | pmcraid.c | 3171 DIV_ROUND_CLOSEST(sgcount + ioadl_count, 8); pmcraid_init_ioadls()
|