| /linux/drivers/clk/mmp/ |
| H A D | clk-frac.c | 19 * numerator/denominator = Fin / (Fout * factor) 37 do_div(rate, d->numerator * factor->masks->factor); in clk_factor_determine_rate() 63 /* calculate numerator */ in clk_factor_recalc_rate() 64 d.numerator = (val >> masks->num_shift) & masks->num_mask; in clk_factor_recalc_rate() 72 do_div(rate, d.numerator * factor->masks->factor); in clk_factor_recalc_rate() 93 do_div(rate, d->numerator * factor->masks->factor); in clk_factor_set_rate() 105 val |= (d->numerator & masks->num_mask) << masks->num_shift; in clk_factor_set_rate() 132 /* calculate numerator */ in clk_factor_init() 133 d.numerator = (val >> masks->num_shift) & masks->num_mask; in clk_factor_init() 140 d.numerator in clk_factor_init() [all...] |
| H A D | clk-of-mmp2.c | 147 { .numerator = 8125, .denominator = 1536 }, /* 14.745MHZ */ 148 { .numerator = 3521, .denominator = 689 }, /* 19.23MHZ */ 161 { .numerator = 24868, .denominator = 511 }, /* 2.0480 MHz */ 162 { .numerator = 28003, .denominator = 793 }, /* 2.8224 MHz */ 163 { .numerator = 24941, .denominator = 1025 }, /* 4.0960 MHz */ 164 { .numerator = 28003, .denominator = 1586 }, /* 5.6448 MHz */ 165 { .numerator = 31158, .denominator = 2561 }, /* 8.1920 MHz */ 166 { .numerator = 16288, .denominator = 1845 }, /* 11.2896 MHz */ 167 { .numerator = 20772, .denominator = 2561 }, /* 12.2880 MHz */ 168 { .numerator = 8144, .denominator = 1845 }, /* 22.5792 MHz */ [all …]
|
| /linux/drivers/iio/afe/ |
| H A D | iio-rescale.c | 32 *val *= rescale->numerator; in rescale_process_scale() 43 if (!check_mul_overflow(*val, rescale->numerator, &_val) && in rescale_process_scale() 53 tmp *= rescale->numerator; in rescale_process_scale() 85 tmp = (s64)abs(*val) * abs(rescale->numerator); in rescale_process_scale() 88 tmp = (s64)rem * mult + (s64)abs(*val2) * abs(rescale->numerator); in rescale_process_scale() 97 if (neg ^ ((rescale->numerator < 0) ^ (rescale->denominator < 0))) { in rescale_process_scale() 344 * numerator/denominator from overflowing. in rescale_current_sense_amplifier_props() 347 rescale->numerator = 1000000 / factor; in rescale_current_sense_amplifier_props() 350 factor = gcd(rescale->numerator, gain_mult); in rescale_current_sense_amplifier_props() 351 rescale->numerator / in rescale_current_sense_amplifier_props() [all...] |
| /linux/include/trace/events/ |
| H A D | kyber.h | 17 unsigned int percentile, unsigned int numerator, 20 TP_ARGS(dev, domain, type, percentile, numerator, denominator, samples), 27 __field( u8, numerator ) 37 __entry->numerator = numerator; 44 __entry->type, __entry->percentile, __entry->numerator,
|
| /linux/drivers/iio/adc/ |
| H A D | qcom-vadc-common.c | 293 { .numerator = 1, .denominator = 1 }, 294 { .numerator = 1, .denominator = 3 }, 295 { .numerator = 1, .denominator = 4 }, 296 { .numerator = 1, .denominator = 6 }, 297 { .numerator = 1, .denominator = 20 }, 298 { .numerator = 1, .denominator = 8 }, 299 { .numerator = 10, .denominator = 81 }, 300 { .numerator = 1, .denominator = 10 }, 301 { .numerator = 1, .denominator = 16 }, 418 result = div64_s64(voltage, prescale->numerator); in qcom_vadc_scale_volt() [all …]
|
| H A D | qcom-spmi-vadc.c | 128 { .numerator = 1, .denominator = 1 }, 129 { .numerator = 1, .denominator = 3 }, 130 { .numerator = 1, .denominator = 4 }, 131 { .numerator = 1, .denominator = 6 }, 132 { .numerator = 1, .denominator = 20 }, 133 { .numerator = 1, .denominator = 8 }, 134 { .numerator = 10, .denominator = 81 }, 135 { .numerator = 1, .denominator = 10 }, 409 static int vadc_prescaling_from_dt(u32 numerator, u32 denominator) in vadc_prescaling_from_dt() argument 414 if (vadc_prescale_ratios[pre].numerator in vadc_prescaling_from_dt() [all...] |
| /linux/drivers/clk/ |
| H A D | clk-fractional-divider_test.c | 40 * Test the maximum numerator case for fd clock without flags. 42 * Expect the highest possible numerator to be used in order to get as close as possible to the 58 parent_rate = rate / (max_m + 1); /* so that it exceeds the maximum numerator */ in clk_fd_test_approximation_max_numerator() 99 * Test the maximum numerator case for zero based fd clock. 101 * Expect the highest possible numerator to be used in order to get as close as possible to the 118 parent_rate = rate / (max_m + 1); /* so that it exceeds the maximum numerator */ in clk_fd_test_approximation_max_numerator_zero_based()
|
| H A D | clk-fractional-divider.c | 13 * m (numerator) and n (denominator) values to be provided to satisfy 100 fract->numerator = m; in clk_fd_get_div() 111 if (!fract.numerator || !fract.denominator) in clk_fd_recalc_rate() 114 ret = (u64)parent_rate * fract.numerator; in clk_fd_recalc_rate() 233 *val = fract.numerator; in clk_fd_numerator_get() 253 debugfs_create_file("numerator", 0444, dentry, hw, &clk_fd_numerator_fops); in clk_fd_debug_init()
|
| /linux/lib/ |
| H A D | flex_proportions.c | 22 * (let's call it 'd') and for each event type its numerator (let's call it 31 * To avoid iteration over all event types, we instead shift numerator of event 150 unsigned long *numerator, unsigned long *denominator) in fprop_fraction_percpu() argument 173 *numerator = num; in fprop_fraction_percpu() 184 unsigned long numerator, denominator; in __fprop_add_percpu_max() local 187 fprop_fraction_percpu(p, pl, &numerator, &denominator); in __fprop_add_percpu_max() 190 ((u64)numerator << FPROP_FRAC_SHIFT); in __fprop_add_percpu_max()
|
| /linux/lib/crypto/mpi/ |
| H A D | mpi-div.c | 94 * numerator and quotient are the same. in mpi_tdiv_qr() 135 * numerator would be gradually overwritten by the quotient limbs. in mpi_tdiv_qr() 150 * numerator the same number of steps (to keep the quotient the same!). in mpi_tdiv_qr() 166 /* Shift up the numerator, possibly introducing a new most in mpi_tdiv_qr() 167 * significant word. Move the shifted numerator in the remainder in mpi_tdiv_qr() 190 /* Move the numerator to the remainder. */ in mpi_tdiv_qr()
|
| /linux/drivers/media/v4l2-core/ |
| H A D | v4l2-dv-timings.c | 369 bt->picture_aspect.numerator, in v4l2_print_dv_timings() 388 ratio.numerator = t->bt.width * t->bt.picture_aspect.denominator; in v4l2_dv_timings_aspect_ratio() 389 ratio.denominator = t->bt.height * t->bt.picture_aspect.numerator; in v4l2_dv_timings_aspect_ratio() 391 rational_best_approximation(ratio.numerator, ratio.denominator, in v4l2_dv_timings_aspect_ratio() 392 ratio.numerator, ratio.denominator, &n, &d); in v4l2_dv_timings_aspect_ratio() 393 ratio.numerator = n; in v4l2_dv_timings_aspect_ratio() 432 fps_fract.numerator = d; in v4l2_calc_timeperframe() 755 if (aspect.numerator == 0 || aspect.denominator == 0) { in v4l2_detect_gtf() 756 aspect.numerator = 16; in v4l2_detect_gtf() 759 image_width = ((image_height * aspect.numerator) / aspect.denominator); in v4l2_detect_gtf() [all …]
|
| /linux/drivers/phy/freescale/ |
| H A D | phy-fsl-imx8-mipi-dphy.c | 192 u32 lp_t, numerator, denominator; in mixel_dphy_config_from_opts() local 201 numerator = dphy_opts->hs_clk_rate; in mixel_dphy_config_from_opts() 203 get_best_ratio(&numerator, &denominator, 255, 256); in mixel_dphy_config_from_opts() 204 if (!numerator || !denominator) { in mixel_dphy_config_from_opts() 206 numerator, denominator, in mixel_dphy_config_from_opts() 211 while ((numerator < 16) && (denominator <= 128)) { in mixel_dphy_config_from_opts() 212 numerator <<= 1; in mixel_dphy_config_from_opts() 225 cfg->cm = numerator; in mixel_dphy_config_from_opts() 234 numerator, denominator); in mixel_dphy_config_from_opts() 239 dphy_opts->hs_clk_rate, ref_clk, numerator, denominato in mixel_dphy_config_from_opts() [all...] |
| /linux/include/video/ |
| H A D | cirrus.h | 41 #define CL_SEQRB 0xb /* VCLK0 Numerator */ 42 #define CL_SEQRC 0xc /* VCLK1 Numerator */ 43 #define CL_SEQRD 0xd /* VCLK2 Numerator */ 44 #define CL_SEQRE 0xe /* VCLK3 Numerator */
|
| /linux/drivers/gpu/drm/amd/display/dc/basics/ |
| H A D | bw_fixed.c | 58 struct bw_fixed bw_frc_to_fixed(int64_t numerator, int64_t denominator) in bw_frc_to_fixed() argument 61 bool arg1_negative = numerator < 0; in bw_frc_to_fixed() 72 arg1_value = abs_i64(numerator); in bw_frc_to_fixed()
|
| /linux/drivers/media/pci/mgb4/ |
| H A D | mgb4_io.h | 21 #define MGB4_PERIOD(numerator, denominator) \ argument 22 ((u32)div_u64((MGB4_HW_FREQ * (u64)(numerator)), (denominator)))
|
| /linux/include/linux/ |
| H A D | flex_proportions.h | 49 raw_spinlock_t lock; /* Protect period and numerator */ 59 struct fprop_local_percpu *pl, unsigned long *numerator,
|
| /linux/drivers/thermal/renesas/ |
| H A D | rzg3e_thermal.c | 181 s64 numerator, denominator; in rzg3e_thermal_code_to_temp() 184 numerator = (info->temp_e_mc - info->temp_d_mc) * in rzg3e_thermal_code_to_temp() 188 temp_mc = div64_s64(numerator, denominator) + info->temp_d_mc; 200 s64 numerator, denominator; in rzg3e_thermal_temp_to_code() 208 numerator = ((s64)temp_mc - info->temp_d_mc) * (priv->trmval1 - priv->trmval0); in rzg3e_thermal_get_temp() 211 code = div64_s64(numerator, denominator) + priv->trmval0; in rzg3e_thermal_get_temp() 175 s64 numerator, denominator; rzg3e_thermal_code_to_temp() local 194 s64 numerator, denominator; rzg3e_thermal_temp_to_code() local
|
| /linux/drivers/staging/sm750fb/ |
| H A D | sm750.h | 174 unsigned long long numerator = 1000 * 1000 * 1000 * 1000ULL; in ps_to_hz() local 176 do_div(numerator, psvalue); in ps_to_hz() 177 return (unsigned long)numerator; in ps_to_hz()
|
| /linux/drivers/usb/gadget/function/ |
| H A D | uvc_v4l2.c | 340 timeperframe.numerator = video->interval; in uvc_v4l2_g_parm() 342 v4l2_simplify_fraction(&timeperframe.numerator, in uvc_v4l2_g_parm() 346 timeperframe.numerator, timeperframe.denominator, in uvc_v4l2_g_parm() 368 video->interval = v4l2_fraction_to_interval(timeperframe.numerator, in uvc_v4l2_s_parm() 372 timeperframe.numerator, timeperframe.denominator, in uvc_v4l2_s_parm() 405 fival->discrete.numerator = in uvc_v4l2_enum_frameintervals() 411 v4l2_simplify_fraction(&fival->discrete.numerator, in uvc_v4l2_enum_frameintervals()
|
| /linux/drivers/clk/sophgo/ |
| H A D | clk-sg2044-pll.c | 120 u64 numerator = parent_rate * fbdiv; in sg2044_pll_calc_vco_rate() local 122 return div64_ul(numerator, refdiv); in sg2044_pll_calc_vco_rate() 131 u64 numerator, denominator; in sg2044_pll_calc_rate() local 133 numerator = parent_rate * fbdiv; in sg2044_pll_calc_rate() 136 return div64_u64(numerator, denominator); in sg2044_pll_calc_rate()
|
| H A D | clk-sg2042-pll.c | 152 u64 numerator, denominator; in sg2042_pll_recalc_rate() local 156 numerator = (u64)parent_rate * ctrl_table.fbdiv; in sg2042_pll_recalc_rate() 158 numerator = div64_u64(numerator, denominator); in sg2042_pll_recalc_rate() 159 return numerator; in sg2042_pll_recalc_rate()
|
| /linux/drivers/clk/socfpga/ |
| H A D | clk-pll-s10.c | 47 /* read VCO1 reg for numerator and denominator */ in n5x_clk_pll_recalc_rate() 68 /* read VCO1 reg for numerator and denominator */ in agilex_clk_pll_recalc_rate() 91 /* read VCO1 reg for numerator and denominator */ in clk_pll_recalc_rate()
|
| /linux/drivers/media/platform/chips-media/coda/ |
| H A D | coda-common.c | 1345 f->stepwise.min.numerator = 1; in coda_enum_frameintervals() 1347 f->stepwise.max.numerator = 65536; in coda_enum_frameintervals() 1349 f->stepwise.step.numerator = 1; in coda_enum_frameintervals() 1366 tpf->numerator = 1 + (ctx->params.framerate >> in coda_g_parm() 1385 if (s.numerator == 0 || s.denominator / s.numerator > 65535) { in coda_approximate_timeperframe() 1386 timeperframe->numerator = 1; in coda_approximate_timeperframe() 1392 if (s.denominator == 0 || s.numerator / s.denominator > 65536) { in coda_approximate_timeperframe() 1393 timeperframe->numerator = 65536; in coda_approximate_timeperframe() 1399 div = gcd(s.numerator, in coda_approximate_timeperframe() [all...] |
| /linux/arch/arm/mach-omap2/ |
| H A D | timer.c | 109 /* Numerator/denumerator values refer TRM Realtime Counter section */ in realtime_counter_init() 144 /* Program numerator and denumerator registers */ in realtime_counter_init()
|
| /linux/drivers/net/wireless/broadcom/b43/ |
| H A D | phy_n.h | 145 #define B43_NPHY_RXF20_NUM0 B43_PHY_N(0x049) /* RX filter 20 numerator 0 */ 146 #define B43_NPHY_RXF20_NUM1 B43_PHY_N(0x04A) /* RX filter 20 numerator 1 */ 147 #define B43_NPHY_RXF20_NUM2 B43_PHY_N(0x04B) /* RX filter 20 numerator 2 */ 150 #define B43_NPHY_RXF20_NUM10 B43_PHY_N(0x04E) /* RX filter 20 numerator 10 */ 151 #define B43_NPHY_RXF20_NUM11 B43_PHY_N(0x04F) /* RX filter 20 numerator 11 */ 152 #define B43_NPHY_RXF20_NUM12 B43_PHY_N(0x050) /* RX filter 20 numerator 12 */ 155 #define B43_NPHY_RXF40_NUM0 B43_PHY_N(0x053) /* RX filter 40 numerator 0 */ 156 #define B43_NPHY_RXF40_NUM1 B43_PHY_N(0x054) /* RX filter 40 numerator 1 */ 157 #define B43_NPHY_RXF40_NUM2 B43_PHY_N(0x055) /* RX filter 40 numerator 2 */ 160 #define B43_NPHY_RXF40_NUM10 B43_PHY_N(0x058) /* RX filter 40 numerator 10 */ [all …]
|