Home
last modified time | relevance | path

Searched refs:denominator (Results 1 – 25 of 174) sorted by relevance

1234567

/linux-6.12.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-6.12.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()
348 rescale->denominator = sense / factor; in rescale_current_sense_amplifier_props()
352 rescale->denominator *= gain_mult / factor; in rescale_current_sense_amplifier_props()
354 factor = gcd(rescale->denominator, gain_div); in rescale_current_sense_amplifier_props()
[all …]
/linux-6.12.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.c129 { .numerator = 1, .denominator = 1 },
130 { .numerator = 1, .denominator = 3 },
131 { .numerator = 1, .denominator = 4 },
132 { .numerator = 1, .denominator = 6 },
133 { .numerator = 1, .denominator = 20 },
134 { .numerator = 1, .denominator = 8 },
135 { .numerator = 10, .denominator = 81 },
136 { .numerator = 1, .denominator = 10 },
410 static int vadc_prescaling_from_dt(u32 numerator, u32 denominator) in vadc_prescaling_from_dt() argument
416 vadc_prescale_ratios[pre].denominator == denominator) in vadc_prescaling_from_dt()
/linux-6.12.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-6.12.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-6.12.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-6.12.1/lib/
Dflex_proportions.c149 unsigned long *numerator, unsigned long *denominator) in fprop_fraction_percpu() argument
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-6.12.1/drivers/media/platform/qcom/camss/
Dcamss-format.h17 .hsub[(plane)].denominator = (h_fract_den), \
19 .vsub[(plane)].denominator = (v_fract_den), \
29 u8 denominator; member
/linux-6.12.1/drivers/media/i2c/
Dmt9v011.c199 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()
Dimx274.c1346 imx274->frame_interval.denominator); in imx274_get_frame_interval()
1383 / fi->interval.denominator; in imx274_set_frame_interval()
1397 / fi->interval.denominator); in imx274_set_frame_interval()
1417 priv->frame_interval.denominator = IMX274_DEF_FRAME_RATE; in imx274_load_default()
1850 frame_interval.denominator); in __imx274_set_frame_interval()
1852 if (frame_interval.numerator == 0 || frame_interval.denominator == 0) { in __imx274_set_frame_interval()
1853 frame_interval.denominator = IMX274_DEF_FRAME_RATE; in __imx274_set_frame_interval()
1857 req_frame_rate = (u32)(frame_interval.denominator in __imx274_set_frame_interval()
1863 frame_interval.denominator = priv->mode->max_fps; in __imx274_set_frame_interval()
1866 frame_interval.denominator = IMX274_MIN_FRAME_RATE; in __imx274_set_frame_interval()
[all …]
/linux-6.12.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 …]
/linux-6.12.1/drivers/gpu/drm/amd/display/dc/basics/
Dbw_fixed.c58 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()
Dfixpt31_32.c71 struct fixed31_32 dc_fixpt_from_fraction(long long numerator, long long denominator) in dc_fixpt_from_fraction() argument
76 bool arg2_negative = denominator < 0; in dc_fixpt_from_fraction()
79 unsigned long long arg2_value = arg2_negative ? -denominator : denominator; in dc_fixpt_from_fraction()
/linux-6.12.1/drivers/phy/freescale/
Dphy-fsl-imx8-mipi-dphy.c192 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()
234 numerator, denominator); in mixel_dphy_config_from_opts()
[all …]
/linux-6.12.1/drivers/media/pci/mgb4/
Dmgb4_io.h21 #define MGB4_PERIOD(numerator, denominator) \ argument
22 ((u32)div_u64((MGB4_HW_FREQ * (u64)(numerator)), (denominator)))
/linux-6.12.1/drivers/media/usb/uvc/
Duvc_v4l2.c432 u32 numerator, denominator; in uvc_v4l2_get_streamparm() local
441 denominator = 10000000; in uvc_v4l2_get_streamparm()
442 v4l2_simplify_fraction(&numerator, &denominator, 8, 333); in uvc_v4l2_get_streamparm()
451 parm->parm.capture.timeperframe.denominator = denominator; in uvc_v4l2_get_streamparm()
458 parm->parm.output.timeperframe.denominator = denominator; in uvc_v4l2_get_streamparm()
484 timeperframe.denominator); in uvc_v4l2_set_streamparm()
486 timeperframe.numerator, timeperframe.denominator, interval); in uvc_v4l2_set_streamparm()
536 timeperframe.denominator = 10000000; in uvc_v4l2_set_streamparm()
538 &timeperframe.denominator, 8, 333); in uvc_v4l2_set_streamparm()
1327 fival->discrete.denominator = 10000000; in uvc_ioctl_enum_frameintervals()
[all …]
/linux-6.12.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-6.12.1/drivers/staging/media/atomisp/pci/
Dsh_css_param_shading.c271 bds.numerator / bds.denominator - in prepare_shading_table()
274 binary->effective_in_frame_res.width * bds.denominator / in prepare_shading_table()
275 bds.numerator - left_cropping) * bds.numerator / bds.denominator; in prepare_shading_table()
277 bds.denominator - in prepare_shading_table()
/linux-6.12.1/drivers/clk/
Dclk-fractional-divider.c101 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()
/linux-6.12.1/drivers/media/usb/pvrusb2/
Dpvrusb2-std.c231 .denominator= 25
242 .denominator= 30000
251 .denominator= 30000
260 .denominator= 30000
/linux-6.12.1/drivers/media/platform/amphion/
Dvenc.c167 fival->stepwise.min.denominator = USHRT_MAX; in venc_enum_frameintervals()
169 fival->stepwise.max.denominator = 1; in venc_enum_frameintervals()
171 fival->stepwise.step.denominator = 1; in venc_enum_frameintervals()
286 timeperframe->denominator = venc->params.frame_rate.denominator; in venc_g_parm()
310 if (!timeperframe->denominator) in venc_s_parm()
311 timeperframe->denominator = venc->params.frame_rate.denominator; in venc_s_parm()
314 venc->params.frame_rate.denominator = timeperframe->denominator; in venc_s_parm()
317 venc->params.frame_rate.denominator, in venc_s_parm()
319 venc->params.frame_rate.denominator, in venc_s_parm()
322 venc->params.frame_rate.denominator = d; in venc_s_parm()
[all …]
/linux-6.12.1/drivers/gpu/drm/amd/display/dc/spl/
Dspl_fixpt31_32.c49 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-6.12.1/include/media/
Dv4l2-common.h454 ((u64)(a).numerator * (b).denominator OP \
455 (u64)(b).numerator * (a).denominator)
547 void v4l2_simplify_fraction(u32 *numerator, u32 *denominator,
549 u32 v4l2_fraction_to_interval(u32 numerator, u32 denominator);

1234567