/drivers/clk/mmp/ |
D | clk-frac.c | 30 struct mmp_clk_factor *factor = to_clk_factor(hw); in clk_factor_round_rate() local 34 for (i = 0; i < factor->ftbl_cnt; i++) { in clk_factor_round_rate() 37 rate *= factor->ftbl[i].den; in clk_factor_round_rate() 38 do_div(rate, factor->ftbl[i].num * factor->masks->factor); in clk_factor_round_rate() 43 if ((i == 0) || (i == factor->ftbl_cnt)) { in clk_factor_round_rate() 56 struct mmp_clk_factor *factor = to_clk_factor(hw); in clk_factor_recalc_rate() local 57 struct mmp_clk_factor_masks *masks = factor->masks; in clk_factor_recalc_rate() 61 val = readl_relaxed(factor->base); in clk_factor_recalc_rate() 74 do_div(rate, num * factor->masks->factor); in clk_factor_recalc_rate() 83 struct mmp_clk_factor *factor = to_clk_factor(hw); in clk_factor_set_rate() local [all …]
|
/drivers/s390/block/ |
D | dasd_proc.c | 184 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/ |
D | iio-rescale.c | 266 u32 factor; in rescale_current_sense_amplifier_props() local 284 factor = gcd(sense, 1000000); in rescale_current_sense_amplifier_props() 285 rescale->numerator = 1000000 / factor; in rescale_current_sense_amplifier_props() 286 rescale->denominator = sense / factor; in rescale_current_sense_amplifier_props() 288 factor = gcd(rescale->numerator, gain_mult); in rescale_current_sense_amplifier_props() 289 rescale->numerator /= factor; in rescale_current_sense_amplifier_props() 290 rescale->denominator *= gain_mult / factor; in rescale_current_sense_amplifier_props() 292 factor = gcd(rescale->denominator, gain_div); in rescale_current_sense_amplifier_props() 293 rescale->numerator *= gain_div / factor; in rescale_current_sense_amplifier_props() 294 rescale->denominator /= factor; in rescale_current_sense_amplifier_props() [all …]
|
/drivers/clk/actions/ |
D | owl-factor.c | 137 struct owl_factor *factor = hw_to_owl_factor(hw); in owl_factor_round_rate() local 138 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_round_rate() 140 return owl_factor_helper_round_rate(&factor->common, factor_hw, in owl_factor_round_rate() 177 struct owl_factor *factor = hw_to_owl_factor(hw); in owl_factor_recalc_rate() local 178 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_recalc_rate() 179 struct owl_clk_common *common = &factor->common; in owl_factor_recalc_rate() 209 struct owl_factor *factor = hw_to_owl_factor(hw); in owl_factor_set_rate() local 210 struct owl_factor_hw *factor_hw = &factor->factor_hw; in owl_factor_set_rate() 211 struct owl_clk_common *common = &factor->common; in owl_factor_set_rate()
|
/drivers/net/wireless/ath/ |
D | dfs_pri_detector.c | 47 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/media/test-drivers/vivid/ |
D | vivid-vid-out.c | 358 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 …]
|
D | vivid-vid-cap.c | 566 unsigned factor = 1; in vivid_try_fmt_vid_cap() local 596 factor = 2; in vivid_try_fmt_vid_cap() 600 mp->height = h / factor; in vivid_try_fmt_vid_cap() 602 struct v4l2_rect r = { 0, 0, mp->width, mp->height * factor }; in vivid_try_fmt_vid_cap() 616 mp->height = r.height / factor; in vivid_try_fmt_vid_cap() 680 unsigned factor = 1; in vivid_s_fmt_vid_cap() local 699 factor = 2; in vivid_s_fmt_vid_cap() 716 factor * r.height / MAX_ZOOM in vivid_s_fmt_vid_cap() 721 factor * r.height * MAX_ZOOM in vivid_s_fmt_vid_cap() 731 factor * compose->height / MAX_ZOOM in vivid_s_fmt_vid_cap() [all …]
|
/drivers/clk/qcom/ |
D | common.c | 137 struct clk_fixed_factor *factor; in _qcom_cc_register_board_clk() local 166 factor = devm_kzalloc(dev, sizeof(*factor), GFP_KERNEL); in _qcom_cc_register_board_clk() 167 if (!factor) in _qcom_cc_register_board_clk() 170 factor->mult = factor->div = 1; in _qcom_cc_register_board_clk() 171 factor->hw.init = &init_data; in _qcom_cc_register_board_clk() 179 ret = devm_clk_hw_register(dev, &factor->hw); in _qcom_cc_register_board_clk()
|
/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ |
D | ppevvmath.h | 248 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/ |
D | timer-cadence-ttc.c | 238 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/allegro-dvt/ |
D | nal-hevc.c | 73 int factor = 30 / 10; in nal_hevc_level_from_v4l2() local 77 return factor * 10; in nal_hevc_level_from_v4l2() 79 return factor * 20; in nal_hevc_level_from_v4l2() 81 return factor * 21; in nal_hevc_level_from_v4l2() 83 return factor * 30; in nal_hevc_level_from_v4l2() 85 return factor * 31; in nal_hevc_level_from_v4l2() 87 return factor * 40; in nal_hevc_level_from_v4l2() 89 return factor * 41; in nal_hevc_level_from_v4l2() 91 return factor * 50; in nal_hevc_level_from_v4l2() 93 return factor * 51; in nal_hevc_level_from_v4l2() [all …]
|
/drivers/media/platform/ti-vpe/ |
D | sc.c | 158 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/ |
D | clk-multiplier.c | 119 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/thermal/ |
D | amlogic_thermal.c | 118 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()
|
D | thermal_mmio.c | 15 int factor; member 30 t *= sensor->factor; in thermal_mmio_get_temperature() 95 sensor->factor = 1000; in al_thermal_init()
|
/drivers/iio/adc/ |
D | ad7292.c | 148 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/message/fusion/ |
D | mptspi.c | 116 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/ |
D | mt76x02_dfs.c | 185 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/ |
D | echo.c | 112 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/net/ethernet/microchip/sparx5/ |
D | sparx5_calendar.c | 285 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/gpu/drm/msm/dsi/phy/ |
D | dsi_phy_28nm_8960.c | 307 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/staging/pi433/ |
D | rf69.c | 260 u64 factor = 1000000; // to improve precision of calculation in rf69_set_deviation() local 269 f_step = F_OSC * factor; in rf69_set_deviation() 273 f_reg = deviation * factor; in rf69_set_deviation() 305 u64 factor = 1000000; // to improve precision of calculation in rf69_set_frequency() local 308 f_step = F_OSC * factor; in rf69_set_frequency() 312 f_max = div_u64(f_step * 8388608, factor); in rf69_set_frequency() 319 f_reg = frequency * factor; in rf69_set_frequency()
|
/drivers/md/ |
D | md-autodetect.c | 62 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/media/dvb-frontends/ |
D | cx24113.c | 295 u8 factor; in cx24113_calc_pll_nf() local 299 factor = 1; in cx24113_calc_pll_nf() 301 factor = 2; in cx24113_calc_pll_nf() 323 N /= (state->config->xtal_khz) * factor * 2; in cx24113_calc_pll_nf() 338 do_div(dividend, state->config->xtal_khz * 1000 * factor * 2); in cx24113_calc_pll_nf()
|
/drivers/gpu/drm/nouveau/dispnv04/ |
D | overlay.c | 75 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()
|