/openbmc/linux/drivers/clk/qcom/ |
H A D | clk-regmap-mux-div.c | 102 parent_rate = mult_frac(req_rate, div, 2); in mux_div_determine_rate() 104 actual_rate = mult_frac(parent_rate, 2, div); in mux_div_determine_rate() 139 parent_rate = mult_frac(rate, div, 2); in __mux_div_set_rate_and_parent() 141 actual_rate = mult_frac(parent_rate, 2, div); in __mux_div_set_rate_and_parent() 216 return mult_frac(parent_rate, 2, div + 1); in mux_div_recalc_rate()
|
/openbmc/linux/drivers/clk/imgtec/ |
H A D | clk-boston.c | 56 sys_freq = mult_frac(in_freq, mul, sys_div); in clk_boston_setup() 59 cpu_freq = mult_frac(in_freq, mul, cpu_div); in clk_boston_setup()
|
/openbmc/linux/drivers/gpu/drm/i915/gt/ |
H A D | intel_llc.c | 64 consts->min_ring_freq = mult_frac(consts->min_ring_freq, 8, 3); in get_ia_constants() 92 ring_freq = mult_frac(gpu_freq, 5, 4); in calc_ia_freq()
|
/openbmc/linux/lib/ |
H A D | polynomial.c | 99 tmp = mult_frac(tmp, data, term->divider); in polynomial_calc()
|
/openbmc/linux/drivers/power/supply/ |
H A D | ltc4162-l-charger.c | 254 val->intval = 100 * mult_frac(ret, 14660, (int)info->rsnsb); in ltc4162l_get_ibat() 312 val->intval = 10000u * mult_frac(regval, 100000u, info->rsnsb); in ltc4162l_get_icharge() 321 value = mult_frac(value, info->rsnsb, 100000u); in ltc4162l_set_icharge() 410 regval = mult_frac(value, info->rsnsi, 50000u); in ltc4162l_set_iin_limit() 481 regval = mult_frac(value, info->rsnsb, 14660u); in ltc4162l_set_term_current()
|
/openbmc/linux/drivers/gpu/drm/msm/dsi/phy/ |
H A D | dsi_phy.c | 67 ui = mult_frac(NSEC_PER_MSEC, coeff, bit_rate / 1000); in msm_dsi_dphy_timing_calc() 68 lpx = mult_frac(NSEC_PER_MSEC, coeff, esc_rate / 1000); in msm_dsi_dphy_timing_calc() 178 ui = mult_frac(NSEC_PER_MSEC, coeff, bit_rate / 1000); in msm_dsi_dphy_timing_calc_v2() 286 ui = mult_frac(NSEC_PER_MSEC, coeff, bit_rate / 1000); in msm_dsi_dphy_timing_calc_v3() 394 ui = mult_frac(NSEC_PER_MSEC, coeff, bit_rate / 1000); in msm_dsi_dphy_timing_calc_v4() 482 ui = mult_frac(NSEC_PER_MSEC, coeff, bit_rate / 1000); in msm_dsi_cphy_timing_calc_v4()
|
/openbmc/linux/drivers/thermal/ |
H A D | thermal-generic-adc.c | 50 temp = temp_hi + mult_frac(temp_lo - temp_hi, val - adc_hi, in gadc_thermal_adc_to_temp()
|
/openbmc/linux/include/linux/ |
H A D | math.h | 122 #define mult_frac(x, n, d) \ in __STRUCT_FRACT() macro
|
H A D | dcache.h | 504 return mult_frac(val, sysctl_vfs_cache_pressure, 100); in vfs_pressure_ratio()
|
/openbmc/linux/drivers/soc/qcom/ |
H A D | icc-bwmon.c | 556 thres = mult_frac(bwmon_kbps_to_count(bwmon, kbps), in bwmon_set_threshold() 572 window = mult_frac(bwmon->data->sample_ms, HW_TIMER_HZ, MSEC_PER_SEC); in bwmon_start() 638 bwmon->target_kbps = mult_frac(max, MSEC_PER_SEC, bwmon->data->sample_ms); in bwmon_intr()
|
/openbmc/linux/drivers/gpu/drm/msm/disp/mdp4/ |
H A D | mdp4_plane.c | 277 phasex_step = mult_frac(MDP4_VG_PHASE_STEP_DEFAULT, in mdp4_plane_mode_set() 294 phasey_step = mult_frac(MDP4_VG_PHASE_STEP_DEFAULT, in mdp4_plane_mode_set()
|
/openbmc/linux/drivers/firmware/arm_scmi/ |
H A D | scmi_power_control.c | 222 adj_timeout_ms = mult_frac(timeout_ms, 3, 4); in scmi_request_graceful_transition()
|
/openbmc/u-boot/include/linux/ |
H A D | kernel.h | 122 #define mult_frac(x, numer, denom)( \ macro
|
/openbmc/linux/drivers/clk/ |
H A D | clk-sparx5.c | 68 rate = mult_frac(rate, divt, divb); in s5_calc_freq()
|
H A D | clk-cdce925.c | 97 return mult_frac(parent_rate, (unsigned long)n, (unsigned long)m); in cdce925_pll_calculate_rate() 205 rate = mult_frac(rate, (unsigned long)n, (unsigned long)m); in cdce925_pll_calc_range_bits()
|
/openbmc/linux/drivers/clk/at91/ |
H A D | clk-sam9x60-pll.c | 204 nmul = mult_frac(rate, 1, parent_rate); in sam9x60_frac_pll_compute_mul_frac() 205 tmprate = mult_frac(parent_rate, nmul, 1); in sam9x60_frac_pll_compute_mul_frac()
|
/openbmc/linux/drivers/devfreq/ |
H A D | governor_passive.c | 121 freq = dev_min + mult_frac(dev_max - dev_min, cpu_percent, 100); in get_target_freq_with_cpufreq()
|
/openbmc/linux/fs/ |
H A D | super.c | 216 dentries = mult_frac(sc->nr_to_scan, dentries, total_objects); in super_cache_scan() 217 inodes = mult_frac(sc->nr_to_scan, inodes, total_objects); in super_cache_scan() 218 fs_objects = mult_frac(sc->nr_to_scan, fs_objects, total_objects); in super_cache_scan()
|
/openbmc/linux/drivers/gpu/drm/msm/disp/dpu1/ |
H A D | dpu_plane.c | 138 mult_frac(src_height, 1, dst_height) : 1; in _dpu_plane_calc_bw() 413 mult_frac((1 << PHASE_STEP_SHIFT), src_w, dst_w); in _dpu_plane_setup_scaler3() 415 mult_frac((1 << PHASE_STEP_SHIFT), src_h, dst_h); in _dpu_plane_setup_scaler3()
|
/openbmc/linux/drivers/gpu/drm/msm/dsi/ |
H A D | dsi_host.c | 540 return mult_frac(mode->clock * 1000u, new_htotal, mode->htotal); in dsi_adjust_pclk_for_compression() 581 pclk_bpp = mult_frac(pclk_rate, bpp, 16 * lanes); in dsi_byte_clk_get_rate() 583 pclk_bpp = mult_frac(pclk_rate, bpp, 8 * lanes); in dsi_byte_clk_get_rate() 619 msm_host->src_clk_rate = mult_frac(msm_host->pixel_clk_rate, bpp, 8); in dsi_calc_clk_rate_v2()
|
/openbmc/u-boot/drivers/mtd/ubi/ |
H A D | build.c | 624 limit = mult_frac(device_pebs, max_beb_per1024, 1024); in get_bad_peb_limit() 627 if (mult_frac(limit, 1024, max_beb_per1024) < device_pebs) in get_bad_peb_limit()
|
/openbmc/linux/drivers/mtd/ubi/ |
H A D | build.c | 569 limit = mult_frac(device_pebs, max_beb_per1024, 1024); in get_bad_peb_limit() 572 if (mult_frac(limit, 1024, max_beb_per1024) < device_pebs) in get_bad_peb_limit()
|
/openbmc/linux/drivers/base/ |
H A D | arch_topology.c | 198 capacity = mult_frac(max_capacity, capped_freq, max_freq); in topology_update_thermal_pressure()
|
/openbmc/linux/drivers/tty/serial/ |
H A D | vt8500_serial.c | 298 vt8500_write(port, mult_frac(baud, 4096, 1000000), VT8500_URBKR); in vt8500_set_baud_rate()
|
/openbmc/linux/drivers/hid/ |
H A D | hid-playstation.c | 1393 int calib_data = mult_frac(ds->gyro_calib_data[i].sens_numer, in dualsense_parse_report() 1402 int calib_data = mult_frac(ds->accel_calib_data[i].sens_numer, in dualsense_parse_report() 2248 int calib_data = mult_frac(ds4->gyro_calib_data[i].sens_numer, in dualshock4_parse_report() 2257 int calib_data = mult_frac(ds4->accel_calib_data[i].sens_numer, in dualshock4_parse_report()
|