Searched refs:uV (Results 1 - 25 of 37) sorted by relevance

12

/u-boot/drivers/power/regulator/
H A Dtps65911_regulator.c75 * tps65911_vdd_volt2hex() - convert voltage in uV into
78 * @uV: voltage in uV
82 static int tps65911_vdd_volt2hex(int uV) argument
84 if (uV > TPS65911_VDD_VOLT_MAX)
87 if (uV < TPS65911_VDD_VOLT_MIN)
88 uV = TPS65911_VDD_VOLT_MIN;
90 return (uV - TPS65911_VDD_VOLT_BASE) / 12500;
95 * actual voltage in uV
99 * Return: voltage in uV o
116 tps65911_vio_val(struct udevice *dev, int op, int *uV) argument
146 tps65911_vdd_val(struct udevice *dev, int op, int *uV) argument
211 int uV; local
221 vdd_set_value(struct udevice *dev, int uV) argument
249 tps65911_ldo_volt2hex(int idx, int uV) argument
321 tps65911_ldo_val(struct udevice *dev, int op, int *uV) argument
368 int uV; local
378 ldo_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dmax77663_regulator.c54 * max77663_*_volt2hex() - convert voltage in uV into
58 * @uV: voltage in uV
62 static int max77663_sd_volt2hex(int idx, int uV) argument
67 if (uV > SD0_VOLT_MAX)
72 if (uV > SD1_VOLT_MAX)
77 if (uV > SD_VOLT_MAX)
82 if (uV < SD_VOLT_MIN)
83 uV = SD_VOLT_MIN;
85 return (uV
123 max77663_sd_val(struct udevice *dev, int op, int *uV) argument
169 int uV; local
179 sd_set_value(struct udevice *dev, int uV) argument
247 max77663_ldo_volt2hex(int idx, int uV) argument
285 max77663_ldo_val(struct udevice *dev, int op, int *uV) argument
331 int uV; local
341 ldo_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dlp873x_regulator.c57 static int lp873x_buck_volt2hex(int uV) argument
59 if (uV > LP873X_BUCK_VOLT_MAX)
61 else if (uV > 1400000)
62 return (uV - 1420000) / 20000 + 0x9E;
63 else if (uV > 730000)
64 return (uV - 735000) / 5000 + 0x18;
65 else if (uV >= 700000)
66 return (uV - 700000) / 10000 + 0x1;
85 static int lp873x_buck_val(struct udevice *dev, int op, int *uV) argument
94 *uV
160 lp873x_ldo_volt2hex(int uV) argument
179 lp873x_ldo_val(struct udevice *dev, int op, int *uV) argument
240 int uV; local
250 ldo_set_value(struct udevice *dev, int uV) argument
294 int uV; local
304 buck_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dtps65941_regulator.c45 int (*volt2val)(int idx, int uV);
100 static int tps65941_buck_volt2val(__maybe_unused int idx, int uV) argument
102 if (uV > TPS65941_BUCK_VOLT_MAX)
104 else if (uV > 1650000)
105 return (uV - 1660000) / 20000 + 0xAB;
106 else if (uV > 1110000)
107 return (uV - 1110000) / 10000 + 0x73;
108 else if (uV > 600000)
109 return (uV - 600000) / 5000 + 0x0F;
110 else if (uV >
156 tps65224_buck_volt2val(int idx, int uV) argument
279 tps65941_buck_val(struct udevice *dev, int op, int *uV) argument
402 tps65224_ldo_volt2val(int idx, int uV) argument
473 tps65941_ldo_val(struct udevice *dev, int op, int *uV) argument
637 int uV; local
647 ldo_set_value(struct udevice *dev, int uV) argument
671 int uV; local
681 buck_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dtps65219_regulator.c74 static int tps65219_buck_volt2val(int uV) argument
76 if (uV > TPS65219_BUCK_VOLT_MAX)
78 else if (uV >= 1400000)
79 return (uV - 1400000) / 100000 + 0x20;
80 else if (uV >= 600000)
81 return (uV - 600000) / 25000 + 0x00;
100 static int tps65219_buck_val(struct udevice *dev, int op, int *uV) argument
114 *uV = 0;
121 *uV = ret;
125 val = tps65219_buck_volt2val(*uV);
152 tps65219_ldo_volt2val(int idx, int uV) argument
196 tps65219_ldo_val(struct udevice *dev, int op, int *uV) argument
287 int uV; local
297 ldo_set_value(struct udevice *dev, int uV) argument
321 int uV; local
331 buck_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dtps80031_regulator.c72 * tps80031_ldo_volt2hex() - convert voltage in uV into
75 * @uV: voltage in uV
79 static int tps80031_ldo_volt2hex(int uV) argument
81 if (uV > LDO_VOLT_MAX)
84 if (uV < LDO_VOLT_MIN)
85 uV = LDO_VOLT_MIN;
87 return DIV_ROUND_UP(uV - LDO_VOLT_BASE, 102000);
92 * actual voltage in uV
96 * Return: voltage in uV o
109 tps80031_ldo_val(struct udevice *dev, int op, int *uV) argument
172 int uV; local
182 ldo_set_value(struct udevice *dev, int uV) argument
219 tps80031_smps_volt2hex(u32 base, int uV) argument
258 tps80031_smps_val(struct udevice *dev, int op, int *uV) argument
319 int uV; local
329 smps_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dlp87565_regulator.c56 static int lp87565_buck_volt2val(int uV) argument
58 if (uV > LP87565_BUCK_VOLT_MAX)
60 else if (uV > 1400000)
61 return (uV - 1420000) / 20000 + 0x9E;
62 else if (uV > 730000)
63 return (uV - 735000) / 5000 + 0x18;
64 else if (uV >= 500000)
65 return (uV - 500000) / 10000;
84 static int lp87565_buck_val(struct udevice *dev, int op, int *uV) argument
93 *uV
151 int uV; local
161 buck_set_value(struct udevice *dev, int uV) argument
[all...]
H A Ds2mps11_regulator.c47 unsigned int uV = 0; local
59 uV = hex * S2MPS11_BUCK_HSTEP + S2MPS11_BUCK_UV_HMIN;
64 uV = hex * S2MPS11_BUCK9_STEP * 2 + S2MPS11_BUCK9_UV_MIN;
72 uV = hex * S2MPS11_BUCK_LSTEP + S2MPS11_BUCK_UV_MIN;
76 return uV;
82 static int s2mps11_buck_volt2hex(int buck, int uV) argument
90 hex = (uV - S2MPS11_BUCK_UV_HMIN) / S2MPS11_BUCK_HSTEP;
96 hex = (uV - S2MPS11_BUCK9_UV_MIN) / S2MPS11_BUCK9_STEP;
101 hex = (uV - S2MPS11_BUCK_UV_MIN) / S2MPS11_BUCK_LSTEP;
113 pr_err("Value: %d uV i
117 s2mps11_buck_val(struct udevice *dev, int op, int *uV) argument
259 int uV; local
268 buck_set_value(struct udevice *dev, int uV) argument
337 unsigned int uV = 0; local
362 s2mps11_ldo_volt2hex(int ldo, int uV) argument
390 s2mps11_ldo_val(struct udevice *dev, int op, int *uV) argument
527 int uV; local
537 ldo_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dmax77686.c69 static int max77686_buck_volt2hex(int buck, int uV) argument
78 /* hex = (uV - 600000) / 12500; */
79 hex = (uV - MAX77686_BUCK_UV_LMIN) / MAX77686_BUCK_UV_LSTEP;
84 * hex = (uV - 750000) / 50000. We assume that dynamic voltage
90 hex = (uV - MAX77686_BUCK_UV_HMIN) / MAX77686_BUCK_UV_HSTEP;
98 pr_err("Value: %d uV is wrong for BUCK%d", uV, buck);
104 unsigned uV = 0; local
118 /* uV = hex * 12500 + 600000; */
119 uV
138 max77686_ldo_volt2hex(int ldo, int uV) argument
166 unsigned int uV = 0; local
317 max77686_ldo_val(struct udevice *dev, int op, int *uV) argument
358 max77686_buck_val(struct udevice *dev, int op, int *uV) argument
673 int uV; local
683 ldo_set_value(struct udevice *dev, int uV) argument
737 int uV; local
747 buck_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dpalmas_regulator.c85 static int palmas_smps_volt2hex(int uV) argument
87 if (uV > PALMAS_LDO_VOLT_MAX)
90 if (uV > 1650000)
91 return (uV - 1000000) / 20000 + 0x6;
93 if (uV == 500000)
96 return 0x6 + ((uV - 500000) / 10000);
101 unsigned int uV = 0; local
107 uV = 500000;
109 uV = 500000 + (hex - 0x6) * 10000;
112 uV *
117 palmas_smps_val(struct udevice *dev, int op, int *uV) argument
234 palmas_ldo_volt2hex(int uV) argument
253 palmas_ldo_val(struct udevice *dev, int op, int *uV) argument
328 int uV; local
338 ldo_set_value(struct udevice *dev, int uV) argument
435 int uV; local
445 smps_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dtps62360_regulator.c17 #define TPS62360_VSEL_STEPSIZE 10000 /* In uV */
44 static int tps62360_regulator_set_value(struct udevice *dev, int uV) argument
49 if (uV < pdata->config->vmin || uV > pdata->config->vmax)
52 uV -= pdata->config->vmin;
54 uV = DIV_ROUND_UP(uV, TPS62360_VSEL_STEPSIZE);
56 if (uV > U8_MAX)
59 regval = (u8)uV;
H A Dtps65910_regulator.c23 * @vin_min[]: minimum supply input voltage in uV required to achieve the
25 * @vout[]: regulator output voltage in uV
194 int uV)
202 if (uV == *(ldo->vout + sel))
218 static int tps65910_ldo_set_value(struct udevice *dev, int uV) argument
230 return tps65910_regulator_set_value(dev, &ldo_props_vdig1, uV);
232 return tps65910_regulator_set_value(dev, &ldo_props_vdig2, uV);
234 return tps65910_regulator_set_value(dev, &ldo_props_vpll, uV);
236 return tps65910_regulator_set_value(dev, &ldo_props_vdac, uV);
238 return tps65910_regulator_set_value(dev, &ldo_props_vaux1, uV);
192 tps65910_regulator_set_value(struct udevice *dev, const struct regulator_props *ldo, int uV) argument
323 buck_set_vdd1_vdd2_value(struct udevice *dev, int uV) argument
371 tps65910_buck_set_value(struct udevice *dev, int uV) argument
[all...]
H A Dnpcm8xx_regulator.c14 /* Supported voltage levels (uV) */
57 static int npcm8xx_regulator_set_value(struct udevice *dev, int uV) argument
67 dev_dbg(dev, "%s set_value: %d\n", uc_pdata->name, uV);
72 if (uV == supp->volts[VOLT_LEV0])
74 else if (uV == supp->volts[VOLT_LEV1])
H A Dregulator-uclass.c47 debug("regulator %s: delay %u us (%d uV -> %d uV)\n", dev->name, delay,
53 int regulator_set_value(struct udevice *dev, int uV) argument
57 int ret, old_uV = uV, is_enabled = 0;
60 if (uc_pdata->min_uV != -ENODATA && uV < uc_pdata->min_uV)
62 if (uc_pdata->max_uV != -ENODATA && uV > uc_pdata->max_uV)
73 ret = ops->set_value(dev, uV);
77 regulator_set_value_ramp_delay(dev, old_uV, uV,
84 int regulator_set_suspend_value(struct udevice *dev, int uV) argument
90 if (uc_pdata->min_uV != -ENODATA && uV < uc_pdat
115 regulator_set_value_force(struct udevice *dev, int uV) argument
181 int uV = regulator_get_value(dev); local
[all...]
H A Dpfuze100.c447 static int pfuze100_regulator_val(struct udevice *dev, int op, int *uV) argument
457 *uV = 0;
459 *uV = desc->voltage;
465 *uV = desc->volt_table[val];
475 *uV = uc_pdata->min_uV + (int)val * desc->uV_step;
486 if (*uV == desc->volt_table[i])
490 debug("Unsupported voltage %u\n", *uV);
503 (*uV - uc_pdata->min_uV) / desc->uV_step);
511 int uV; local
514 ret = pfuze100_regulator_val(dev, PMIC_OP_GET, &uV);
521 pfuze100_regulator_set_value(struct udevice *dev, int uV) argument
[all...]
H A Danatop_regulator.c118 static int anatop_set_voltage(struct udevice *dev, int uV) argument
125 dev_dbg(dev, "uv %d, min %d, max %d\n", uV, anatop_reg->min_voltage,
128 if (uV < anatop_reg->min_voltage)
134 sel = DIV_ROUND_UP(uV - anatop_reg->min_voltage,
144 uV + MIN_DROPOUT_UV);
H A Dfan53555.c24 * @vsel_min: starting voltage (step 0) in uV
25 * @vsel_step: increment of the voltage in uV
150 debug("%s: %d uV\n", __func__, voltage);
154 static int fan53555_regulator_set_value(struct udevice *dev, int uV) argument
160 vol = (uV - priv->vsel_min) / priv->vsel_step;
161 debug("%s: uV=%d; writing volume %d: %02x\n",
162 __func__, uV, pdata->vol_reg, vol);
H A Dgpio-regulator.c103 static int gpio_regulator_set_value(struct udevice *dev, int uV) argument
112 if (uV == plat->voltages[0])
114 else if (uV == plat->voltages[1])
/u-boot/drivers/misc/
H A Drockchip-io-domain.c45 int (*write)(struct regmap *grf, uint offset, int idx, int uV);
48 static int rk3568_iodomain_write(struct regmap *grf, uint offset, int idx, int uV) argument
50 u32 is_3v3 = uV > MAX_VOLTAGE_1_8;
88 static int rockchip_iodomain_write(struct regmap *grf, uint offset, int idx, int uV) argument
93 val = (uV > MAX_VOLTAGE_1_8) ? 0 : 1;
102 static int rk3328_iodomain_write(struct regmap *grf, uint offset, int idx, int uV) argument
104 int ret = rockchip_iodomain_write(grf, offset, idx, uV);
118 static int rk3399_pmu_iodomain_write(struct regmap *grf, uint offset, int idx, int uV) argument
120 int ret = rockchip_iodomain_write(grf, offset, idx, uV);
238 int uV; local
[all...]
/u-boot/include/power/
H A Dregulator.h159 * @ramp_delay - Time to settle down after voltage change (unit: uV/us)
200 * @uV - set the output value [micro Volts]
201 * @return output value [uV] on success or negative errno if fail.
204 int (*set_value)(struct udevice *dev, int uV);
213 * @uV - set the suspend output value [micro Volts]
214 * @return output value [uV] on success or negative errno if fail.
216 int (*set_suspend_value)(struct udevice *dev, int uV);
288 * Return: - positive output value [uV] on success or negative errno if fail.
296 * @uV - the output value to set [micro Volts]
299 int regulator_set_value(struct udevice *dev, int uV);
567 regulator_set_value(struct udevice *dev, int uV) argument
572 regulator_set_suspend_value(struct udevice *dev, int uV) argument
582 regulator_set_value_force(struct udevice *dev, int uV) argument
[all...]
/u-boot/include/
H A Dadc.h270 * the returned uV value can be negative, and it's not an error.
273 * @uV: Voltage value with polarization sign (uV)
276 int adc_vdd_value(struct udevice *dev, int *uV);
282 * the returned uV value can be negative, and it's not an error.
285 * @uV: Voltage value with polarization sign (uV)
288 int adc_vss_value(struct udevice *dev, int *uV);
303 * @uV: converted value in microvolts
306 int adc_raw_to_uV(struct udevice *dev, unsigned int raw, int *uV);
[all...]
/u-boot/cmd/
H A Dadc.c74 int ret, uV, val; local
91 if (!ret && !adc_raw_to_uV(dev, data, &uV)) {
92 val = uV;
93 printf("%u, %d uV\n", data, uV);
111 int i, chan, ret, uV; local
146 if (!adc_raw_to_uV(dev, ch[i].data, &uV))
147 printf("[%02d]: %u, %d uV\n", ch[i].id, ch[i].data, uV);
/u-boot/test/dm/
H A Dadc.c53 int uV; local
57 /* Test Vss value - predefined 0 uV */
58 ut_assertok(adc_vss_value(dev, &uV));
59 ut_asserteq(SANDBOX_ADC_VSS_VALUE, uV);
62 ut_assertok(adc_vdd_value(dev, &uV));
63 ut_asserteq(SANDBOX_BUCK2_INITIAL_EXPECTED_UV, uV);
71 ut_assertok(adc_vdd_value(dev, &uV));
72 ut_asserteq(SANDBOX_BUCK2_SET_UV, uV);
185 int uV; local
192 ut_assertok(adc_raw_to_uV(dev, data, &uV));
[all...]
/u-boot/drivers/button/
H A Dbutton-adc.c22 * @min: minimal uV value to consider button as pressed.
23 * @max: maximal uV value to consider button as pressed.
36 int ret, uV; local
46 ret = adc_raw_to_uV(priv->adc, val, &uV);
50 return (uV >= priv->min && uV < priv->max) ? BUTTON_ON : BUTTON_OFF;
/u-boot/drivers/adc/
H A Dadc-uclass.c311 int adc_vdd_value(struct udevice *dev, int *uV) argument
324 *uV = uc_pdata->vdd_microvolts * value_sign;
329 int adc_vss_value(struct udevice *dev, int *uV) argument
342 *uV = uc_pdata->vss_microvolts * value_sign;
347 int adc_raw_to_uV(struct udevice *dev, unsigned int raw, int *uV) argument
366 *uV = raw64;
424 /* Set ADC VDD plat: polarity, uV, regulator (phandle). */
429 /* Set ADC VSS plat: polarity, uV, regulator (phandle). */

Completed in 116 milliseconds

12