/kernel/linux/linux-5.10/drivers/regulator/ |
H A D | gpio-regulator.c | 62 int ptr, target = 0, state, best_val = INT_MAX; in gpio_regulator_set_voltage() local 65 if (data->states[ptr].value < best_val && in gpio_regulator_set_voltage() 69 best_val = data->states[ptr].value; in gpio_regulator_set_voltage() 74 if (best_val == INT_MAX) in gpio_regulator_set_voltage() 101 int ptr, target = 0, state, best_val = 0; in gpio_regulator_set_current_limit() local 104 if (data->states[ptr].value > best_val && in gpio_regulator_set_current_limit() 108 best_val = data->states[ptr].value; in gpio_regulator_set_current_limit() 111 if (best_val == 0) in gpio_regulator_set_current_limit()
|
H A D | helpers.c | 295 int best_val = INT_MAX; in regulator_map_voltage_iterate() local 307 if (ret < best_val && ret >= min_uV && ret <= max_uV) { in regulator_map_voltage_iterate() 308 best_val = ret; in regulator_map_voltage_iterate() 313 if (best_val != INT_MAX) in regulator_map_voltage_iterate()
|
H A D | core.c | 3465 int best_val = 0; in _regulator_do_set_voltage() local 3493 best_val = ops->list_voltage(rdev, in _regulator_do_set_voltage() 3496 best_val = regulator_get_voltage_rdev(rdev); in _regulator_do_set_voltage() 3502 best_val = ops->list_voltage(rdev, ret); in _regulator_do_set_voltage() 3503 if (min_uV <= best_val && max_uV >= best_val) { in _regulator_do_set_voltage() 3509 rdev, best_val, selector); in _regulator_do_set_voltage() 3512 rdev, best_val, selector); in _regulator_do_set_voltage() 3533 if (old_uV != best_val) { in _regulator_do_set_voltage() 3536 best_val); in _regulator_do_set_voltage() 3565 trace_regulator_set_voltage_complete(rdev_get_name(rdev), best_val); _regulator_do_set_voltage() local [all...] |
/kernel/linux/linux-5.10/sound/soc/codecs/ |
H A D | wm9081.c | 997 int ret, i, best, best_val, cur_val; in wm9081_hw_params() local 1055 best_val = abs((wm9081->sysclk_rate / clk_sys_rates[0].ratio) in wm9081_hw_params() 1060 if (cur_val < best_val) { in wm9081_hw_params() 1062 best_val = cur_val; in wm9081_hw_params() 1072 best_val = abs(wm9081->fs - sample_rates[0].rate); in wm9081_hw_params() 1076 if (cur_val < best_val) { in wm9081_hw_params() 1078 best_val = cur_val; in wm9081_hw_params() 1088 best_val = INT_MAX; in wm9081_hw_params() 1094 if (cur_val < best_val) { in wm9081_hw_params() 1096 best_val in wm9081_hw_params() [all...] |
H A D | wm8993.c | 1190 int ret, i, best, best_val, cur_val; in wm8993_hw_params() local 1242 best_val = abs((wm8993->sysclk_rate / clk_sys_rates[0].ratio) in wm8993_hw_params() 1247 if (cur_val < best_val) { in wm8993_hw_params() 1249 best_val = cur_val; in wm8993_hw_params() 1259 best_val = abs(wm8993->fs - sample_rates[0].rate); in wm8993_hw_params() 1263 if (cur_val < best_val) { in wm8993_hw_params() 1265 best_val = cur_val; in wm8993_hw_params() 1275 best_val = INT_MAX; in wm8993_hw_params() 1281 if (cur_val < best_val) { in wm8993_hw_params() 1283 best_val in wm8993_hw_params() [all...] |
H A D | wm8904.c | 421 int best, best_val, save, i, cfg; in wm8904_set_retune_mobile() local 430 best_val = INT_MAX; in wm8904_set_retune_mobile() 435 - wm8904->fs) < best_val) { in wm8904_set_retune_mobile() 437 best_val = abs(pdata->retune_mobile_cfgs[i].rate in wm8904_set_retune_mobile() 1299 int ret, i, best, best_val, cur_val; in wm8904_hw_params() local 1343 best_val = abs((wm8904->sysclk_rate / clk_sys_rates[0].ratio) in wm8904_hw_params() 1348 if (cur_val < best_val) { in wm8904_hw_params() 1350 best_val = cur_val; in wm8904_hw_params() 1360 best_val = abs(wm8904->fs - sample_rates[0].rate); in wm8904_hw_params() 1364 if (cur_val < best_val) { in wm8904_hw_params() [all...] |
H A D | max98088.c | 1429 int best, best_val, save, i, sel, fs; in max98088_setup_eq1() local 1442 best_val = INT_MAX; in max98088_setup_eq1() 1445 abs(pdata->eq_cfg[i].rate - fs) < best_val) { in max98088_setup_eq1() 1447 best_val = abs(pdata->eq_cfg[i].rate - fs); in max98088_setup_eq1() 1476 int best, best_val, save, i, sel, fs; in max98088_setup_eq2() local 1489 best_val = INT_MAX; in max98088_setup_eq2() 1492 abs(pdata->eq_cfg[i].rate - fs) < best_val) { in max98088_setup_eq2() 1494 best_val = abs(pdata->eq_cfg[i].rate - fs); in max98088_setup_eq2()
|
H A D | wm8903.c | 1450 int best_val; in wm8903_hw_params() local 1469 best_val = abs(sample_rates[dsp_config].rate - fs); in wm8903_hw_params() 1472 if (cur_val <= best_val) { in wm8903_hw_params() 1474 best_val = cur_val; in wm8903_hw_params() 1512 best_val = abs((wm8903->sysclk / in wm8903_hw_params() 1520 if (cur_val <= best_val) { in wm8903_hw_params() 1522 best_val = cur_val; in wm8903_hw_params() 1552 best_val = ((clk_sys * 10) / bclk_divs[0].ratio) - bclk; in wm8903_hw_params() 1559 best_val = cur_val; in wm8903_hw_params()
|
H A D | max98095.c | 1501 int fs, best, best_val, i; in max98095_put_eq_enum() local 1519 best_val = INT_MAX; in max98095_put_eq_enum() 1522 abs(pdata->eq_cfg[i].rate - fs) < best_val) { in max98095_put_eq_enum() 1524 best_val = abs(pdata->eq_cfg[i].rate - fs); in max98095_put_eq_enum() 1652 int fs, best, best_val, i; in max98095_put_bq_enum() local 1670 best_val = INT_MAX; in max98095_put_bq_enum() 1673 abs(pdata->bq_cfg[i].rate - fs) < best_val) { in max98095_put_bq_enum() 1675 best_val = abs(pdata->bq_cfg[i].rate - fs); in max98095_put_bq_enum()
|
H A D | wm8994.c | 401 int iface, best, best_val, save, i, cfg; in wm8994_set_retune_mobile() local 422 best_val = INT_MAX; in wm8994_set_retune_mobile() 427 - wm8994->dac_rates[iface]) < best_val) { in wm8994_set_retune_mobile() 429 best_val = abs(pdata->retune_mobile_cfgs[i].rate in wm8994_set_retune_mobile() 2929 int i, cur_val, best_val, bclk_rate, best; in wm8994_hw_params() local 3024 best_val = abs((fs_ratios[0] * params_rate(params)) in wm8994_hw_params() 3029 if (cur_val >= best_val) in wm8994_hw_params() 3032 best_val = cur_val; in wm8994_hw_params()
|
/kernel/linux/linux-6.6/sound/soc/codecs/ |
H A D | wm9081.c | 997 int ret, i, best, best_val, cur_val; in wm9081_hw_params() local 1055 best_val = abs((wm9081->sysclk_rate / clk_sys_rates[0].ratio) in wm9081_hw_params() 1060 if (cur_val < best_val) { in wm9081_hw_params() 1062 best_val = cur_val; in wm9081_hw_params() 1072 best_val = abs(wm9081->fs - sample_rates[0].rate); in wm9081_hw_params() 1076 if (cur_val < best_val) { in wm9081_hw_params() 1078 best_val = cur_val; in wm9081_hw_params() 1088 best_val = INT_MAX; in wm9081_hw_params() 1094 if (cur_val < best_val) { in wm9081_hw_params() 1096 best_val in wm9081_hw_params() [all...] |
H A D | wm8993.c | 1190 int ret, i, best, best_val, cur_val; in wm8993_hw_params() local 1242 best_val = abs((wm8993->sysclk_rate / clk_sys_rates[0].ratio) in wm8993_hw_params() 1247 if (cur_val < best_val) { in wm8993_hw_params() 1249 best_val = cur_val; in wm8993_hw_params() 1259 best_val = abs(wm8993->fs - sample_rates[0].rate); in wm8993_hw_params() 1263 if (cur_val < best_val) { in wm8993_hw_params() 1265 best_val = cur_val; in wm8993_hw_params() 1275 best_val = INT_MAX; in wm8993_hw_params() 1281 if (cur_val < best_val) { in wm8993_hw_params() 1283 best_val in wm8993_hw_params() [all...] |
H A D | wm8904.c | 421 int best, best_val, save, i, cfg; in wm8904_set_retune_mobile() local 430 best_val = INT_MAX; in wm8904_set_retune_mobile() 435 - wm8904->fs) < best_val) { in wm8904_set_retune_mobile() 437 best_val = abs(pdata->retune_mobile_cfgs[i].rate in wm8904_set_retune_mobile() 1299 int ret, i, best, best_val, cur_val; in wm8904_hw_params() local 1343 best_val = abs((wm8904->sysclk_rate / clk_sys_rates[0].ratio) in wm8904_hw_params() 1348 if (cur_val < best_val) { in wm8904_hw_params() 1350 best_val = cur_val; in wm8904_hw_params() 1360 best_val = abs(wm8904->fs - sample_rates[0].rate); in wm8904_hw_params() 1364 if (cur_val < best_val) { in wm8904_hw_params() [all...] |
H A D | max98088.c | 1428 int best, best_val, save, i, sel, fs; in max98088_setup_eq1() local 1441 best_val = INT_MAX; in max98088_setup_eq1() 1444 abs(pdata->eq_cfg[i].rate - fs) < best_val) { in max98088_setup_eq1() 1446 best_val = abs(pdata->eq_cfg[i].rate - fs); in max98088_setup_eq1() 1475 int best, best_val, save, i, sel, fs; in max98088_setup_eq2() local 1488 best_val = INT_MAX; in max98088_setup_eq2() 1491 abs(pdata->eq_cfg[i].rate - fs) < best_val) { in max98088_setup_eq2() 1493 best_val = abs(pdata->eq_cfg[i].rate - fs); in max98088_setup_eq2()
|
H A D | max98095.c | 1495 int fs, best, best_val, i; in max98095_put_eq_enum() local 1513 best_val = INT_MAX; in max98095_put_eq_enum() 1516 abs(pdata->eq_cfg[i].rate - fs) < best_val) { in max98095_put_eq_enum() 1518 best_val = abs(pdata->eq_cfg[i].rate - fs); in max98095_put_eq_enum() 1646 int fs, best, best_val, i; in max98095_put_bq_enum() local 1664 best_val = INT_MAX; in max98095_put_bq_enum() 1667 abs(pdata->bq_cfg[i].rate - fs) < best_val) { in max98095_put_bq_enum() 1669 best_val = abs(pdata->bq_cfg[i].rate - fs); in max98095_put_bq_enum()
|
H A D | wm8903.c | 1449 int best_val; in wm8903_hw_params() local 1468 best_val = abs(sample_rates[dsp_config].rate - fs); in wm8903_hw_params() 1471 if (cur_val <= best_val) { in wm8903_hw_params() 1473 best_val = cur_val; in wm8903_hw_params() 1511 best_val = abs((wm8903->sysclk / in wm8903_hw_params() 1519 if (cur_val <= best_val) { in wm8903_hw_params() 1521 best_val = cur_val; in wm8903_hw_params()
|
H A D | wm8994.c | 401 int iface, best, best_val, save, i, cfg; in wm8994_set_retune_mobile() local 422 best_val = INT_MAX; in wm8994_set_retune_mobile() 427 - wm8994->dac_rates[iface]) < best_val) { in wm8994_set_retune_mobile() 429 best_val = abs(pdata->retune_mobile_cfgs[i].rate in wm8994_set_retune_mobile() 2929 int i, cur_val, best_val, bclk_rate, best; in wm8994_hw_params() local 3024 best_val = abs((fs_ratios[0] * params_rate(params)) in wm8994_hw_params() 3029 if (cur_val >= best_val) in wm8994_hw_params() 3032 best_val = cur_val; in wm8994_hw_params()
|
/kernel/linux/linux-6.6/drivers/regulator/ |
H A D | gpio-regulator.c | 62 int ptr, target = 0, state, best_val = INT_MAX; in gpio_regulator_set_voltage() local 65 if (data->states[ptr].value < best_val && in gpio_regulator_set_voltage() 69 best_val = data->states[ptr].value; in gpio_regulator_set_voltage() 74 if (best_val == INT_MAX) in gpio_regulator_set_voltage() 101 int ptr, target = 0, state, best_val = 0; in gpio_regulator_set_current_limit() local 104 if (data->states[ptr].value > best_val && in gpio_regulator_set_current_limit() 108 best_val = data->states[ptr].value; in gpio_regulator_set_current_limit() 111 if (best_val == 0) in gpio_regulator_set_current_limit()
|
H A D | helpers.c | 298 int best_val = INT_MAX; in regulator_map_voltage_iterate() local 310 if (ret < best_val && ret >= min_uV && ret <= max_uV) { in regulator_map_voltage_iterate() 311 best_val = ret; in regulator_map_voltage_iterate() 316 if (best_val != INT_MAX) in regulator_map_voltage_iterate()
|
H A D | core.c | 3612 int best_val = 0; in _regulator_do_set_voltage() local 3640 best_val = ops->list_voltage(rdev, in _regulator_do_set_voltage() 3643 best_val = regulator_get_voltage_rdev(rdev); in _regulator_do_set_voltage() 3649 best_val = ops->list_voltage(rdev, ret); in _regulator_do_set_voltage() 3650 if (min_uV <= best_val && max_uV >= best_val) { in _regulator_do_set_voltage() 3656 rdev, best_val, selector); in _regulator_do_set_voltage() 3659 rdev, best_val, selector); in _regulator_do_set_voltage() 3680 if (old_uV != best_val) { in _regulator_do_set_voltage() 3683 best_val); in _regulator_do_set_voltage() 3707 trace_regulator_set_voltage_complete(rdev_get_name(rdev), best_val); _regulator_do_set_voltage() local [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/qlogic/qed/ |
H A D | qed_ptp.c | 256 s64 best_val = 0, val, best_period = 0, period, approx_dev, dif, dif2; in qed_ptp_hw_adjfreq() local 302 best_val = val; in qed_ptp_hw_adjfreq() 312 best_val = 4; in qed_ptp_hw_adjfreq() 315 best_val = 0; in qed_ptp_hw_adjfreq() 320 (((int)best_val) << QED_DRIFT_CNTR_ADJUSTMENT_SHIFT) | in qed_ptp_hw_adjfreq()
|
/kernel/linux/linux-6.6/drivers/net/ethernet/qlogic/qed/ |
H A D | qed_ptp.c | 256 s64 best_val = 0, val, best_period = 0, period, approx_dev, dif, dif2; in qed_ptp_hw_adjfreq() local 302 best_val = val; in qed_ptp_hw_adjfreq() 312 best_val = 4; in qed_ptp_hw_adjfreq() 315 best_val = 0; in qed_ptp_hw_adjfreq() 320 (((int)best_val) << QED_DRIFT_CNTR_ADJUSTMENT_SHIFT) | in qed_ptp_hw_adjfreq()
|
/kernel/linux/linux-5.10/sound/soc/atmel/ |
H A D | atmel-classd.c | 345 int i, best, best_val, cur_val, ret; in atmel_classd_cpu_dai_hw_params() local 351 best_val = abs(fs - sample_rates[0].rate); in atmel_classd_cpu_dai_hw_params() 355 if (cur_val < best_val) { in atmel_classd_cpu_dai_hw_params() 357 best_val = cur_val; in atmel_classd_cpu_dai_hw_params()
|
/kernel/linux/linux-6.6/sound/soc/atmel/ |
H A D | atmel-classd.c | 345 int i, best, best_val, cur_val, ret; in atmel_classd_cpu_dai_hw_params() local 351 best_val = abs(fs - sample_rates[0].rate); in atmel_classd_cpu_dai_hw_params() 355 if (cur_val < best_val) { in atmel_classd_cpu_dai_hw_params() 357 best_val = cur_val; in atmel_classd_cpu_dai_hw_params()
|
/kernel/linux/linux-5.10/sound/soc/sunxi/ |
H A D | sun8i-codec.c | 271 unsigned int best_val = 0, best_diff = ~0; in sun8i_codec_get_bclk_div() local 280 best_val = bdiv->val; in sun8i_codec_get_bclk_div() 284 return best_val; in sun8i_codec_get_bclk_div()
|