Lines Matching refs:uvolt
317 int num, int uvolt) in get_buck_reg() argument
325 if (uvolt < 1500000) in get_buck_reg()
327 else if (uvolt < 3400000) in get_buck_reg()
337 if (uvolt <= 1450000) in get_buck_reg()
339 else if (uvolt <= 2200000) in get_buck_reg()
351 if (uvolt < 1500000) in get_buck_reg()
353 else if (uvolt < 2400000) in get_buck_reg()
358 if (uvolt < 1500000) in get_buck_reg()
360 else if (uvolt < 3400000) in get_buck_reg()
366 if (uvolt < 1800000) in get_buck_reg()
368 else if (uvolt < 2800000) in get_buck_reg()
370 else if (uvolt < 3300000) in get_buck_reg()
382 static int _buck_set_value(struct udevice *pmic, int buck, int uvolt) in _buck_set_value() argument
384 const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck, uvolt); in _buck_set_value()
395 val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; in _buck_set_value()
398 __func__, uvolt, buck + 1, info->vsel_reg, mask, val); in _buck_set_value()
476 static int _buck_set_suspend_value(struct udevice *pmic, int buck, int uvolt) in _buck_set_suspend_value() argument
478 const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck, uvolt); in _buck_set_suspend_value()
488 val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; in _buck_set_suspend_value()
491 __func__, uvolt, buck + 1, info->vsel_sleep_reg, mask, val); in _buck_set_suspend_value()
790 int num, int uvolt) in get_ldo_reg() argument
799 if (uvolt < 3400000) in get_ldo_reg()
805 if (uvolt < 3400000) in get_ldo_reg()
1066 static int buck_set_value(struct udevice *dev, int uvolt) in buck_set_value() argument
1070 return _buck_set_value(dev->parent, buck, uvolt); in buck_set_value()
1102 static int buck_set_suspend_value(struct udevice *dev, int uvolt) in buck_set_suspend_value() argument
1106 return _buck_set_suspend_value(dev->parent, buck, uvolt); in buck_set_suspend_value()
1161 static int ldo_set_value(struct udevice *dev, int uvolt) in ldo_set_value() argument
1164 const struct rk8xx_reg_info *info = get_ldo_reg(dev->parent, ldo, uvolt); in ldo_set_value()
1174 val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; in ldo_set_value()
1177 __func__, uvolt, ldo + 1, info->vsel_reg, mask, val); in ldo_set_value()
1182 static int ldo_set_suspend_value(struct udevice *dev, int uvolt) in ldo_set_suspend_value() argument
1185 const struct rk8xx_reg_info *info = get_ldo_reg(dev->parent, ldo, uvolt); in ldo_set_suspend_value()
1195 val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; in ldo_set_suspend_value()
1198 __func__, uvolt, ldo + 1, info->vsel_sleep_reg, mask, val); in ldo_set_suspend_value()
1337 static int switch_set_suspend_value(struct udevice *dev, int uvolt) in switch_set_suspend_value() argument
1469 static int switch_set_value(struct udevice *dev, int uvolt) in switch_set_value() argument
1475 int num, int uvolt) in get_pldo_reg() argument
1481 if (uvolt < 3400000) in get_pldo_reg()
1588 static int pldo_set_value(struct udevice *dev, int uvolt) in pldo_set_value() argument
1591 const struct rk8xx_reg_info *info = get_pldo_reg(dev->parent, ldo, uvolt); in pldo_set_value()
1601 val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; in pldo_set_value()
1604 __func__, uvolt, ldo + 1, info->vsel_reg, mask, val); in pldo_set_value()
1623 static int pldo_set_suspend_value(struct udevice *dev, int uvolt) in pldo_set_suspend_value() argument
1626 const struct rk8xx_reg_info *info = get_pldo_reg(dev->parent, ldo, uvolt);; in pldo_set_suspend_value()
1636 val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; in pldo_set_suspend_value()
1708 int uvolt) in get_boost_reg() argument
1759 static int boost_set_suspend_value(struct udevice *dev, int uvolt) in boost_set_suspend_value() argument
1777 val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; in boost_set_suspend_value()
1780 __func__, uvolt, info->vsel_sleep_reg, mask, val); in boost_set_suspend_value()
1871 static int boost_set_value(struct udevice *dev, int uvolt) in boost_set_value() argument
1890 val = ((uvolt - info->min_uv) / info->step_uv) + info->min_sel; in boost_set_value()
1893 __func__, uvolt, info->vsel_reg, mask, val); in boost_set_value()
2052 int rk8xx_spl_configure_buck(struct udevice *pmic, int buck, int uvolt) in rk8xx_spl_configure_buck() argument
2056 ret = _buck_set_value(pmic, buck, uvolt); in rk8xx_spl_configure_buck()
2074 int rk818_spl_configure_usb_chrg_shutdown(struct udevice *pmic, int uvolt) in rk818_spl_configure_usb_chrg_shutdown() argument
2079 if (uvolt <= rk818_chrg_shutdown_vsel_array[i]) in rk818_spl_configure_usb_chrg_shutdown()