Home
last modified time | relevance | path

Searched refs:denom (Results 1 – 23 of 23) sorted by relevance

/linux-6.1.9/drivers/clk/ !
Dclk-xgene.c225 u64 denom; member
260 scale = fd->denom - scale; in xgene_clk_pmd_recalc_rate()
265 do_div(ret, fd->denom); in xgene_clk_pmd_recalc_rate()
283 ret = rate * fd->denom; in xgene_clk_pmd_round_rate()
287 do_div(ret, fd->denom); in xgene_clk_pmd_round_rate()
306 ret = rate * fd->denom; in xgene_clk_pmd_set_rate()
311 scale = fd->denom - scale; in xgene_clk_pmd_set_rate()
343 u8 width, u64 denom, u32 clk_flags, spinlock_t *lock) in xgene_register_clk_pmd() argument
362 fd->denom = denom; in xgene_register_clk_pmd()
383 u64 denom; in xgene_pmdclk_init() local
[all …]
Dclk-si5351.c450 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()
Dclk-versaclock7.c783 u64 numer, denom, hi, lo, divisor; in vc7_calc_fod_1st_stage_rate() local
786 denom = BIT_ULL(VC7_FOD_DENOMINATOR_BITS); in vc7_calc_fod_1st_stage_rate()
789 vc7_64_mul_64_to_128(parent_rate, denom, &hi, &lo); in vc7_calc_fod_1st_stage_rate()
790 divisor = ((u64)fod_1st_int * denom) + numer; in vc7_calc_fod_1st_stage_rate()
/linux-6.1.9/include/linux/ !
Dmath.h125 #define mult_frac(x, numer, denom)( \ in __STRUCT_FRACT() argument
127 typeof(x) quot = (x) / (denom); \ in __STRUCT_FRACT()
128 typeof(x) rem = (x) % (denom); \ in __STRUCT_FRACT()
129 (quot * (numer)) + ((rem * (numer)) / (denom)); \ in __STRUCT_FRACT()
/linux-6.1.9/drivers/gpu/drm/ingenic/ !
Dingenic-ipu.c234 unsigned int denom) in ingenic_ipu_set_downscale_coefs() argument
236 unsigned int i, offset, weight, weight_num = denom; in ingenic_ipu_set_downscale_coefs()
241 weight_num += denom * 2; in ingenic_ipu_set_downscale_coefs()
266 unsigned int denom) in ingenic_ipu_set_upscale_coefs() argument
272 weight_num += denom; in ingenic_ipu_set_upscale_coefs()
284 unsigned int num, unsigned int denom) in ingenic_ipu_set_coefs() argument
289 if (denom > num) in ingenic_ipu_set_coefs()
290 ingenic_ipu_set_downscale_coefs(ipu, reg, num, denom); in ingenic_ipu_set_coefs()
291 else if (denom == 1) in ingenic_ipu_set_coefs()
294 ingenic_ipu_set_upscale_coefs(ipu, reg, num, denom); in ingenic_ipu_set_coefs()
[all …]
/linux-6.1.9/drivers/clk/baikal-t1/ !
Dccu-pll.c172 unsigned long num, denom, n1, d1, nri; in ccu_pll_calc_factors() local
192 denom = parent_rate / nri; in ccu_pll_calc_factors()
201 nf_max = min(CCU_PLL_FVCO_MAX / denom, CCU_PLL_NF_MAX); in ccu_pll_calc_factors()
208 if (num / denom >= nf_max) { in ccu_pll_calc_factors()
211 } else if (denom / num >= od_max) { in ccu_pll_calc_factors()
215 rational_best_approximation(num, denom, nf_max, od_max, in ccu_pll_calc_factors()
/linux-6.1.9/drivers/thermal/ !
Drockchip_thermal.c531 unsigned int denom; in rk_tsadcv2_temp_to_code() local
560 denom = table->id[mid + 1].temp - table->id[mid].temp; in rk_tsadcv2_temp_to_code()
564 return table->id[mid].code - (num / denom); in rk_tsadcv2_temp_to_code()
566 return table->id[mid].code + (num / denom); in rk_tsadcv2_temp_to_code()
585 unsigned long denom; in rk_tsadcv2_code_to_temp() local
637 denom = abs(table->id[mid - 1].code - table->id[mid].code); in rk_tsadcv2_code_to_temp()
638 *temp = table->id[mid - 1].temp + (num / denom); in rk_tsadcv2_code_to_temp()
/linux-6.1.9/net/dccp/ccids/ !
Dccid2.c320 int denom = dp->dccps_l_ack_ratio * dp->dccps_l_ack_ratio - in ccid2_hc_tx_packet_sent()
323 denom = hc->tx_cwnd * hc->tx_cwnd / denom; in ccid2_hc_tx_packet_sent()
325 if (hc->tx_arsent >= denom) { in ccid2_hc_tx_packet_sent()
/linux-6.1.9/drivers/gpu/drm/amd/display/dc/dcn30/ !
Ddcn30_hwseq.c800 unsigned int denom = refresh_hz * 6528; in dcn30_apply_idle_power_optimizations() local
804 (100LL + dc->debug.mall_additional_timer_percent) + denom - 1), in dcn30_apply_idle_power_optimizations()
805 denom) - 64LL; in dcn30_apply_idle_power_optimizations()
826 denom *= 2; in dcn30_apply_idle_power_optimizations()
828 (100LL + dc->debug.mall_additional_timer_percent) + denom - 1), in dcn30_apply_idle_power_optimizations()
829 denom) - 64LL; in dcn30_apply_idle_power_optimizations()
/linux-6.1.9/drivers/video/fbdev/aty/ !
Dradeon_base.c580 int hTotal, vTotal, num, denom, m, n; in radeon_probe_pll_params() local
627 denom = 1; in radeon_probe_pll_params()
633 denom = 2*m; in radeon_probe_pll_params()
639 denom = 2*m; in radeon_probe_pll_params()
650 denom *= m; in radeon_probe_pll_params()
654 denom *= 2; in radeon_probe_pll_params()
657 denom *= 4; in radeon_probe_pll_params()
660 denom *= 8; in radeon_probe_pll_params()
663 denom *= 3; in radeon_probe_pll_params()
666 denom *= 6; in radeon_probe_pll_params()
[all …]
/linux-6.1.9/drivers/net/wireless/intel/iwlegacy/ !
D4965.c553 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-6.1.9/drivers/scsi/ !
Dscsi_transport_spi.c87 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()
Dscsi_debug.c7768 int denom = (flags & F_SYNC_DELAY) ? 20 : 1; in scsi_debug_queuecommand() local
7770 jdelay = mult_frac(USER_HZ * jdelay, HZ, denom * USER_HZ); in scsi_debug_queuecommand()
/linux-6.1.9/drivers/media/test-drivers/vivid/ !
Dvivid-vid-cap.c1681 u32 *num, u32 *denom) in find_aspect_ratio() argument
1685 *denom = 3; in find_aspect_ratio()
1688 *denom = 9; in find_aspect_ratio()
1691 *denom = 10; in find_aspect_ratio()
1694 *denom = 4; in find_aspect_ratio()
1697 *denom = 9; in find_aspect_ratio()
1700 *denom = 9; in find_aspect_ratio()
/linux-6.1.9/drivers/media/dvb-frontends/ !
Ddib7000p.c1800 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()
Ddib8000.c1384 u32 denom = P_Kout; in dib8096p_calcSyncFreq() local
1385 u32 syncFreq = ((nom << quantif) / denom); in dib8096p_calcSyncFreq()
4013 u32 tmp, denom; in dib8000_get_time_us() local
4054 denom = 0; in dib8000_get_time_us()
4100 denom += bits_per_symbol * rate_num * fft_div * nsegs * 384; in dib8000_get_time_us()
4104 if (!denom) in dib8000_get_time_us()
4112 time_us += denom / 2; in dib8000_get_time_us()
4113 do_div(time_us, denom); in dib8000_get_time_us()
/linux-6.1.9/drivers/media/tuners/ !
Dmt2063.c1403 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-6.1.9/drivers/tty/serial/ !
Dimx.c1629 unsigned long num, denom, old_ubir, old_ubmr; in imx_uart_set_termios() local
1738 1 << 16, 1 << 16, &num, &denom); in imx_uart_set_termios()
1742 do_div(tdiv64, denom * 16 * div); in imx_uart_set_termios()
1747 denom -= 1; in imx_uart_set_termios()
1764 if (old_ubir != num || old_ubmr != denom) { in imx_uart_set_termios()
1766 imx_uart_writel(sport, denom, UBMR); in imx_uart_set_termios()
/linux-6.1.9/drivers/net/wireless/intersil/orinoco/ !
Dwext.c440 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-6.1.9/drivers/gpu/drm/amd/display/dc/dcn10/ !
Ddcn10_hw_sequencer.c2041 uint64_t num, denom; in reduceSizeAndFraction() local
2061 denom = *denominator; in reduceSizeAndFraction()
2066 num <= max_int32 && denom <= max_int32) { in reduceSizeAndFraction()
2072 denom_result = div_u64_rem(denom, prime_numbers[i], &denom_remainder); in reduceSizeAndFraction()
2075 denom = denom_result; in reduceSizeAndFraction()
2080 *denominator = denom; in reduceSizeAndFraction()
/linux-6.1.9/sound/soc/codecs/ !
Dwcd938x.c3130 int32_t denom; in wcd938x_mbhc_get_result_params() local
3157 denom = (x1 * d1) - (1 << (14 - noff)); in wcd938x_mbhc_get_result_params()
3158 if (denom > 0) in wcd938x_mbhc_get_result_params()
3159 *zdet = (WCD938X_MBHC_ZDET_CONST * 1000) / denom; in wcd938x_mbhc_get_result_params()
Dwcd934x.c2653 int32_t denom; in wcd934x_mbhc_get_result_params() local
2680 denom = (x1 * d1) - (1 << (14 - noff)); in wcd934x_mbhc_get_result_params()
2681 if (denom > 0) in wcd934x_mbhc_get_result_params()
2682 *zdet = (WCD934X_MBHC_ZDET_CONST * 1000) / denom; in wcd934x_mbhc_get_result_params()
/linux-6.1.9/drivers/hid/ !
Dwacom_wac.c1829 int value, int num, int denom) in wacom_offset_rotation() argument
1834 value += num*range/denom; in wacom_offset_rotation()