Home
last modified time | relevance | path

Searched refs:factor (Results 1 – 25 of 92) sorted by relevance

1234

/drivers/clk/mmp/
Dclk-frac.c27 struct mmp_clk_factor *factor = to_clk_factor(hw); in clk_factor_round_rate() local
31 for (i = 0; i < factor->ftbl_cnt; i++) { in clk_factor_round_rate()
34 rate *= factor->ftbl[i].den; in clk_factor_round_rate()
35 do_div(rate, factor->ftbl[i].num * factor->masks->factor); in clk_factor_round_rate()
40 if ((i == 0) || (i == factor->ftbl_cnt)) { in clk_factor_round_rate()
53 struct mmp_clk_factor *factor = to_clk_factor(hw); in clk_factor_recalc_rate() local
54 struct mmp_clk_factor_masks *masks = factor->masks; in clk_factor_recalc_rate()
58 val = readl_relaxed(factor->base); in clk_factor_recalc_rate()
71 do_div(rate, num * factor->masks->factor); in clk_factor_recalc_rate()
80 struct mmp_clk_factor *factor = to_clk_factor(hw); in clk_factor_set_rate() local
[all …]
/drivers/media/platform/allegro-dvt/
Dnal-hevc.h383 int factor = 30 / 10; in nal_hevc_level() local
387 return factor * 10; in nal_hevc_level()
389 return factor * 20; in nal_hevc_level()
391 return factor * 21; in nal_hevc_level()
393 return factor * 30; in nal_hevc_level()
395 return factor * 31; in nal_hevc_level()
397 return factor * 40; in nal_hevc_level()
399 return factor * 41; in nal_hevc_level()
401 return factor * 50; in nal_hevc_level()
403 return factor * 51; in nal_hevc_level()
[all …]
/drivers/s390/block/
Ddasd_proc.c184 static void dasd_statistics_array(struct seq_file *m, unsigned int *array, int factor) in dasd_statistics_array() argument
189 seq_printf(m, "%7d ", array[i] / factor); in dasd_statistics_array()
201 int factor; in dasd_stats_proc_show() local
214 for (factor = 1; (prof->dasd_io_reqs / factor) > 9999999; in dasd_stats_proc_show()
215 factor *= 10); in dasd_stats_proc_show()
220 seq_printf(m, "Scale Factor is %d\n", factor); in dasd_stats_proc_show()
231 dasd_statistics_array(m, prof->dasd_io_secs, factor); in dasd_stats_proc_show()
233 dasd_statistics_array(m, prof->dasd_io_times, factor); in dasd_stats_proc_show()
235 dasd_statistics_array(m, prof->dasd_io_timps, factor); in dasd_stats_proc_show()
237 dasd_statistics_array(m, prof->dasd_io_time1, factor); in dasd_stats_proc_show()
[all …]
/drivers/iio/afe/
Diio-rescale.c328 u32 factor; in rescale_current_sense_amplifier_props() local
346 factor = gcd(sense, 1000000); in rescale_current_sense_amplifier_props()
347 rescale->numerator = 1000000 / factor; in rescale_current_sense_amplifier_props()
348 rescale->denominator = sense / factor; in rescale_current_sense_amplifier_props()
350 factor = gcd(rescale->numerator, gain_mult); in rescale_current_sense_amplifier_props()
351 rescale->numerator /= 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()
355 rescale->numerator *= gain_div / factor; in rescale_current_sense_amplifier_props()
356 rescale->denominator /= factor; in rescale_current_sense_amplifier_props()
[all …]
/drivers/clk/actions/
Dowl-factor.c136 struct owl_factor *factor = hw_to_owl_factor(hw); in owl_factor_round_rate() local
137 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_round_rate()
139 return owl_factor_helper_round_rate(&factor->common, factor_hw, in owl_factor_round_rate()
176 struct owl_factor *factor = hw_to_owl_factor(hw); in owl_factor_recalc_rate() local
177 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_recalc_rate()
178 struct owl_clk_common *common = &factor->common; in owl_factor_recalc_rate()
208 struct owl_factor *factor = hw_to_owl_factor(hw); in owl_factor_set_rate() local
209 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_set_rate()
210 struct owl_clk_common *common = &factor->common; in owl_factor_set_rate()
/drivers/media/test-drivers/vivid/
Dvivid-vid-out.c358 unsigned factor = 1; in vivid_try_fmt_vid_out() local
379 factor = 2; in vivid_try_fmt_vid_out()
382 mp->height = h / factor; in vivid_try_fmt_vid_out()
384 struct v4l2_rect r = { 0, 0, mp->width, mp->height * factor }; in vivid_try_fmt_vid_out()
398 mp->height = r.height / factor; in vivid_try_fmt_vid_out()
456 unsigned factor = 1; in vivid_s_fmt_vid_out() local
482 factor = 2; in vivid_s_fmt_vid_out()
496 factor * r.height / MAX_ZOOM in vivid_s_fmt_vid_out()
501 factor * r.height * MAX_ZOOM in vivid_s_fmt_vid_out()
511 factor * crop->height / MAX_ZOOM in vivid_s_fmt_vid_out()
[all …]
Dvivid-vid-cap.c578 unsigned factor = 1; in vivid_try_fmt_vid_cap() local
608 factor = 2; in vivid_try_fmt_vid_cap()
612 mp->height = h / factor; in vivid_try_fmt_vid_cap()
614 struct v4l2_rect r = { 0, 0, mp->width, mp->height * factor }; in vivid_try_fmt_vid_cap()
628 mp->height = r.height / factor; in vivid_try_fmt_vid_cap()
692 unsigned factor = 1; in vivid_s_fmt_vid_cap() local
711 factor = 2; in vivid_s_fmt_vid_cap()
728 factor * r.height / MAX_ZOOM in vivid_s_fmt_vid_cap()
733 factor * r.height * MAX_ZOOM in vivid_s_fmt_vid_cap()
743 factor * compose->height / MAX_ZOOM in vivid_s_fmt_vid_cap()
[all …]
/drivers/net/wireless/ath/
Ddfs_pri_detector.c47 u32 factor; in pde_get_multiple() local
59 factor = val / fraction; in pde_get_multiple()
65 factor++; in pde_get_multiple()
67 factor = 0; in pde_get_multiple()
69 return factor; in pde_get_multiple()
258 u32 factor; in pseq_handler_create_sequences() local
263 factor = pde_get_multiple(ps.last_ts - p2->ts, ps.pri, in pseq_handler_create_sequences()
265 if (factor > 0) { in pseq_handler_create_sequences()
310 u32 factor; in pseq_handler_add_to_existing_seqs() local
320 factor = pde_get_multiple(delta_ts, ps->pri, in pseq_handler_add_to_existing_seqs()
[all …]
/drivers/gpu/drm/sprd/
Dmegacores_pll.c34 const unsigned long long factor = 100; in dphy_calc_pll_param() local
66 tmp = pll->fvco * factor * mhz; in dphy_calc_pll_param()
68 tmp = tmp - pll->nint * factor * mhz; in dphy_calc_pll_param()
218 const u32 factor = 2; in dphy_timing_config() local
238 val[CLK] = DIV_ROUND_UP(range[L] * (factor << 1), t_byteck) - 2; in dphy_timing_config()
256 val[CLK] = DIV_ROUND_UP(range[L] * factor + (tmp & 0xffff) in dphy_timing_config()
259 val[DATA] = DIV_ROUND_UP(range[L] * factor in dphy_timing_config()
267 val[CLK] = DIV_ROUND_UP(range[L] * factor - constant, t_half_byteck); in dphy_timing_config()
275 val[CLK] = DIV_ROUND_UP(range[L] * factor, t_byteck) - 2; in dphy_timing_config()
282 val[CLK] = DIV_ROUND_UP(range[L] * factor, t_byteck) - 2; in dphy_timing_config()
/drivers/clk/qcom/
Dcommon.c135 struct clk_fixed_factor *factor; in _qcom_cc_register_board_clk() local
164 factor = devm_kzalloc(dev, sizeof(*factor), GFP_KERNEL); in _qcom_cc_register_board_clk()
165 if (!factor) in _qcom_cc_register_board_clk()
168 factor->mult = factor->div = 1; in _qcom_cc_register_board_clk()
169 factor->hw.init = &init_data; in _qcom_cc_register_board_clk()
177 ret = devm_clk_hw_register(dev, &factor->hw); in _qcom_cc_register_board_clk()
/drivers/gpu/drm/amd/pm/powerplay/hwmgr/
Dppevvmath.h248 static fInt GetScaledFraction(int X, int factor) in GetScaledFraction() argument
263 if (factor < 0) { in GetScaledFraction()
264 factor = -1*factor; in GetScaledFraction()
268 if ((X > MAX) || factor > MAX) { in GetScaledFraction()
269 if ((X/factor) <= MAX) { in GetScaledFraction()
275 while (factor > MAX) { in GetScaledFraction()
276 factor = factor >> 1; in GetScaledFraction()
285 if (factor == 1) in GetScaledFraction()
288 fValue = fDivide(ConvertToFraction(X * uPow(-1, bNEGATED)), ConvertToFraction(factor)); in GetScaledFraction()
/drivers/clocksource/
Dtimer-cadence-ttc.c238 unsigned long factor, rate_low, rate_high; in ttc_rate_change_clocksource_cb() local
241 factor = DIV_ROUND_CLOSEST(ndata->new_rate, in ttc_rate_change_clocksource_cb()
246 factor = DIV_ROUND_CLOSEST(ndata->old_rate, in ttc_rate_change_clocksource_cb()
252 if (!is_power_of_2(factor)) in ttc_rate_change_clocksource_cb()
255 if (abs(rate_high - (factor * rate_low)) > MAX_F_ERR) in ttc_rate_change_clocksource_cb()
258 factor = __ilog2_u32(factor); in ttc_rate_change_clocksource_cb()
272 psv -= factor; in ttc_rate_change_clocksource_cb()
274 psv += factor; in ttc_rate_change_clocksource_cb()
/drivers/media/platform/ti/vpe/
Dsc.c158 u16 factor = 0; in sc_config_scaler() local
222 factor = (u16) ((dst_h << 10) / src_h); in sc_config_scaler()
224 row_acc_init_rav = factor + ((1 + factor) >> 1); in sc_config_scaler()
238 src_h, dst_h, factor, row_acc_init_rav, in sc_config_scaler()
269 *sc_reg13 = factor; in sc_config_scaler()
/drivers/clk/
Dclk-multiplier.c119 unsigned long factor = __bestmult(hw, rate, parent_rate, in clk_multiplier_round_rate() local
122 return *parent_rate * factor; in clk_multiplier_round_rate()
129 unsigned long factor = __get_mult(mult, rate, parent_rate); in clk_multiplier_set_rate() local
140 val |= factor << mult->shift; in clk_multiplier_set_rate()
/drivers/iio/adc/
Dad7292.c148 int samp_mode, range0, range1, factor = 1; in ad7292_vin_range_multiplier() local
186 factor *= 2; in ad7292_vin_range_multiplier()
189 factor *= 2; in ad7292_vin_range_multiplier()
197 factor = 4; in ad7292_vin_range_multiplier()
200 return factor; in ad7292_vin_range_multiplier()
/drivers/thermal/
Damlogic_thermal.c118 s64 factor, Uptat, uefuse; in amlogic_thermal_code_to_millicelsius() local
124 factor = param->n * temp_code; in amlogic_thermal_code_to_millicelsius()
125 factor = div_s64(factor, 100); in amlogic_thermal_code_to_millicelsius()
130 Uptat = div_s64(Uptat, BIT(16) + factor); in amlogic_thermal_code_to_millicelsius()
Dthermal_mmio.c15 int factor; member
29 t *= sensor->factor; in thermal_mmio_get_temperature()
94 sensor->factor = 1000; in al_thermal_init()
/drivers/message/fusion/
Dmptspi.c116 u8 factor = MPT_ASYNC; in mptspi_setTargetNegoParms() local
125 factor = MPT_ULTRA2; in mptspi_setTargetNegoParms()
133 factor = pspi_data->minSyncFactor; in mptspi_setTargetNegoParms()
135 factor = MPT_ULTRA2; in mptspi_setTargetNegoParms()
139 factor = MPT_ULTRA160; in mptspi_setTargetNegoParms()
141 factor = MPT_ULTRA320; in mptspi_setTargetNegoParms()
165 factor = MPT_ASYNC; in mptspi_setTargetNegoParms()
190 factor = max(factor, nfactor); in mptspi_setTargetNegoParms()
191 if (factor == MPT_ASYNC) in mptspi_setTargetNegoParms()
195 factor = MPT_ASYNC; in mptspi_setTargetNegoParms()
[all …]
/drivers/net/wireless/mediatek/mt76/
Dmt76x02_dfs.c185 int remainder, factor; in mt76x02_dfs_get_multiple() local
193 factor = val / frac; in mt76x02_dfs_get_multiple()
198 factor++; in mt76x02_dfs_get_multiple()
200 factor = 0; in mt76x02_dfs_get_multiple()
202 return factor; in mt76x02_dfs_get_multiple()
436 int i, j, end, pri, factor, cur_pri; in mt76x02_dfs_create_sequence() local
488 factor = mt76x02_dfs_get_multiple(cur_pri, seq.pri, in mt76x02_dfs_create_sequence()
490 if (factor > 0) { in mt76x02_dfs_create_sequence()
520 int factor, pri; in mt76x02_dfs_add_event_to_sequence() local
534 factor = mt76x02_dfs_get_multiple(pri, seq->pri, in mt76x02_dfs_add_event_to_sequence()
[all …]
/drivers/misc/echo/
Decho.c112 int factor; in lms_adapt_bg() local
116 factor = clean << shift; in lms_adapt_bg()
118 factor = clean >> -shift; in lms_adapt_bg()
126 exp = (ec->fir_state_bg.history[i - offset1] * factor); in lms_adapt_bg()
130 exp = (ec->fir_state_bg.history[i + offset2] * factor); in lms_adapt_bg()
370 ec->factor = 0; in oslec_update()
/drivers/gpu/drm/msm/dsi/phy/
Ddsi_phy_28nm_8960.c307 unsigned int factor; in clk_bytediv_round_rate() local
309 factor = get_vco_mul_factor(rate); in clk_bytediv_round_rate()
311 best_parent = rate * factor; in clk_bytediv_round_rate()
314 return *prate / factor; in clk_bytediv_round_rate()
322 unsigned int factor; in clk_bytediv_set_rate() local
324 factor = get_vco_mul_factor(rate); in clk_bytediv_set_rate()
327 val |= (factor - 1) & 0xff; in clk_bytediv_set_rate()
/drivers/net/ethernet/microchip/sparx5/
Dsparx5_calendar.c285 u32 gcd, idx, sum, min, factor; in sparx5_dsm_calendar_calc() local
330 factor = 100 * 100 * 1000 / (100 * 100 - SPX5_DSM_CAL_BW_LOSS); in sparx5_dsm_calendar_calc()
332 if (sum * factor > (taxi_bw * 1000)) { in sparx5_dsm_calendar_calc()
349 slot_spd = raw_spd * factor / 1000; in sparx5_dsm_calendar_calc()
361 u32 adjusted_speed = data->taxi_speeds[idx] * factor / 1000; in sparx5_dsm_calendar_calc()
369 data->dev_slots[idx] = ((spd * factor / slot_spd) + 999) / 1000; in sparx5_dsm_calendar_calc()
382 taxi, factor); in sparx5_dsm_calendar_calc()
/drivers/staging/pi433/
Drf69.c235 u64 factor = 1000000; // to improve precision of calculation in rf69_set_deviation() local
254 f_step = F_OSC * factor; in rf69_set_deviation()
258 f_reg = deviation * factor; in rf69_set_deviation()
290 u64 factor = 1000000; // to improve precision of calculation in rf69_set_frequency() local
293 f_step = F_OSC * factor; in rf69_set_frequency()
297 f_max = div_u64(f_step * 8388608, factor); in rf69_set_frequency()
304 f_reg = frequency * factor; in rf69_set_frequency()
/drivers/md/
Dmd-autodetect.c62 int minor, level, factor, fault, partitioned = 0; in md_setup() local
92 if (get_option(&str, &factor) != 2 || /* Chunk Size */ in md_setup()
98 md_setup_args[ent].chunk = 1 << (factor+12); in md_setup()
/drivers/gpu/drm/nouveau/dispnv04/
Doverlay.c75 sin_mul(int degrees, int factor) in sin_mul() argument
79 factor *= -1; in sin_mul()
81 return factor * 4 * degrees * (180 - degrees) / in sin_mul()
87 cos_mul(int degrees, int factor) in cos_mul() argument
89 return sin_mul((degrees + 90) % 360, factor); in cos_mul()

1234