| /drivers/soc/rockchip/ |
| A D | io-domain.c | 89 u32 is_3v3 = uV > MAX_VOLTAGE_1_8; in rk3568_iodomain_write() 128 int uV) in rockchip_iodomain_write() argument 154 int uV; in rockchip_iodomain_notify() local 176 uV = (unsigned long)data; in rockchip_iodomain_notify() 183 if (uV > MAX_VOLTAGE_3_3) { in rockchip_iodomain_notify() 654 int uV; in rockchip_iodomain_probe() local 676 if (uV < 0) { in rockchip_iodomain_probe() 679 ret = uV; in rockchip_iodomain_probe() 683 if (uV > MAX_VOLTAGE_3_3) { in rockchip_iodomain_probe() 686 uV); in rockchip_iodomain_probe() [all …]
|
| /drivers/regulator/ |
| A D | qcom_rpm-regulator.c | 58 int uV; member 213 int uV; in rpm_reg_set_mV_sel() local 219 if (uV < 0) in rpm_reg_set_mV_sel() 220 return uV; in rpm_reg_set_mV_sel() 227 vreg->uV = uV; in rpm_reg_set_mV_sel() 240 int uV; in rpm_reg_set_uV_sel() local 246 if (uV < 0) in rpm_reg_set_uV_sel() 247 return uV; in rpm_reg_set_uV_sel() 251 ret = rpm_reg_write(vreg, req, uV); in rpm_reg_set_uV_sel() 254 vreg->uV = uV; in rpm_reg_set_uV_sel() [all …]
|
| A D | sun20i-regulator.c | 26 unsigned int fraction, uV; in sun20i_d1_system_ldo_list_voltage() local 31 uV = desc->min_uV + (desc->uV_step * selector); in sun20i_d1_system_ldo_list_voltage() 34 if (uV > 1606667) in sun20i_d1_system_ldo_list_voltage() 35 uV += 6667; in sun20i_d1_system_ldo_list_voltage() 40 return uV + (fraction / 3); in sun20i_d1_system_ldo_list_voltage()
|
| A D | qcom_spmi-regulator.c | 673 int uV = min_uV; in spmi_regulator_select_voltage() local 683 uV = lim_min_uV; in spmi_regulator_select_voltage() 685 if (uV < lim_min_uV || uV > lim_max_uV) { in spmi_regulator_select_voltage() 709 if (uV > max_uV) { in spmi_regulator_select_voltage() 810 int uV = min_uV; in spmi_regulator_select_voltage_same_range() local 820 if (uV < range->min_uV || uV > range->max_uV) { in spmi_regulator_select_voltage_same_range() 829 uV = DIV_ROUND_UP(uV - range->min_uV, range->step_uV); in spmi_regulator_select_voltage_same_range() 830 uV = uV * range->step_uV + range->min_uV; in spmi_regulator_select_voltage_same_range() 940 int uV; in spmi_regulator_ftsmps426_get_voltage() local 1031 int uV = 0; in spmi_regulator_common_list_voltage() local [all …]
|
| A D | ltc3676.c | 73 static int ltc3676_set_suspend_voltage(struct regulator_dev *rdev, int uV) in ltc3676_set_suspend_voltage() argument 80 dev_dbg(dev, "%s id=%d uV=%d\n", __func__, dcdc, uV); in ltc3676_set_suspend_voltage() 81 sel = regulator_map_voltage_linear(rdev, uV, uV); in ltc3676_set_suspend_voltage() 135 static inline unsigned int ltc3676_scale(unsigned int uV, u32 r1, u32 r2) in ltc3676_scale() argument 138 if (uV == 0) in ltc3676_scale() 140 tmp = (uint64_t)uV * r1; in ltc3676_scale() 142 return uV + (unsigned int)tmp; in ltc3676_scale()
|
| A D | ltc3589.c | 97 static int ltc3589_set_suspend_voltage(struct regulator_dev *rdev, int uV) in ltc3589_set_suspend_voltage() argument 102 sel = regulator_map_voltage_linear(rdev, uV, uV); in ltc3589_set_suspend_voltage() 163 static inline unsigned int ltc3589_scale(unsigned int uV, u32 r1, u32 r2) in ltc3589_scale() argument 167 if (uV == 0) in ltc3589_scale() 170 tmp = (uint64_t)uV * r1; in ltc3589_scale() 172 return uV + (unsigned int)tmp; in ltc3589_scale()
|
| A D | vctrl-regulator.c | 100 int uV; in vctrl_set_voltage() local 107 uV = vctrl_calc_output_voltage(vctrl, orig_ctrl_uV); in vctrl_set_voltage() 109 if (req_min_uV >= uV || !vctrl->ovp_threshold) in vctrl_set_voltage() 116 while (uV > req_min_uV) { in vctrl_set_voltage() 117 int max_drop_uV = (uV * vctrl->ovp_threshold) / 100; in vctrl_set_voltage() 126 next_uV = max_t(int, req_min_uV, uV - max_drop_uV); in vctrl_set_voltage() 136 delay = DIV_ROUND_UP(uV - next_uV, vctrl->min_slew_down_rate); in vctrl_set_voltage() 139 uV = next_uV; in vctrl_set_voltage()
|
| A D | pf8x00-regulator.c | 302 static int pf8x00_set_suspend_voltage(struct regulator_dev *rdev, int uV) in pf8x00_set_suspend_voltage() argument 307 if (regl->suspend_voltage_cache == uV) in pf8x00_set_suspend_voltage() 310 ret = regulator_map_voltage_iterate(rdev, uV, uV); in pf8x00_set_suspend_voltage() 312 dev_err(rdev_get_dev(rdev), "failed to map %i uV\n", uV); in pf8x00_set_suspend_voltage() 317 uV, regl->suspend_voltage_reg, regl->desc.vsel_mask, ret); in pf8x00_set_suspend_voltage() 321 dev_err(rdev_get_dev(rdev), "failed to set %i uV\n", uV); in pf8x00_set_suspend_voltage() 325 regl->suspend_voltage_cache = uV; in pf8x00_set_suspend_voltage()
|
| A D | wm831x-ldo.c | 66 int uV) in wm831x_gp_ldo_set_suspend_voltage() argument 72 sel = regulator_map_voltage_linear_range(rdev, uV, uV); in wm831x_gp_ldo_set_suspend_voltage() 320 int uV) in wm831x_aldo_set_suspend_voltage() argument 326 sel = regulator_map_voltage_linear_range(rdev, uV, uV); in wm831x_aldo_set_suspend_voltage() 527 int uV) in wm831x_alive_ldo_set_suspend_voltage() argument 533 sel = regulator_map_voltage_linear(rdev, uV, uV); in wm831x_alive_ldo_set_suspend_voltage()
|
| A D | vexpress-regulator.c | 20 unsigned int uV; in vexpress_regulator_get_voltage() local 21 int err = regmap_read(regdev->regmap, 0, &uV); in vexpress_regulator_get_voltage() 23 return err ? err : uV; in vexpress_regulator_get_voltage()
|
| A D | max8925-regulator.c | 102 static int max8925_set_dvm_voltage(struct regulator_dev *rdev, int uV) in max8925_set_dvm_voltage() argument 107 if (uV < SD1_DVM_VMIN || uV > SD1_DVM_VMAX) in max8925_set_dvm_voltage() 110 data = DIV_ROUND_UP(uV - SD1_DVM_VMIN, SD1_DVM_STEP); in max8925_set_dvm_voltage()
|
| A D | rt5739.c | 100 static int rt5739_set_suspend_voltage(struct regulator_dev *rdev, int uV) in rt5739_set_suspend_voltage() argument 109 if (uV < desc->min_uV || uV > max_uV) in rt5739_set_suspend_voltage() 117 vsel = (uV - desc->min_uV) / desc->uV_step; in rt5739_set_suspend_voltage()
|
| A D | qcom-pm8008-regulator.c | 88 unsigned int uV; in pm8008_regulator_get_voltage_sel() local 97 uV = le16_to_cpu(val) * 1000; in pm8008_regulator_get_voltage_sel() 99 return (uV - preg->desc.min_uV) / preg->desc.uV_step; in pm8008_regulator_get_voltage_sel()
|
| A D | rt5120-regulator.c | 128 static int rt5120_buck1_set_suspend_voltage(struct regulator_dev *rdev, int uV) in rt5120_buck1_set_suspend_voltage() argument 133 if (uV < RT5120_BUCK1_MINUV || uV > RT5120_BUCK1_MAXUV) in rt5120_buck1_set_suspend_voltage() 136 sel = (uV - RT5120_BUCK1_MINUV) / RT5120_BUCK1_STEPUV; in rt5120_buck1_set_suspend_voltage()
|
| A D | rt6160-regulator.c | 132 static int rt6160_set_suspend_voltage(struct regulator_dev *rdev, int uV) in rt6160_set_suspend_voltage() argument 138 vsel = regulator_map_voltage_linear(rdev, uV, uV); in rt6160_set_suspend_voltage()
|
| A D | wm8350-regulator.c | 263 static int wm8350_dcdc_set_suspend_voltage(struct regulator_dev *rdev, int uV) in wm8350_dcdc_set_suspend_voltage() argument 269 dev_dbg(wm8350->dev, "%s %d mV %d\n", __func__, dcdc, uV / 1000); in wm8350_dcdc_set_suspend_voltage() 290 sel = regulator_map_voltage_linear(rdev, uV, uV); in wm8350_dcdc_set_suspend_voltage() 478 static int wm8350_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) in wm8350_ldo_set_suspend_voltage() argument 484 dev_dbg(wm8350->dev, "%s %d mV %d\n", __func__, ldo, uV / 1000); in wm8350_ldo_set_suspend_voltage() 503 sel = regulator_map_voltage_linear_range(rdev, uV, uV); in wm8350_ldo_set_suspend_voltage()
|
| A D | wm831x-dcdc.c | 277 int uV) in wm831x_buckv_set_suspend_voltage() argument 284 vsel = regulator_map_voltage_linear_range(rdev, uV, uV); in wm831x_buckv_set_suspend_voltage() 516 static int wm831x_buckp_set_suspend_voltage(struct regulator_dev *rdev, int uV) in wm831x_buckp_set_suspend_voltage() argument 523 sel = regulator_map_voltage_linear(rdev, uV, uV); in wm831x_buckp_set_suspend_voltage()
|
| A D | fan53555.c | 154 static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV) in fan53555_set_suspend_voltage() argument 159 if (di->sleep_vol_cache == uV) in fan53555_set_suspend_voltage() 161 ret = regulator_map_voltage_linear(rdev, uV, uV); in fan53555_set_suspend_voltage() 170 di->sleep_vol_cache = uV; in fan53555_set_suspend_voltage()
|
| A D | rtq2134-regulator.c | 111 static int rtq2134_buck_set_suspend_voltage(struct regulator_dev *rdev, int uV) in rtq2134_buck_set_suspend_voltage() argument 117 sel = regulator_map_voltage_linear_range(rdev, uV, uV); in rtq2134_buck_set_suspend_voltage()
|
| A D | rt4803.c | 108 static int rt4803_set_suspend_voltage(struct regulator_dev *rdev, int uV) in rt4803_set_suspend_voltage() argument 118 vsel = (uV - rdev->desc->min_uV) / rdev->desc->uV_step; in rt4803_set_suspend_voltage()
|
| /drivers/pmdomain/qcom/ |
| A D | cpr.c | 204 int uV; member 216 int uV; member 778 new_uV = corner->uV; in cpr_set_performance_state() 852 int uV; in cpr_fuse_corner_init() local 879 if (uV < 0) in cpr_fuse_corner_init() 880 return uV; in cpr_fuse_corner_init() 884 fuse->uV = clamp(uV, fuse->min_uV, fuse->max_uV); in cpr_fuse_corner_init() 995 uV_high = fuse->uV; in cpr_interpolate() 1005 return corner->uV; in cpr_interpolate() 1175 corner->uV = fuse->uV; in cpr_corner_init() [all …]
|
| /drivers/pinctrl/sunxi/ |
| A D | pinctrl-sunxi.c | 703 int uV; in sunxi_pinctrl_set_io_bias_cfg() local 708 uV = regulator_get_voltage(supply); in sunxi_pinctrl_set_io_bias_cfg() 709 if (uV < 0) in sunxi_pinctrl_set_io_bias_cfg() 710 return uV; in sunxi_pinctrl_set_io_bias_cfg() 713 if (uV == 0) in sunxi_pinctrl_set_io_bias_cfg() 725 if (uV <= 1800000) in sunxi_pinctrl_set_io_bias_cfg() 727 else if (uV <= 2500000) in sunxi_pinctrl_set_io_bias_cfg() 729 else if (uV <= 2800000) in sunxi_pinctrl_set_io_bias_cfg() 731 else if (uV <= 3000000) in sunxi_pinctrl_set_io_bias_cfg() 741 val = uV > 1800000 && uV <= 2500000 ? BIT(bank) : 0; in sunxi_pinctrl_set_io_bias_cfg() [all …]
|
| /drivers/power/supply/ |
| A D | charger-manager.c | 188 static int get_batt_uV(struct charger_manager *cm, int *uV) in get_batt_uV() argument 204 *uV = val.intval; in get_batt_uV() 288 int uV; in is_full_charged() local 300 ret = get_batt_uV(cm, &uV); in is_full_charged() 305 uV += desc->fullbatt_vchkdrop_uV; in is_full_charged() 306 if (uV >= desc->fullbatt_uV) in is_full_charged() 720 int uV; in charger_get_property() local 787 ret = get_batt_uV(cm, &uV); in charger_get_property() 794 if (desc->fullbatt_uV > 0 && uV >= desc->fullbatt_uV && in charger_get_property()
|
| /drivers/opp/ |
| A D | core.c | 338 } *uV; in dev_pm_opp_get_max_volt_latency() local 350 uV = kmalloc_array(count, sizeof(*uV), GFP_KERNEL); in dev_pm_opp_get_max_volt_latency() 351 if (!uV) in dev_pm_opp_get_max_volt_latency() 356 uV[i].min = ~0; in dev_pm_opp_get_max_volt_latency() 357 uV[i].max = 0; in dev_pm_opp_get_max_volt_latency() 363 if (opp->supplies[i].u_volt_min < uV[i].min) in dev_pm_opp_get_max_volt_latency() 364 uV[i].min = opp->supplies[i].u_volt_min; in dev_pm_opp_get_max_volt_latency() 365 if (opp->supplies[i].u_volt_max > uV[i].max) in dev_pm_opp_get_max_volt_latency() 366 uV[i].max = opp->supplies[i].u_volt_max; in dev_pm_opp_get_max_volt_latency() 377 ret = regulator_set_voltage_time(reg, uV[i].min, uV[i].max); in dev_pm_opp_get_max_volt_latency() [all …]
|
| /drivers/remoteproc/ |
| A D | qcom_q6v5_mss.c | 144 int uV; member 150 int uV; member 286 regs[i].uV = reg_res[i].uV; in q6v5_regulator_init() 331 if (regs[i].uV > 0) in q6v5_regulator_enable() 349 if (regs[i].uV > 0) in q6v5_regulator_disable() 2465 .uV = 1050000, 2544 .uV = 1050000, 2558 .uV = 1050000, 2597 .uV = 1050000, 2635 .uV = 1050000, [all …]
|