Lines Matching refs:uV
74 static int tps65219_buck_volt2val(int uV)
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)
114 *uV = 0;
121 *uV = ret;
125 val = tps65219_buck_volt2val(*uV);
152 static int tps65219_ldo_volt2val(int idx, int uV)
162 if (uV > max)
164 else if (uV >= base)
165 return (uV - TPS65219_LDO12_VOLT_MIN) / 50000;
196 static int tps65219_ldo_val(struct udevice *dev, int op, int *uV)
212 *uV = 0;
219 *uV = ret;
226 *uV < TPS65219_LDO12_VOLT_BYP_MIN)
229 val = tps65219_ldo_volt2val(idx, *uV);
287 int uV;
290 ret = tps65219_ldo_val(dev, PMIC_OP_GET, &uV);
294 return uV;
297 static int ldo_set_value(struct udevice *dev, int uV)
299 return tps65219_ldo_val(dev, PMIC_OP_SET, &uV);
321 int uV;
324 ret = tps65219_buck_val(dev, PMIC_OP_GET, &uV);
328 return uV;
331 static int buck_set_value(struct udevice *dev, int uV)
333 return tps65219_buck_val(dev, PMIC_OP_SET, &uV);