Home
last modified time | relevance | path

Searched full:min_uv (Results 1 – 25 of 157) sorted by relevance

1234567

/openbmc/linux/drivers/regulator/
H A Dtwl6030-regulator.c242 static int twl6030coresmps_set_voltage(struct regulator_dev *rdev, int min_uV, in twl6030coresmps_set_voltage() argument
399 static int twl6030smps_map_voltage(struct regulator_dev *rdev, int min_uV, in twl6030smps_map_voltage() argument
407 if (min_uV == 0) in twl6030smps_map_voltage()
409 else if ((min_uV >= 600000) && (min_uV <= 1300000)) { in twl6030smps_map_voltage()
410 vsel = DIV_ROUND_UP(min_uV - 600000, 12500); in twl6030smps_map_voltage()
416 else if ((min_uV > 1900000) && (min_uV <= 2100000)) in twl6030smps_map_voltage()
418 else if ((min_uV > 1800000) && (min_uV <= 1900000)) in twl6030smps_map_voltage()
420 else if ((min_uV > 1500000) && (min_uV <= 1800000)) in twl6030smps_map_voltage()
422 else if ((min_uV > 1350000) && (min_uV <= 1500000)) in twl6030smps_map_voltage()
424 else if ((min_uV > 1300000) && (min_uV <= 1350000)) in twl6030smps_map_voltage()
[all …]
H A Dda9052-regulator.c63 int min_uV; member
75 int min_uV, int max_uV) in verify_range() argument
77 if (min_uV > info->max_uV || max_uV < info->min_uV) in verify_range()
161 + info->min_uV); in da9052_list_voltage()
165 volt_uV = (selector * info->step_uV) + info->min_uV; in da9052_list_voltage()
175 int min_uV, int max_uV) in da9052_map_voltage() argument
182 ret = verify_range(info, min_uV, max_uV); in da9052_map_voltage()
186 if (min_uV < info->min_uV) in da9052_map_voltage()
187 min_uV = info->min_uV; in da9052_map_voltage()
190 && (min_uV >= DA9052_CONST_3uV)) { in da9052_map_voltage()
[all …]
H A Dhelpers.c304 * @min_uV: Lower bound for voltage
313 int min_uV, int max_uV) in regulator_map_voltage_iterate() argument
327 if (ret < best_val && ret >= min_uV && ret <= max_uV) { in regulator_map_voltage_iterate()
344 * @min_uV: Lower bound for voltage
351 int min_uV, int max_uV) in regulator_map_voltage_ascend() argument
363 if (ret >= min_uV && ret <= max_uV) in regulator_map_voltage_ascend()
375 * @min_uV: Lower bound for voltage
378 * Drivers providing min_uV and uV_step in their regulator_desc can
382 int min_uV, int max_uV) in regulator_map_voltage_linear() argument
388 if (min_uV <= rdev->desc->min_uV && rdev->desc->min_uV <= max_uV) in regulator_map_voltage_linear()
[all …]
H A Dlm363x-regulator.c111 .min_uV = LM3631_VBOOST_MIN,
124 .min_uV = LM3631_VCONT_MIN,
139 .min_uV = LM3631_VLDO_MIN,
154 .min_uV = LM3631_VLDO_MIN,
169 .min_uV = LM3631_VLDO_MIN,
185 .min_uV = LM3632_VBOOST_MIN,
198 .min_uV = LM3632_VLDO_MIN,
213 .min_uV = LM3632_VLDO_MIN,
230 .min_uV = LM36274_VOLTAGE_MIN,
243 .min_uV = LM36274_VOLTAGE_MIN,
[all …]
H A Dvctrl-regulator.c22 int min_uV; member
53 return ctrl->min_uV + in vctrl_calc_ctrl_voltage()
54 DIV_ROUND_CLOSEST_ULL((s64)(out_uV - out->min_uV) * in vctrl_calc_ctrl_voltage()
55 (ctrl->max_uV - ctrl->min_uV), in vctrl_calc_ctrl_voltage()
56 out->max_uV - out->min_uV); in vctrl_calc_ctrl_voltage()
69 if (ctrl_uV < ctrl->min_uV) in vctrl_calc_output_voltage()
70 return out->min_uV; in vctrl_calc_output_voltage()
75 return out->min_uV + in vctrl_calc_output_voltage()
76 DIV_ROUND_CLOSEST_ULL((s64)(ctrl_uV - ctrl->min_uV) * in vctrl_calc_output_voltage()
77 (out->max_uV - out->min_uV), in vctrl_calc_output_voltage()
[all …]
H A Dcore.c92 int min_uV, int max_uV);
488 int *min_uV, int *max_uV) in regulator_check_voltage() argument
490 BUG_ON(*min_uV > *max_uV); in regulator_check_voltage()
499 if (*min_uV < rdev->constraints->min_uV) in regulator_check_voltage()
500 *min_uV = rdev->constraints->min_uV; in regulator_check_voltage()
502 if (*min_uV > *max_uV) { in regulator_check_voltage()
504 *min_uV, *max_uV); in regulator_check_voltage()
521 int *min_uV, int *max_uV, in regulator_check_consumers() argument
533 if (!voltage->min_uV && !voltage->max_uV) in regulator_check_consumers()
538 if (*min_uV < voltage->min_uV) in regulator_check_consumers()
[all …]
H A Dpwm-regulator.c151 int min_uV = rdev->constraints->min_uV; in pwm_regulator_get_voltage() local
153 int diff_uV = max_uV - min_uV; in pwm_regulator_get_voltage()
166 * The dutycycle for min_uV might be greater than the one for max_uV. in pwm_regulator_get_voltage()
180 return voltage + min_uV; in pwm_regulator_get_voltage()
191 int min_uV = rdev->constraints->min_uV; in pwm_regulator_set_voltage() local
193 int diff_uV = max_uV - min_uV; in pwm_regulator_set_voltage()
202 * The dutycycle for min_uV might be greater than the one for max_uV. in pwm_regulator_set_voltage()
211 dutycycle = DIV_ROUND_CLOSEST_ULL((u64)(req_min_uV - min_uV) * in pwm_regulator_set_voltage()
H A Dda903x-regulator.c91 int min_uV, int max_uV) in check_range() argument
93 if (min_uV < info->desc.min_uV || min_uV > info->max_uV) in check_range()
190 int min_uV, int max_uV) in da9030_map_ldo14_voltage() argument
195 if (check_range(info, min_uV, max_uV)) { in da9030_map_ldo14_voltage()
196 pr_err("invalid voltage range (%d, %d) uV\n", min_uV, max_uV); in da9030_map_ldo14_voltage()
200 thresh = (info->max_uV + info->desc.min_uV) / 2; in da9030_map_ldo14_voltage()
201 if (min_uV < thresh) { in da9030_map_ldo14_voltage()
202 sel = DIV_ROUND_UP(thresh - min_uV, info->desc.uV_step); in da9030_map_ldo14_voltage()
205 sel = DIV_ROUND_UP(min_uV - thresh, info->desc.uV_step); in da9030_map_ldo14_voltage()
218 volt = rdev->desc->min_uV + in da9030_list_ldo14_voltage()
[all …]
H A Dmax8893.c29 .min_uV = 800000,
46 .min_uV = 1600000,
63 .min_uV = 1200000,
80 .min_uV = 1600000,
97 .min_uV = 800000,
114 .min_uV = 800000,
H A Dab8500-ext.c52 .min_uV = 1800000,
63 .min_uV = 1360000,
71 .min_uV = 3400000,
286 static int ab8500_ext_set_voltage(struct regulator_dev *rdev, int min_uV, in ab8500_ext_set_voltage() argument
296 if (regu_constraints->min_uV == min_uV && in ab8500_ext_set_voltage()
302 min_uV, max_uV, in ab8500_ext_set_voltage()
303 regu_constraints->min_uV, regu_constraints->max_uV); in ab8500_ext_set_voltage()
318 if (regu_constraints->min_uV && regu_constraints->max_uV) { in ab8500_ext_list_voltage()
319 if (regu_constraints->min_uV == regu_constraints->max_uV) in ab8500_ext_list_voltage()
320 return regu_constraints->min_uV; in ab8500_ext_list_voltage()
H A Dpv88090-regulator.c46 int min_uV; member
73 .min_uV = 600000,
79 .min_uV = 1400000,
84 .min_uV = 1250000,
171 .min_uV = min, \
197 .min_uV = min, \
360 pv88090_regulator_info[i].desc.min_uV in pv88090_i2c_probe()
361 = pv88090_buck_vol[index].min_uV; in pv88090_i2c_probe()
366 - (pv88090_buck_vol[index].min_uV)) in pv88090_i2c_probe()
H A Dvirtual.c22 int min_uV; member
34 if (data->min_uV && data->max_uV in update_voltage_constraints()
35 && data->min_uV <= data->max_uV) { in update_voltage_constraints()
37 data->min_uV, data->max_uV); in update_voltage_constraints()
39 data->min_uV, data->max_uV); in update_voltage_constraints()
47 if (data->min_uV && data->max_uV && !data->enabled) { in update_voltage_constraints()
57 if (!(data->min_uV && data->max_uV) && data->enabled) { in update_voltage_constraints()
112 return sprintf(buf, "%d\n", data->min_uV); in show_min_uV()
126 data->min_uV = val; in set_min_uV()
H A Drt4801-regulator.c17 #define MIN_UV 4000000 macro
20 #define N_VOLTAGES ((MAX_UV - MIN_UV) / STEP_UV + 1)
148 .min_uV = MIN_UV,
162 .min_uV = MIN_UV,
H A Ds2mps11.c104 old_volt = rdev->desc->min_uV + (rdev->desc->uV_step * old_selector); in s2mps11_regulator_set_voltage_time_sel()
105 new_volt = rdev->desc->min_uV + (rdev->desc->uV_step * new_selector); in s2mps11_regulator_set_voltage_time_sel()
364 .min_uV = MIN_800_MV, \
379 .min_uV = MIN_650_MV, \
396 .min_uV = MIN_650_MV, \
413 .min_uV = min, \
430 .min_uV = MIN_3000_MV, \
503 .min_uV = min, \
519 .min_uV = min, \
536 .min_uV = min, \
[all …]
H A Datc260x-regulator.c179 .min_uV = min, \
217 .min_uV = min, \
234 .min_uV = min, \
253 .min_uV = min, \
283 .min_uV = min, \
346 .min_uV = 600000, \
384 .min_uV = 700000, \
403 .min_uV = 2300000, \
446 .min_uV = 2600000, \
H A Dvexpress-regulator.c27 int min_uV, int max_uV, unsigned *selector) in vexpress_regulator_set_voltage() argument
29 return regmap_write(regdev->regmap, 0, min_uV); in vexpress_regulator_set_voltage()
68 if (init_data->constraints.min_uV && init_data->constraints.max_uV) in vexpress_regulator_probe()
/openbmc/linux/drivers/mmc/core/
H A Dregulator.c21 * @min_uV: minimum voltage value (mV)
27 static int mmc_ocrbitnum_to_vdd(int vdd_bit, int *min_uV, int *max_uV) in mmc_ocrbitnum_to_vdd() argument
42 *min_uV = 1650 * 1000; in mmc_ocrbitnum_to_vdd()
45 *min_uV = 1900 * 1000 + tmp * 100 * 1000; in mmc_ocrbitnum_to_vdd()
46 *max_uV = *min_uV + 100 * 1000; in mmc_ocrbitnum_to_vdd()
111 int min_uV, max_uV; in mmc_regulator_set_ocr() local
117 mmc_ocrbitnum_to_vdd(vdd_bit, &min_uV, &max_uV); in mmc_regulator_set_ocr()
119 result = regulator_set_voltage(supply, min_uV, max_uV); in mmc_regulator_set_ocr()
139 int min_uV, int target_uV, in mmc_regulator_set_voltage_if_supported() argument
148 if (!regulator_is_supported_voltage(regulator, min_uV, max_uV)) in mmc_regulator_set_voltage_if_supported()
[all …]
/openbmc/linux/drivers/soc/mediatek/
H A Dmtk-regulator-coupler.c38 int vsram_min_uV = mrc->vsram_rdev->constraints->min_uV; in mediatek_regulator_balance_voltage()
41 int min_uV = 0; in mediatek_regulator_balance_voltage() local
61 ret = regulator_check_consumers(rdev, &min_uV, &max_uV, state); in mediatek_regulator_balance_voltage()
65 if (min_uV == 0) { in mediatek_regulator_balance_voltage()
69 min_uV = ret; in mediatek_regulator_balance_voltage()
72 ret = regulator_check_voltage(rdev, &min_uV, &max_uV); in mediatek_regulator_balance_voltage()
77 * If we're asked to set a voltage less than VSRAM min_uV, set in mediatek_regulator_balance_voltage()
81 vsram_target_min_uV = max(vsram_min_uV, min_uV + max_spread); in mediatek_regulator_balance_voltage()
89 rdev_get_name(mrc->vsram_rdev), min_uV); in mediatek_regulator_balance_voltage()
/openbmc/linux/include/linux/regulator/
H A Dcoupler.h56 int *min_uV, int *max_uV,
59 int *min_uV, int *max_uV);
62 int min_uV, int max_uV,
72 int *min_uV, int *max_uV, in regulator_check_consumers() argument
78 int *min_uV, int *max_uV) in regulator_check_voltage() argument
87 int min_uV, int max_uV, in regulator_set_voltage_rdev() argument
H A Dconsumer.h160 * @min_uV: Min voltage we'll change to.
165 unsigned long min_uV; member
272 int min_uV, int max_uV);
274 int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV);
313 int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV,
531 int min_uV, int max_uV) in regulator_set_voltage() argument
553 int min_uV, int max_uV) in regulator_is_supported_voltage() argument
657 int min_uV, int max_uV, in regulator_set_suspend_voltage() argument
698 int min_uV, int target_uV, in regulator_set_voltage_triplet() argument
704 return regulator_set_voltage(regulator, min_uV, max_uV); in regulator_set_voltage_triplet()
/openbmc/linux/drivers/platform/x86/intel/int3472/
H A Dtps68470_board_data.c46 .min_uV = 1200000,
57 .min_uV = 2815200,
68 .min_uV = 2815200,
80 .min_uV = 1800600,
89 .min_uV = 1800600,
100 .min_uV = 2815200,
111 .min_uV = 1800600,
/openbmc/u-boot/drivers/power/regulator/
H A Dstpmu1.c15 int min_uv; member
33 .min_uv = _min_uv, \
53 return range->min_uv + in stpmu1_output_find_uv()
68 if (uv == range->min_uv && !range->step) in stpmu1_output_find_sel()
71 if (uv >= range->min_uv && in stpmu1_output_find_sel()
72 uv <= range->min_uv + in stpmu1_output_find_sel()
75 (uv - range->min_uv) / range->step; in stpmu1_output_find_sel()
197 if ((uv < uc_pdata->min_uV) || (uv > uc_pdata->max_uV)) in stpmu1_buck_set_enable()
198 stpmu1_buck_set_value(dev, uc_pdata->min_uV); in stpmu1_buck_set_enable()
376 if ((uv < uc_pdata->min_uV) || (uv > uc_pdata->max_uV)) in stpmu1_ldo_set_enable()
[all …]
H A Dpwm_regulator.c50 int min_uV = priv->min_voltage; in pwm_voltage_to_duty_cycle_percentage() local
52 int diff = max_uV - min_uV; in pwm_voltage_to_duty_cycle_percentage()
54 return ((req_uV * 100) - (min_uV * 100)) / diff; in pwm_voltage_to_duty_cycle_percentage()
130 priv->min_voltage = uc_pdata->min_uV; in pwm_regulator_probe()
H A Dregulator-uclass.c56 if (uc_pdata->min_uV != -ENODATA && uV < uc_pdata->min_uV) in regulator_set_value()
242 ret = regulator_set_value(dev, uc_pdata->min_uV); in regulator_autoset()
260 printf("set %d uV", uc_pdata->min_uV); in regulator_show()
369 uc_pdata->min_uV = dev_read_u32_default(dev, "regulator-min-microvolt", in regulator_pre_probe()
383 if ((uc_pdata->min_uV != -ENODATA) && in regulator_pre_probe()
385 (uc_pdata->min_uV == uc_pdata->max_uV)) in regulator_pre_probe()
/openbmc/linux/drivers/pmdomain/qcom/
H A Dcpr.c142 int min_uV; member
201 int min_uV; member
213 int min_uV; member
320 if (cpr_is_allowed(drv) && corner->max_uV > corner->min_uV) in cpr_ctl_enable()
531 if (last_uV <= corner->min_uV) { in cpr_scale()
551 new_uV = max(new_uV, corner->min_uV); in cpr_scale()
877 fdata->min_uV = roundup(fdata->min_uV, step_volt); in cpr_fuse_corner_init()
886 fuse->min_uV = fdata->min_uV; in cpr_fuse_corner_init()
888 fuse->uV = clamp(uV, fuse->min_uV, fuse->max_uV); in cpr_fuse_corner_init()
923 else if (fuse->uV < fuse->min_uV) in cpr_fuse_corner_init()
[all …]

1234567