Lines Matching refs:buck
274 static int _buck_set_value(struct udevice *pmic, int buck, int uvolt) in _buck_set_value() argument
276 const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck, uvolt); in _buck_set_value()
290 __func__, uvolt, buck + 1, info->vsel_reg, mask, val); in _buck_set_value()
301 static int _buck_set_enable(struct udevice *pmic, int buck, bool enable) in _buck_set_enable() argument
310 if (buck >= 4) { in _buck_set_enable()
311 buck -= 4; in _buck_set_enable()
317 value = ((1 << buck) | (1 << (buck + 4))); in _buck_set_enable()
319 value = ((0 << buck) | (1 << (buck + 4))); in _buck_set_enable()
325 mask = 1 << buck; in _buck_set_enable()
328 0, 3 << (buck * 2)); in _buck_set_enable()
337 if (buck < 4) { in _buck_set_enable()
339 value = ((1 << buck) | (1 << (buck + 4))); in _buck_set_enable()
341 value = ((0 << buck) | (1 << (buck + 4))); in _buck_set_enable()
360 static int _buck_set_suspend_value(struct udevice *pmic, int buck, int uvolt) in _buck_set_suspend_value() argument
362 const struct rk8xx_reg_info *info = get_buck_reg(pmic, buck, uvolt); in _buck_set_suspend_value()
375 __func__, uvolt, buck + 1, info->vsel_sleep_reg, mask, val); in _buck_set_suspend_value()
380 static int _buck_get_enable(struct udevice *pmic, int buck) in _buck_get_enable() argument
389 if (buck >= 4) { in _buck_get_enable()
390 mask = 1 << (buck - 4); in _buck_get_enable()
393 mask = 1 << buck; in _buck_get_enable()
399 mask = 1 << buck; in _buck_get_enable()
406 if (buck < 4) { in _buck_get_enable()
407 mask = 1 << buck; in _buck_get_enable()
423 static int _buck_set_suspend_enable(struct udevice *pmic, int buck, bool enable) in _buck_set_suspend_enable() argument
432 mask = 1 << buck; in _buck_set_suspend_enable()
438 mask = 1 << buck; in _buck_set_suspend_enable()
444 if (buck < 4) in _buck_set_suspend_enable()
445 mask = 1 << buck; in _buck_set_suspend_enable()
458 static int _buck_get_suspend_enable(struct udevice *pmic, int buck) in _buck_get_suspend_enable() argument
467 mask = 1 << buck; in _buck_get_suspend_enable()
475 mask = 1 << buck; in _buck_get_suspend_enable()
483 if (buck < 4) in _buck_get_suspend_enable()
484 mask = 1 << buck; in _buck_get_suspend_enable()
703 int buck = dev->driver_data - 1; in buck_get_value() local
705 const struct rk8xx_reg_info *info = get_buck_reg(dev->parent, buck, 0); in buck_get_value()
722 int buck = dev->driver_data - 1; in buck_set_value() local
724 return _buck_set_value(dev->parent, buck, uvolt); in buck_set_value()
729 int buck = dev->driver_data - 1; in buck_get_suspend_value() local
731 const struct rk8xx_reg_info *info = get_buck_reg(dev->parent, buck, 0); in buck_get_suspend_value()
749 int buck = dev->driver_data - 1; in buck_set_suspend_value() local
751 return _buck_set_suspend_value(dev->parent, buck, uvolt); in buck_set_suspend_value()
756 int buck = dev->driver_data - 1; in buck_set_enable() local
758 return _buck_set_enable(dev->parent, buck, enable); in buck_set_enable()
763 int buck = dev->driver_data - 1; in buck_set_suspend_enable() local
765 return _buck_set_suspend_enable(dev->parent, buck, enable); in buck_set_suspend_enable()
770 int buck = dev->driver_data - 1; in buck_get_suspend_enable() local
772 return _buck_get_suspend_enable(dev->parent, buck); in buck_get_suspend_enable()
777 int buck = dev->driver_data - 1; in buck_get_enable() local
779 return _buck_get_enable(dev->parent, buck); in buck_get_enable()
1125 int rk8xx_spl_configure_buck(struct udevice *pmic, int buck, int uvolt) in rk8xx_spl_configure_buck() argument
1129 ret = _buck_set_value(pmic, buck, uvolt); in rk8xx_spl_configure_buck()
1133 return _buck_set_enable(pmic, buck, true); in rk8xx_spl_configure_buck()