/linux/drivers/iio/test/ |
H A D | iio-test-rescale.c | 20 const s32 denominator; member 39 .denominator = 8060, 47 .denominator = 8060, 55 .denominator = 8060, 64 .denominator = 8060, 73 .denominator = 53, 82 .denominator = 53, 91 .denominator = 8060, 100 .denominator = 8060, 109 .denominator = 8060, [all …]
|
/linux/drivers/clk/mmp/ |
H A D | clk-frac.c | 19 * numerator/denominator = Fin / (Fout * factor) 36 rate = (u64)(*prate) * d->denominator; in clk_factor_round_rate() 65 /* calculate denominator */ in clk_factor_recalc_rate() 66 d.denominator = (val >> masks->den_shift) & masks->den_mask; in clk_factor_recalc_rate() 67 if (!d.denominator) in clk_factor_recalc_rate() 70 rate = (u64)parent_rate * d.denominator; in clk_factor_recalc_rate() 91 rate = (u64)prate * d->denominator; in clk_factor_set_rate() 107 val |= (d->denominator & masks->den_mask) << masks->den_shift; in clk_factor_set_rate() 134 /* calculate denominator */ in clk_factor_init() 135 d.denominator = (val >> masks->den_shift) & masks->den_mask; 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 | 34 if (rescale->denominator == 1) in rescale_process_scale() 36 *val2 = rescale->denominator; in rescale_process_scale() 45 !check_mul_overflow(*val2, rescale->denominator, &_val2)) { in rescale_process_scale() 53 tmp = div_s64(tmp, rescale->denominator); in rescale_process_scale() 87 *val = div_s64_rem(tmp, abs(rescale->denominator), &rem); in rescale_process_scale() 90 tmp = div_s64(tmp, abs(rescale->denominator)); in rescale_process_scale() 98 if (neg ^ ((rescale->numerator < 0) ^ (rescale->denominator < 0))) { in rescale_process_scale() 344 * numerator/denominator from overflowing. in rescale_current_sense_amplifier_props() 348 rescale->denominator = sense / factor; in rescale_current_sense_amplifier_props() 352 rescale->denominator *= gain_mult / factor; in rescale_current_sense_amplifier_props() [all …]
|
/linux/include/trace/events/ |
H A D | kyber.h | 18 unsigned int denominator, unsigned int samples), 20 TP_ARGS(dev, domain, type, percentile, numerator, denominator, samples), 28 __field( u8, denominator ) 38 __entry->denominator = denominator; 45 __entry->denominator, __entry->samples)
|
/linux/drivers/media/platform/qcom/camss/ |
H A D | camss-format.h | 17 .hsub[(plane)].denominator = (h_fract_den), \ 19 .vsub[(plane)].denominator = (v_fract_den), \ 25 * @denominator: Store the denominator part of the fraction 29 u8 denominator; member
|
/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 }, 417 voltage *= prescale->denominator; in qcom_vadc_scale_volt() [all …]
|
/linux/lib/ |
H A D | flex_proportions.c | 21 * This formula can be straightforwardly computed by maintaining denominator 149 unsigned long *numerator, unsigned long *denominator) in fprop_fraction_percpu() argument 162 * Make fraction <= 1 and denominator > 0 even in presence of percpu in fprop_fraction_percpu() 171 *denominator = den; in fprop_fraction_percpu() 183 unsigned long numerator, denominator; in __fprop_add_percpu_max() local 186 fprop_fraction_percpu(p, pl, &numerator, &denominator); in __fprop_add_percpu_max() 188 tmp = (u64)denominator * max_frac - in __fprop_add_percpu_max()
|
/linux/drivers/media/test-drivers/vivid/ |
H A D | vivid-kthread-touch.c | 54 unsigned int denominator; in vivid_thread_touch_cap() local 87 denominator = dev->timeperframe_tch_cap.denominator; in vivid_thread_touch_cap() 93 buffers_since_start = (u64)jiffies_since_start * denominator + in vivid_thread_touch_cap() 131 denominator / 2; in vivid_thread_touch_cap() 132 do_div(next_jiffies_since_start, denominator); in vivid_thread_touch_cap()
|
H A D | vivid-kthread-out.c | 150 unsigned denominator; in vivid_thread_vid_out() local 184 denominator = dev->timeperframe_vid_out.denominator; in vivid_thread_vid_out() 187 denominator *= 2; in vivid_thread_vid_out() 192 buffers_since_start = (u64)jiffies_since_start * denominator + in vivid_thread_vid_out() 231 denominator / 2; in vivid_thread_vid_out() 232 do_div(next_jiffies_since_start, denominator); in vivid_thread_vid_out()
|
H A D | vivid-kthread-cap.c | 565 if (WARN_ON(dev->timeperframe_vid_cap.denominator == 0)) in vivid_cap_update_frame_period() 566 dev->timeperframe_vid_cap.denominator = 1; in vivid_cap_update_frame_period() 567 do_div(f_period, dev->timeperframe_vid_cap.denominator); in vivid_cap_update_frame_period() 698 unsigned denominator; in vivid_thread_vid_cap() local 738 denominator = dev->timeperframe_vid_cap.denominator; in vivid_thread_vid_cap() 741 denominator *= 2; in vivid_thread_vid_cap() 746 buffers_since_start = (u64)jiffies_since_start * denominator + in vivid_thread_vid_cap() 785 denominator / 2; in vivid_thread_vid_cap() 786 do_div(next_jiffies_since_start, denominator); in vivid_thread_vid_cap()
|
/linux/drivers/clk/ |
H A D | clk-fractional-divider.c | 13 * m (numerator) and n (denominator) values to be provided to satisfy 36 * we get the denominator to satisfy the desired range (2) and 101 fract->denominator = n; in clk_fd_get_div() 111 if (!fract.numerator || !fract.denominator) in clk_fd_recalc_rate() 115 do_div(ret, fract.denominator); in clk_fd_recalc_rate() 238 *val = fract.denominator; in clk_fd_denominator_get() 247 debugfs_create_file("denominator", 0444, dentry, hw, &clk_fd_denominator_fops); in clk_fd_debug_init()
|
H A D | clk-fractional-divider_test.c | 11 * Test the maximum denominator case for fd clock without flags. 13 * Expect the highest possible denominator to be used in order to get as close as possible to the 69 * Test the maximum denominator case for zero based fd clock. 71 * Expect the highest possible denominator to be used in order to get as close as possible to the
|
/linux/drivers/media/i2c/ |
H A D | mt9v011.c | 199 static void calc_fps(struct v4l2_subdev *sd, u32 *numerator, u32 *denominator) in calc_fps() argument 223 if (numerator && denominator) { in calc_fps() 225 *denominator = (u32)frames_per_ms; in calc_fps() 229 static u16 calc_speed(struct v4l2_subdev *sd, u32 numerator, u32 denominator) in calc_speed() argument 237 if (!numerator || !denominator) in calc_speed() 250 t_time += denominator / 2; in calc_speed() 251 do_div(t_time, denominator); in calc_speed() 378 &ival->interval.denominator); in mt9v011_get_frame_interval() 397 speed = calc_speed(sd, tpf->numerator, tpf->denominator); in mt9v011_set_frame_interval() 403 calc_fps(sd, &tpf->numerator, &tpf->denominator); in mt9v011_set_frame_interval()
|
/linux/drivers/phy/freescale/ |
H A D | phy-fsl-imx8-mipi-dphy.c | 157 * nominator, denominator. 192 u32 lp_t, numerator, denominator; in mixel_dphy_config_from_opts() local 202 denominator = ref_clk; 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() 213 denominator <<= 1; in mixel_dphy_config_from_opts() 220 i = __ffs(denominator); in mixel_dphy_config_from_opts() 223 cfg->cn = denominator >> i; in mixel_dphy_config_from_opts() [all …]
|
/linux/drivers/media/i2c/et8ek8/ |
H A D | et8ek8_mode.c | 50 .denominator = 1207 151 .denominator = 1292 207 .denominator = 3000 263 .denominator = 2988 319 .denominator = 2993 375 .denominator = 399 430 .denominator = 499 486 .denominator = 501 542 .denominator = 2500
|
/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 62 bool arg2_negative = denominator < 0; in bw_frc_to_fixed() 70 ASSERT(denominator != 0); in bw_frc_to_fixed() 73 arg2_value = abs_i64(denominator); in bw_frc_to_fixed()
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_pll.c | 36 * @den: denominator 38 * @den_min: minimum value for denominator 41 * denominator, but make nominator and denominator are at least as large 61 /* make sure the denominator is large enough */ in amdgpu_pll_reduce_ratio() 74 * @den: denominator
|
/linux/include/video/ |
H A D | cirrus.h | 57 #define CL_SEQR1B 0x1b /* VCLK0 Denominator and Post-Scalar Value */ 58 #define CL_SEQR1C 0x1c /* VCLK1 Denominator and Post-Scalar Value */ 59 #define CL_SEQR1D 0x1d /* VCLK2 Denominator and Post-Scalar Value */ 60 #define CL_SEQR1E 0x1e /* VCLK3 Denominator and Post-Scalar Value */
|
/linux/lib/crypto/mpi/ |
H A D | mpi-div.c | 148 /* Normalize the denominator, i.e. make its most significant bit set by in mpi_tdiv_qr() 156 /* Shift up the denominator setting the most significant bit of in mpi_tdiv_qr() 158 * the original contents of the denominator. in mpi_tdiv_qr() 177 /* The denominator is already normalized, as required. Copy it to in mpi_tdiv_qr()
|
/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/drivers/media/usb/pvrusb2/ |
H A D | pvrusb2-std.c | 231 .denominator= 25 242 .denominator= 30000 251 .denominator= 30000 260 .denominator= 30000
|
/linux/drivers/gpu/drm/amd/display/dc/spl/ |
H A D | spl_fixpt31_32.c | 49 struct spl_fixed31_32 spl_fixpt_from_fraction(long long numerator, long long denominator) in spl_fixpt_from_fraction() argument 54 bool arg2_negative = denominator < 0; in spl_fixpt_from_fraction() 57 unsigned long long arg2_value = arg2_negative ? -denominator : denominator; in spl_fixpt_from_fraction()
|
/linux/drivers/media/platform/st/sti/delta/ |
H A D | delta-debug.c | 29 s->pixelaspect.denominator); in delta_streaminfo_str() 50 f->pixelaspect.denominator); in delta_frameinfo_str()
|
/linux/drivers/staging/vc04_services/bcm2835-camera/ |
H A D | controls.c | 163 rational_value.denominator = 100; in ctrl_set_rational() 493 gains.r_gain.denominator = 1000; in ctrl_set_awb_gains() 495 gains.b_gain.denominator = 1000; in ctrl_set_awb_gains() 1275 fps_range.fps_high.numerator = dev->capture.timeperframe.denominator; in set_framerate_params() 1276 fps_range.fps_high.denominator = dev->capture.timeperframe.numerator; in set_framerate_params() 1282 fps_range.fps_low.denominator = 1; in set_framerate_params() 1286 fps_range.fps_low.denominator = fps_range.fps_high.denominator; in set_framerate_params() 1292 fps_range.fps_low.denominator, in set_framerate_params() 1294 fps_range.fps_high.denominator); in set_framerate_params()
|