Home
last modified time | relevance | path

Searched full:denominator (Results 1 – 25 of 278) sorted by relevance

12345678910>>...12

/Linux-v6.1/drivers/iio/test/
Diio-test-rescale.c20 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-v6.1/drivers/iio/afe/
Diio-rescale.c34 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()
333 * numerator/denominator from overflowing. in rescale_current_sense_amplifier_props()
337 rescale->denominator = sense / factor; in rescale_current_sense_amplifier_props()
341 rescale->denominator *= gain_mult / factor; in rescale_current_sense_amplifier_props()
[all …]
/Linux-v6.1/include/trace/events/
Dkyber.h18 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-v6.1/lib/
Dflex_proportions.c21 * This formula can be straightforwardly computed by maintaining denominator
137 unsigned long *numerator, unsigned long *denominator) in fprop_fraction_single() argument
150 * Make fraction <= 1 and denominator > 0 even in presence of percpu in fprop_fraction_single()
159 *denominator = den; in fprop_fraction_single()
226 unsigned long *numerator, unsigned long *denominator) in fprop_fraction_percpu() argument
239 * Make fraction <= 1 and denominator > 0 even in presence of percpu in fprop_fraction_percpu()
248 *denominator = den; in fprop_fraction_percpu()
260 unsigned long numerator, denominator; in __fprop_add_percpu_max() local
263 fprop_fraction_percpu(p, pl, &numerator, &denominator); in __fprop_add_percpu_max()
265 tmp = (u64)denominator * max_frac - in __fprop_add_percpu_max()
/Linux-v6.1/drivers/iio/adc/
Dqcom-vadc-common.c293 { .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 …]
Dqcom-spmi-vadc.c127 { .numerator = 1, .denominator = 1 },
128 { .numerator = 1, .denominator = 3 },
129 { .numerator = 1, .denominator = 4 },
130 { .numerator = 1, .denominator = 6 },
131 { .numerator = 1, .denominator = 20 },
132 { .numerator = 1, .denominator = 8 },
133 { .numerator = 10, .denominator = 81 },
134 { .numerator = 1, .denominator = 10 },
408 static int vadc_prescaling_from_dt(u32 numerator, u32 denominator) in vadc_prescaling_from_dt() argument
414 vadc_prescale_ratios[pre].denominator == denominator) in vadc_prescaling_from_dt()
/Linux-v6.1/drivers/media/test-drivers/vivid/
Dvivid-kthread-touch.c54 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()
Dvivid-kthread-out.c150 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()
/Linux-v6.1/drivers/media/i2c/
Dmt9v011.c201 static void calc_fps(struct v4l2_subdev *sd, u32 *numerator, u32 *denominator) in calc_fps() argument
225 if (numerator && denominator) { in calc_fps()
227 *denominator = (u32)frames_per_ms; in calc_fps()
231 static u16 calc_speed(struct v4l2_subdev *sd, u32 numerator, u32 denominator) in calc_speed() argument
239 if (!numerator || !denominator) in calc_speed()
252 t_time += denominator / 2; in calc_speed()
253 do_div(t_time, denominator); in calc_speed()
372 &ival->interval.denominator); in mt9v011_g_frame_interval()
383 speed = calc_speed(sd, tpf->numerator, tpf->denominator); in mt9v011_s_frame_interval()
389 calc_fps(sd, &tpf->numerator, &tpf->denominator); in mt9v011_s_frame_interval()
Dvs6624.c657 ival->interval.numerator = sensor->frame_rate.denominator; in vs6624_g_frame_interval()
658 ival->interval.denominator = sensor->frame_rate.numerator; in vs6624_g_frame_interval()
669 if (tpf->numerator == 0 || tpf->denominator == 0 in vs6624_s_frame_interval()
670 || (tpf->denominator > tpf->numerator * MAX_FRAME_RATE)) { in vs6624_s_frame_interval()
673 tpf->denominator = MAX_FRAME_RATE; in vs6624_s_frame_interval()
675 sensor->frame_rate.numerator = tpf->denominator; in vs6624_s_frame_interval()
676 sensor->frame_rate.denominator = tpf->numerator; in vs6624_s_frame_interval()
683 sensor->frame_rate.denominator & 0xFF); in vs6624_s_frame_interval()
786 sensor->frame_rate.denominator = 1; in vs6624_probe()
793 sensor->frame_rate.denominator & 0xFF); in vs6624_probe()
/Linux-v6.1/drivers/phy/freescale/
Dphy-fsl-imx8-mipi-dphy.c157 * 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-v6.1/drivers/media/i2c/et8ek8/
Det8ek8_mode.c50 .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-v6.1/drivers/media/v4l2-core/
Dv4l2-dv-timings.c370 bt->picture_aspect.denominator); 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()
394 ratio.denominator = d; in v4l2_dv_timings_aspect_ratio()
433 fps_fract.denominator = n; in v4l2_calc_timeperframe()
746 if (aspect.numerator == 0 || aspect.denominator == 0) { in v4l2_detect_gtf()
748 aspect.denominator = 9; in v4l2_detect_gtf()
750 image_width = ((image_height * aspect.numerator) / aspect.denominator); in v4l2_detect_gtf()
[all …]
Dv4l2-common.c496 void v4l2_simplify_fraction(u32 *numerator, u32 *denominator, in v4l2_simplify_fraction() argument
514 y = *denominator; in v4l2_simplify_fraction()
540 *denominator = x; in v4l2_simplify_fraction()
547 * to compute numerator / denominator * 10000000 using 32 bit fixed point
550 u32 v4l2_fraction_to_interval(u32 numerator, u32 denominator) in v4l2_fraction_to_interval() argument
555 if (denominator == 0 || in v4l2_fraction_to_interval()
556 numerator/denominator >= ((u32)-1)/10000000) in v4l2_fraction_to_interval()
560 * Divide both the denominator and the multiplier by two until in v4l2_fraction_to_interval()
567 denominator /= 2; in v4l2_fraction_to_interval()
570 return denominator ? numerator * multiplier / denominator : 0; in v4l2_fraction_to_interval()
/Linux-v6.1/drivers/gpu/drm/amd/display/dc/dml/calcs/
Dbw_fixed.c57 struct bw_fixed bw_frc_to_fixed(int64_t numerator, int64_t denominator) in bw_frc_to_fixed() argument
61 bool arg2_negative = denominator < 0; in bw_frc_to_fixed()
69 ASSERT(denominator != 0); in bw_frc_to_fixed()
72 arg2_value = abs_i64(denominator); in bw_frc_to_fixed()
/Linux-v6.1/drivers/gpu/drm/amd/amdgpu/
Damdgpu_pll.c36 * @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-v6.1/drivers/media/usb/uvc/
Duvc_v4l2.c379 u32 numerator, denominator; in uvc_v4l2_get_streamparm() local
388 denominator = 10000000; in uvc_v4l2_get_streamparm()
389 v4l2_simplify_fraction(&numerator, &denominator, 8, 333); in uvc_v4l2_get_streamparm()
398 parm->parm.capture.timeperframe.denominator = denominator; in uvc_v4l2_get_streamparm()
405 parm->parm.output.timeperframe.denominator = denominator; in uvc_v4l2_get_streamparm()
431 timeperframe.denominator); in uvc_v4l2_set_streamparm()
433 timeperframe.numerator, timeperframe.denominator, interval); in uvc_v4l2_set_streamparm()
483 timeperframe.denominator = 10000000; in uvc_v4l2_set_streamparm()
485 &timeperframe.denominator, 8, 333); in uvc_v4l2_set_streamparm()
1277 fival->discrete.denominator = 10000000; in uvc_ioctl_enum_frameintervals()
[all …]
/Linux-v6.1/include/video/
Dcirrus.h57 #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-v6.1/lib/mpi/
Dmpi-div.c162 /* Normalize the denominator, i.e. make its most significant bit set by in mpi_tdiv_qr()
170 /* Shift up the denominator setting the most significant bit of in mpi_tdiv_qr()
172 * the original contents of the denominator. in mpi_tdiv_qr()
189 /* The denominator is already normalized, as required. Copy it to in mpi_tdiv_qr()
/Linux-v6.1/drivers/media/platform/amphion/
Dvenc.c156 fival->stepwise.min.denominator = USHRT_MAX; in venc_enum_frameintervals()
158 fival->stepwise.max.denominator = 1; in venc_enum_frameintervals()
160 fival->stepwise.step.denominator = 1; in venc_enum_frameintervals()
295 timeperframe->denominator = venc->params.frame_rate.denominator; in venc_g_parm()
318 if (!timeperframe->denominator) in venc_s_parm()
319 timeperframe->denominator = venc->params.frame_rate.denominator; in venc_s_parm()
322 venc->params.frame_rate.denominator = timeperframe->denominator; in venc_s_parm()
325 venc->params.frame_rate.denominator, in venc_s_parm()
327 venc->params.frame_rate.denominator, in venc_s_parm()
330 venc->params.frame_rate.denominator = d; in venc_s_parm()
[all …]
/Linux-v6.1/drivers/clk/mmp/
Dclk-frac.c19 * numerator/denominator = Fin / (Fout * factor)
63 /* calculate denominator */ in clk_factor_recalc_rate()
133 /* calculate denominator */ in clk_factor_init()
/Linux-v6.1/include/linux/
Dflex_proportions.h61 unsigned long *denominator);
92 unsigned long *denominator);
/Linux-v6.1/drivers/media/platform/st/sti/delta/
Ddelta-debug.c29 s->pixelaspect.denominator); in delta_streaminfo_str()
50 f->pixelaspect.denominator); in delta_frameinfo_str()
/Linux-v6.1/drivers/media/usb/pvrusb2/
Dpvrusb2-std.c231 .denominator= 25
242 .denominator= 30000
251 .denominator= 30000
260 .denominator= 30000
/Linux-v6.1/arch/powerpc/include/asm/
Dsfp-machine.h26 denominator, which also happens to be the hardware I have :->
273 * denominator) divides a UDWtype, composed by the UWtype integers
274 * HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient
276 * than DENOMINATOR for correct operation. If, in addition, the most
277 * significant bit of DENOMINATOR must be 1, then the pre-processor symbol

12345678910>>...12