/Linux-v5.4/drivers/clk/ |
D | clk-xgene.c | 226 u64 denom; member 261 scale = fd->denom - scale; in xgene_clk_pmd_recalc_rate() 266 do_div(ret, fd->denom); in xgene_clk_pmd_recalc_rate() 284 ret = rate * fd->denom; in xgene_clk_pmd_round_rate() 288 do_div(ret, fd->denom); in xgene_clk_pmd_round_rate() 307 ret = rate * fd->denom; in xgene_clk_pmd_set_rate() 312 scale = fd->denom - scale; in xgene_clk_pmd_set_rate() 344 u8 width, u64 denom, u32 clk_flags, spinlock_t *lock) in xgene_register_clk_pmd() argument 363 fd->denom = denom; in xgene_register_clk_pmd() 384 u64 denom; in xgene_pmdclk_init() local [all …]
|
D | clk-si5351.c | 450 unsigned long rfrac, denom, a, b, c; in si5351_pll_round_rate() local 467 denom = 1000 * 1000; in si5351_pll_round_rate() 469 lltmp *= denom; in si5351_pll_round_rate() 476 rational_best_approximation(rfrac, denom, in si5351_pll_round_rate() 694 unsigned long rfrac, denom; in si5351_msynth_round_rate() local 710 denom = 1000 * 1000; in si5351_msynth_round_rate() 712 lltmp *= denom; in si5351_msynth_round_rate() 719 rational_best_approximation(rfrac, denom, in si5351_msynth_round_rate()
|
/Linux-v5.4/arch/mips/netlogic/xlp/ |
D | nlm_hal.c | 230 unsigned int pll_post_div, ctrl_val0, ctrl_val1, denom; in nlm_xlp2_get_core_frequency() local 268 denom = 3 * pll_post_div; in nlm_xlp2_get_core_frequency() 269 do_div(num, denom); in nlm_xlp2_get_core_frequency() 277 unsigned int rstval, dfsval, denom; in nlm_xlp_get_core_frequency() local 289 denom = 3 * pll_divr * ext_div * dfs_div; in nlm_xlp_get_core_frequency() 290 do_div(num, denom); in nlm_xlp_get_core_frequency()
|
/Linux-v5.4/drivers/thermal/ |
D | rockchip_thermal.c | 479 unsigned int denom; in rk_tsadcv2_temp_to_code() local 508 denom = table->id[mid + 1].temp - table->id[mid].temp; in rk_tsadcv2_temp_to_code() 512 return table->id[mid].code - (num / denom); in rk_tsadcv2_temp_to_code() 514 return table->id[mid].code + (num / denom); in rk_tsadcv2_temp_to_code() 533 unsigned long denom; in rk_tsadcv2_code_to_temp() local 585 denom = abs(table->id[mid - 1].code - table->id[mid].code); in rk_tsadcv2_code_to_temp() 586 *temp = table->id[mid - 1].temp + (num / denom); in rk_tsadcv2_code_to_temp()
|
/Linux-v5.4/net/dccp/ccids/ |
D | ccid2.c | 317 int denom = dp->dccps_l_ack_ratio * dp->dccps_l_ack_ratio - in ccid2_hc_tx_packet_sent() 320 denom = hc->tx_cwnd * hc->tx_cwnd / denom; in ccid2_hc_tx_packet_sent() 322 if (hc->tx_arsent >= denom) { in ccid2_hc_tx_packet_sent()
|
/Linux-v5.4/drivers/video/fbdev/aty/ |
D | radeon_base.c | 583 int hTotal, vTotal, num, denom, m, n; in radeon_probe_pll_params() local 630 denom = 1; in radeon_probe_pll_params() 636 denom = 2*m; in radeon_probe_pll_params() 642 denom = 2*m; in radeon_probe_pll_params() 653 denom *= m; in radeon_probe_pll_params() 657 denom *= 2; in radeon_probe_pll_params() 660 denom *= 4; in radeon_probe_pll_params() 663 denom *= 8; in radeon_probe_pll_params() 666 denom *= 3; in radeon_probe_pll_params() 669 denom *= 6; in radeon_probe_pll_params() [all …]
|
/Linux-v5.4/include/linux/ |
D | kernel.h | 170 #define mult_frac(x, numer, denom)( \ argument 172 typeof(x) quot = (x) / (denom); \ 173 typeof(x) rem = (x) % (denom); \ 174 (quot * (numer)) + ((rem * (numer)) / (denom)); \
|
/Linux-v5.4/drivers/scsi/ |
D | scsi_transport_spi.c | 87 static int sprint_frac(char *dest, int value, int denom) in sprint_frac() argument 89 int frac = value % denom; in sprint_frac() 90 int result = sprintf(dest, "%d", value / denom); in sprint_frac() 97 denom /= 10; in sprint_frac() 98 sprintf(dest + result, "%d", frac / denom); in sprint_frac() 100 frac %= denom; in sprint_frac()
|
D | scsi_debug.c | 5732 int denom = (flags & F_SYNC_DELAY) ? 20 : 1; in scsi_debug_queuecommand() local 5734 jdelay = mult_frac(USER_HZ * jdelay, HZ, denom * USER_HZ); in scsi_debug_queuecommand()
|
/Linux-v5.4/drivers/net/wireless/intel/iwlegacy/ |
D | 4965.c | 553 il4965_math_div_round(s32 num, s32 denom, s32 * res) in il4965_math_div_round() argument 561 if (denom < 0) { in il4965_math_div_round() 563 denom = -denom; in il4965_math_div_round() 565 *res = ((num * 2 + denom) / (denom * 2)) * sign; in il4965_math_div_round()
|
/Linux-v5.4/drivers/media/platform/vivid/ |
D | vivid-vid-cap.c | 1631 u32 *num, u32 *denom) in find_aspect_ratio() argument 1635 *denom = 3; in find_aspect_ratio() 1638 *denom = 9; in find_aspect_ratio() 1641 *denom = 10; in find_aspect_ratio() 1644 *denom = 4; in find_aspect_ratio() 1647 *denom = 9; in find_aspect_ratio() 1650 *denom = 9; in find_aspect_ratio()
|
/Linux-v5.4/drivers/media/dvb-frontends/ |
D | dib7000p.c | 1800 u32 tmp, denom; in dib7000p_get_time_us() local 1871 denom = bits_per_symbol * rate_num * fft_div * 384; in dib7000p_get_time_us() 1879 if (!denom) in dib7000p_get_time_us() 1887 time_us += denom / 2; in dib7000p_get_time_us() 1888 do_div(time_us, denom); in dib7000p_get_time_us() 2441 u32 denom = P_Kout; in dib7090_calcSyncFreq() local 2442 u32 syncFreq = ((nom << quantif) / denom); in dib7090_calcSyncFreq()
|
D | dib8000.c | 1384 u32 denom = P_Kout; in dib8096p_calcSyncFreq() local 1385 u32 syncFreq = ((nom << quantif) / denom); in dib8096p_calcSyncFreq() 3989 u32 tmp, denom; in dib8000_get_time_us() local 4030 denom = 0; in dib8000_get_time_us() 4076 denom += bits_per_symbol * rate_num * fft_div * nsegs * 384; in dib8000_get_time_us() 4080 if (!denom) in dib8000_get_time_us() 4088 time_us += denom / 2; in dib8000_get_time_us() 4089 do_div(time_us, denom); in dib8000_get_time_us()
|
/Linux-v5.4/drivers/media/tuners/ |
D | mt2063.c | 1403 static u32 MT2063_fLO_FractionalTerm(u32 f_ref, u32 num, u32 denom) in MT2063_fLO_FractionalTerm() argument 1406 u32 term1 = t1 / denom; in MT2063_fLO_FractionalTerm() 1407 u32 loss = t1 % denom; in MT2063_fLO_FractionalTerm() 1409 (((f_ref & 0x00003FFF) * num + (loss << 14)) + (denom / 2)) / denom; in MT2063_fLO_FractionalTerm()
|
/Linux-v5.4/drivers/tty/serial/ |
D | imx.c | 1548 unsigned long num, denom, old_ubir, old_ubmr; in imx_uart_set_termios() local 1658 1 << 16, 1 << 16, &num, &denom); in imx_uart_set_termios() 1662 do_div(tdiv64, denom * 16 * div); in imx_uart_set_termios() 1667 denom -= 1; in imx_uart_set_termios() 1684 if (old_ubir != num || old_ubmr != denom) { in imx_uart_set_termios() 1686 imx_uart_writel(sport, denom, UBMR); in imx_uart_set_termios()
|
/Linux-v5.4/drivers/net/wireless/intersil/orinoco/ |
D | wext.c | 440 int denom = 1; in orinoco_ioctl_setfreq() local 445 denom *= 10; in orinoco_ioctl_setfreq() 447 chan = ieee80211_frequency_to_channel(frq->m / denom); in orinoco_ioctl_setfreq()
|
/Linux-v5.4/drivers/hid/ |
D | wacom_wac.c | 1776 int value, int num, int denom) in wacom_offset_rotation() argument 1781 value += num*range/denom; in wacom_offset_rotation()
|