/linux-master/drivers/clk/ |
H A D | clk-xgene.c | 210 * @denom: 1/denominator unit 214 * 0 for (0 + 1) / denom, 215 * 1 for (1 + 1) / denom and etc. 217 * 0 for (denom - 0) / denom, 218 * 1 for (denom - 1) / denom and etc. 225 u64 denom; member in struct:xgene_clk_pmd 260 scale = fd->denom - scale; 264 /* freq = parent_rate * scaler / denom */ 340 xgene_register_clk_pmd(struct device *dev, const char *name, const char *parent_name, unsigned long flags, void __iomem *reg, u8 shift, u8 width, u64 denom, u32 clk_flags, spinlock_t *lock) argument 383 u64 denom; local [all...] |
H A D | clk-si5351.c | 451 unsigned long rfrac, denom, a, b, c; local 468 denom = 1000 * 1000; 470 lltmp *= denom; 477 rational_best_approximation(rfrac, denom, 700 unsigned long rfrac, denom; local 716 denom = 1000 * 1000; 718 lltmp *= denom; 725 rational_best_approximation(rfrac, denom,
|
H A D | clk-versaclock7.c | 783 u64 numer, denom, hi, lo, divisor; local 786 denom = BIT_ULL(VC7_FOD_DENOMINATOR_BITS); 789 vc7_64_mul_64_to_128(parent_rate, denom, &hi, &lo); 790 divisor = ((u64)fod_1st_int * denom) + numer;
|
/linux-master/drivers/gpu/drm/ingenic/ |
H A D | ingenic-ipu.c | 234 unsigned int denom) 236 unsigned int i, offset, weight, weight_num = denom; 241 weight_num += denom * 2; 266 unsigned int denom) 272 weight_num += denom; 284 unsigned int num, unsigned int denom) 289 if (denom > num) 290 ingenic_ipu_set_downscale_coefs(ipu, reg, num, denom); 291 else if (denom == 1) 294 ingenic_ipu_set_upscale_coefs(ipu, reg, num, denom); 231 ingenic_ipu_set_downscale_coefs(struct ingenic_ipu *ipu, unsigned int reg, unsigned int num, unsigned int denom) argument 263 ingenic_ipu_set_upscale_coefs(struct ingenic_ipu *ipu, unsigned int reg, unsigned int num, unsigned int denom) argument 283 ingenic_ipu_set_coefs(struct ingenic_ipu *ipu, unsigned int reg, unsigned int num, unsigned int denom) argument 297 reduce_fraction(unsigned int *num, unsigned int *denom) argument [all...] |
/linux-master/drivers/clk/baikal-t1/ |
H A D | ccu-pll.c | 172 unsigned long num, denom, n1, d1, nri; local 192 denom = parent_rate / nri; 201 nf_max = min(CCU_PLL_FVCO_MAX / denom, CCU_PLL_NF_MAX); 208 if (num / denom >= nf_max) { 211 } else if (denom / num >= od_max) { 215 rational_best_approximation(num, denom, nf_max, od_max,
|
/linux-master/net/dccp/ccids/ |
H A D | ccid2.c | 320 int denom = dp->dccps_l_ack_ratio * dp->dccps_l_ack_ratio - 323 denom = hc->tx_cwnd * hc->tx_cwnd / denom; 325 if (hc->tx_arsent >= denom) {
|
/linux-master/drivers/thermal/ |
H A D | rockchip_thermal.c | 553 unsigned int denom; local 582 denom = table->id[mid + 1].temp - table->id[mid].temp; 586 return table->id[mid].code - (num / denom); 588 return table->id[mid].code + (num / denom); 607 unsigned long denom; local 659 denom = abs(table->id[mid - 1].code - table->id[mid].code); 660 *temp = table->id[mid - 1].temp + (num / denom);
|
/linux-master/drivers/video/fbdev/aty/ |
H A D | radeon_base.c | 580 int hTotal, vTotal, num, denom, m, n; local 627 denom = 1; 633 denom = 2*m; 639 denom = 2*m; 650 denom *= m; 654 denom *= 2; 657 denom *= 4; 660 denom *= 8; 663 denom *= 3; 666 denom * [all...] |
/linux-master/drivers/net/wireless/intel/iwlegacy/ |
H A D | 4965.c | 553 il4965_math_div_round(s32 num, s32 denom, s32 * res) argument 561 if (denom < 0) { 563 denom = -denom; 565 *res = ((num * 2 + denom) / (denom * 2)) * sign;
|
/linux-master/drivers/scsi/ |
H A D | scsi_transport_spi.c | 87 static int sprint_frac(char *dest, int value, int denom) argument 89 int frac = value % denom; 90 int result = sprintf(dest, "%d", value / denom); 97 denom /= 10; 98 sprintf(dest + result, "%d", frac / denom); 100 frac %= denom;
|
H A D | scsi_debug.c | 8366 int denom = (flags & F_SYNC_DELAY) ? 20 : 1; local 8368 jdelay = mult_frac(USER_HZ * jdelay, HZ, denom * USER_HZ);
|
/linux-master/drivers/gpu/drm/amd/display/dc/hwss/dcn30/ |
H A D | dcn30_hwseq.c | 978 unsigned int denom = refresh_hz * 6528; local 982 (100LL + dc->debug.mall_additional_timer_percent) + denom - 1), 983 denom) - 64LL; 1004 denom *= 2; 1006 (100LL + dc->debug.mall_additional_timer_percent) + denom - 1), 1007 denom) - 64LL;
|
/linux-master/drivers/media/test-drivers/vivid/ |
H A D | vivid-vid-cap.c | 1425 u32 *num, u32 *denom) 1429 *denom = 3; 1432 *denom = 9; 1435 *denom = 10; 1438 *denom = 4; 1441 *denom = 9; 1444 *denom = 9; 1424 find_aspect_ratio(u32 width, u32 height, u32 *num, u32 *denom) argument
|
/linux-master/tools/testing/selftests/hid/tests/ |
H A D | test_wacom_generic.py | 812 self.empty_pad_sync(num=3, denom=16, reverse=True) 814 def empty_pad_sync(self, num, denom, reverse): 830 value += num * delta // denom
|
/linux-master/drivers/media/tuners/ |
H A D | mt2063.c | 1386 * MT2063_fLO_FractionalTerm - Calculates the portion contributed by FracN / denom. 1389 * f_ref * num / denom to within 1 HZ with fixed math. 1393 * @denom: denominator portion of the ratio 1400 * This routine successfully handles denom values up to and including 2^18. 1401 * Returns: f_ref * num / denom 1403 static u32 MT2063_fLO_FractionalTerm(u32 f_ref, u32 num, u32 denom) argument 1406 u32 term1 = t1 / denom; 1407 u32 loss = t1 % denom; 1409 (((f_ref & 0x00003FFF) * num + (loss << 14)) + (denom / 2)) / denom; [all...] |
/linux-master/drivers/media/dvb-frontends/ |
H A D | dib7000p.c | 1800 u32 tmp, denom; local 1871 denom = bits_per_symbol * rate_num * fft_div * 384; 1879 if (!denom) 1887 time_us += denom / 2; 1888 do_div(time_us, denom); 2441 u32 denom = P_Kout; local 2442 u32 syncFreq = ((nom << quantif) / denom);
|
H A D | dib8000.c | 1384 u32 denom = P_Kout; local 1385 u32 syncFreq = ((nom << quantif) / denom); 4013 u32 tmp, denom; local 4054 denom = 0; 4100 denom += bits_per_symbol * rate_num * fft_div * nsegs * 384; 4104 if (!denom) 4112 time_us += denom / 2; 4113 do_div(time_us, denom);
|
/linux-master/drivers/tty/serial/ |
H A D | imx.c | 1665 unsigned long num, denom, old_ubir, old_ubmr; local 1774 1 << 16, 1 << 16, &num, &denom); 1778 do_div(tdiv64, denom * 16 * div); 1783 denom -= 1; 1800 if (old_ubir != num || old_ubmr != denom) { 1802 imx_uart_writel(sport, denom, UBMR);
|
/linux-master/drivers/gpu/drm/amd/display/dc/hwss/dcn10/ |
H A D | dcn10_hwseq.c | 2095 uint64_t num, denom; local 2115 denom = *denominator; 2120 num <= max_int32 && denom <= max_int32) { 2126 denom_result = div_u64_rem(denom, prime_numbers[i], &denom_remainder); 2129 denom = denom_result; 2134 *denominator = denom;
|
/linux-master/sound/soc/codecs/ |
H A D | wcd938x.c | 2136 int32_t denom; local 2163 denom = (x1 * d1) - (1 << (14 - noff)); 2164 if (denom > 0) 2165 *zdet = (WCD938X_MBHC_ZDET_CONST * 1000) / denom;
|
H A D | wcd939x.c | 2063 s32 x1, d1, denom; local 2096 denom = (x1 * d1) - (1 << (14 - zdet_param->noff)); 2097 if (denom > 0) 2098 *zdet = (WCD939X_ANA_MBHC_ZDET_CONST * 1000) / denom;
|
H A D | wcd934x.c | 2652 int32_t denom; local 2679 denom = (x1 * d1) - (1 << (14 - noff)); 2680 if (denom > 0) 2681 *zdet = (WCD934X_MBHC_ZDET_CONST * 1000) / denom;
|
/linux-master/drivers/hid/ |
H A D | wacom_wac.c | 1859 int value, int num, int denom) 1864 value += num*range/denom; 1858 wacom_offset_rotation(struct input_dev *input, struct hid_usage *usage, int value, int num, int denom) argument
|