/drivers/soc/rockchip/ |
D | io-domain.c | 71 int (*write)(struct rockchip_iodomain_supply *supply, int uV); 79 int (*write)(struct rockchip_iodomain_supply *supply, int uV); 82 static int rk3568_iodomain_write(struct rockchip_iodomain_supply *supply, int uV) in rk3568_iodomain_write() argument 85 u32 is_3v3 = uV > MAX_VOLTAGE_1_8; in rk3568_iodomain_write() 124 int uV) in rockchip_iodomain_write() argument 131 val = (uV > MAX_VOLTAGE_1_8) ? 0 : 1; in rockchip_iodomain_write() 150 int uV; in rockchip_iodomain_notify() local 169 uV = max_t(unsigned long, pvc_data->old_uV, pvc_data->max_uV); in rockchip_iodomain_notify() 172 uV = (unsigned long)data; in rockchip_iodomain_notify() 177 dev_dbg(supply->iod->dev, "Setting to %d\n", uV); in rockchip_iodomain_notify() [all …]
|
/drivers/regulator/ |
D | qcom_rpm-regulator.c | 28 struct request_member uV; /* used if voltage is in uV */ member 58 int uV; member 108 .uV = { 0, 0x007FFFFF, 0 }, 119 .uV = { 0, 0x007FFFFF, 0 }, 142 .uV = { 0, 0x007FFFFF, 0 }, 213 int uV; in rpm_reg_set_mV_sel() local 218 uV = regulator_list_voltage_linear_range(rdev, selector); in rpm_reg_set_mV_sel() 219 if (uV < 0) in rpm_reg_set_mV_sel() 220 return uV; in rpm_reg_set_mV_sel() 224 ret = rpm_reg_write(vreg, req, uV / 1000); in rpm_reg_set_mV_sel() [all …]
|
D | qcom_spmi-regulator.c | 614 int uV = min_uV; in spmi_regulator_select_voltage() local 623 if (uV < lim_min_uV && max_uV >= lim_min_uV) in spmi_regulator_select_voltage() 624 uV = lim_min_uV; in spmi_regulator_select_voltage() 626 if (uV < lim_min_uV || uV > lim_max_uV) { in spmi_regulator_select_voltage() 636 if (uV > range_max_uV && range_max_uV > 0) in spmi_regulator_select_voltage() 647 voltage_sel = DIV_ROUND_UP(uV - range->min_uV, range->step_uV); in spmi_regulator_select_voltage() 648 uV = voltage_sel * range->step_uV + range->min_uV; in spmi_regulator_select_voltage() 650 if (uV > max_uV) { in spmi_regulator_select_voltage() 654 min_uV, max_uV, uV); in spmi_regulator_select_voltage() 661 selector += (uV - range->set_point_min_uV) / range->step_uV; in spmi_regulator_select_voltage() [all …]
|
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()
|
D | ltc3589.c | 100 static int ltc3589_set_suspend_voltage(struct regulator_dev *rdev, int uV) in ltc3589_set_suspend_voltage() argument 105 sel = regulator_map_voltage_linear(rdev, uV, uV); in ltc3589_set_suspend_voltage() 166 static inline unsigned int ltc3589_scale(unsigned int uV, u32 r1, u32 r2) in ltc3589_scale() argument 170 if (uV == 0) in ltc3589_scale() 173 tmp = (uint64_t)uV * r1; in ltc3589_scale() 175 return uV + (unsigned int)tmp; in ltc3589_scale()
|
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()
|
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()
|
D | vexpress-regulator.c | 19 unsigned int uV; in vexpress_regulator_get_voltage() local 20 int err = regmap_read(regdev->regmap, 0, &uV); in vexpress_regulator_get_voltage() 22 return err ? err : uV; in vexpress_regulator_get_voltage()
|
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() 319 int uV) in wm831x_aldo_set_suspend_voltage() argument 325 sel = regulator_map_voltage_linear_range(rdev, uV, uV); in wm831x_aldo_set_suspend_voltage() 525 int uV) in wm831x_alive_ldo_set_suspend_voltage() argument 531 sel = regulator_map_voltage_linear(rdev, uV, uV); in wm831x_alive_ldo_set_suspend_voltage()
|
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()
|
D | fan53555.c | 139 static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV) in fan53555_set_suspend_voltage() argument 144 if (di->sleep_vol_cache == uV) in fan53555_set_suspend_voltage() 146 ret = regulator_map_voltage_linear(rdev, uV, uV); in fan53555_set_suspend_voltage() 155 di->sleep_vol_cache = uV; in fan53555_set_suspend_voltage()
|
D | rt6160-regulator.c | 128 static int rt6160_set_suspend_voltage(struct regulator_dev *rdev, int uV) in rt6160_set_suspend_voltage() argument 134 vsel = regulator_map_voltage_linear(rdev, uV, uV); in rt6160_set_suspend_voltage()
|
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()
|
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() 515 static int wm831x_buckp_set_suspend_voltage(struct regulator_dev *rdev, int uV) in wm831x_buckp_set_suspend_voltage() argument 522 sel = regulator_map_voltage_linear(rdev, uV, uV); in wm831x_buckp_set_suspend_voltage()
|
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()
|
D | mcp16502.c | 349 static int mcp16502_set_suspend_voltage(struct regulator_dev *rdev, int uV) in mcp16502_set_suspend_voltage() argument 351 int sel = regulator_map_voltage_linear_range(rdev, uV, uV); in mcp16502_set_suspend_voltage()
|
D | qcom_smd-regulator.c | 26 int uV; member 60 req[reqlen].value = cpu_to_le32(vreg->uV); in rpm_reg_write_active() 127 return vreg->uV; in rpm_reg_get_voltage() 137 int old_uV = vreg->uV; in rpm_reg_set_voltage() 139 vreg->uV = min_uV; in rpm_reg_set_voltage() 144 vreg->uV = old_uV; in rpm_reg_set_voltage()
|
D | core.c | 661 int uV; in microvolts_show() local 664 uV = regulator_get_voltage_rdev(rdev); in microvolts_show() 667 if (uV < 0) in microvolts_show() 668 return uV; in microvolts_show() 669 return sprintf(buf, "%d\n", uV); in microvolts_show() 884 return sprintf(buf, "%d\n", rdev->constraints->state_mem.uV); in suspend_mem_microvolts_show() 893 return sprintf(buf, "%d\n", rdev->constraints->state_disk.uV); in suspend_disk_microvolts_show() 902 return sprintf(buf, "%d\n", rdev->constraints->state_standby.uV); in suspend_standby_microvolts_show() 1086 if (rdev->desc->ops->set_suspend_voltage && rstate->uV > 0) { in __suspend_set_state() 1087 ret = rdev->desc->ops->set_suspend_voltage(rdev, rstate->uV); in __suspend_set_state() [all …]
|
D | da9055-regulator.c | 243 int uV) in da9055_regulator_set_suspend_voltage() argument 257 ret = regulator_map_voltage_linear(rdev, uV, uV); in da9055_regulator_set_suspend_voltage()
|
D | tps51632-regulator.c | 80 #define TPS51632_VOLT_VSEL(uV) \ argument 81 (DIV_ROUND_UP(uV - TPS51632_MIN_VOLTAGE, \
|
/drivers/soc/qcom/ |
D | cpr.c | 204 int uV; member 216 int uV; member 780 new_uV = corner->uV; in cpr_set_performance_state() 829 int step_size_uV, steps, uV; in cpr_read_fuse_uV() local 844 uV = fdata->ref_uV + steps * step_size_uV; in cpr_read_fuse_uV() 845 return DIV_ROUND_UP(uV, step_volt) * step_volt; in cpr_read_fuse_uV() 857 int uV; in cpr_fuse_corner_init() local 882 uV = cpr_read_fuse_uV(desc, fdata, fuses->init_voltage, in cpr_fuse_corner_init() 884 if (uV < 0) in cpr_fuse_corner_init() 885 return uV; in cpr_fuse_corner_init() [all …]
|
/drivers/pinctrl/sunxi/ |
D | pinctrl-sunxi.c | 630 int uV; in sunxi_pinctrl_set_io_bias_cfg() local 635 uV = regulator_get_voltage(supply); in sunxi_pinctrl_set_io_bias_cfg() 636 if (uV < 0) in sunxi_pinctrl_set_io_bias_cfg() 637 return uV; in sunxi_pinctrl_set_io_bias_cfg() 640 if (uV == 0) in sunxi_pinctrl_set_io_bias_cfg() 652 if (uV <= 1800000) in sunxi_pinctrl_set_io_bias_cfg() 654 else if (uV <= 2500000) in sunxi_pinctrl_set_io_bias_cfg() 656 else if (uV <= 2800000) in sunxi_pinctrl_set_io_bias_cfg() 658 else if (uV <= 3000000) in sunxi_pinctrl_set_io_bias_cfg() 668 val = uV <= 1800000 ? 1 : 0; in sunxi_pinctrl_set_io_bias_cfg()
|
/drivers/power/supply/ |
D | charger-manager.c | 187 static int get_batt_uV(struct charger_manager *cm, int *uV) in get_batt_uV() argument 203 *uV = val.intval; in get_batt_uV() 287 int uV; in is_full_charged() local 299 ret = get_batt_uV(cm, &uV); in is_full_charged() 304 uV += desc->fullbatt_vchkdrop_uV; in is_full_charged() 305 if (uV >= desc->fullbatt_uV) in is_full_charged() 719 int uV; in charger_get_property() local 786 ret = get_batt_uV(cm, &uV); in charger_get_property() 793 if (desc->fullbatt_uV > 0 && uV >= desc->fullbatt_uV && in charger_get_property()
|
/drivers/opp/ |
D | core.c | 238 } *uV; in dev_pm_opp_get_max_volt_latency() local 250 uV = kmalloc_array(count, sizeof(*uV), GFP_KERNEL); in dev_pm_opp_get_max_volt_latency() 251 if (!uV) in dev_pm_opp_get_max_volt_latency() 257 uV[i].min = ~0; in dev_pm_opp_get_max_volt_latency() 258 uV[i].max = 0; in dev_pm_opp_get_max_volt_latency() 264 if (opp->supplies[i].u_volt_min < uV[i].min) in dev_pm_opp_get_max_volt_latency() 265 uV[i].min = opp->supplies[i].u_volt_min; in dev_pm_opp_get_max_volt_latency() 266 if (opp->supplies[i].u_volt_max > uV[i].max) in dev_pm_opp_get_max_volt_latency() 267 uV[i].max = opp->supplies[i].u_volt_max; in dev_pm_opp_get_max_volt_latency() 279 ret = regulator_set_voltage_time(reg, uV[i].min, uV[i].max); in dev_pm_opp_get_max_volt_latency() [all …]
|
/drivers/remoteproc/ |
D | qcom_q6v5_mss.c | 123 int uV; member 129 int uV; member 245 regs[i].uV = reg_res[i].uV; in q6v5_regulator_init() 259 if (regs[i].uV > 0) { in q6v5_regulator_enable() 261 regs[i].uV, INT_MAX); in q6v5_regulator_enable() 290 if (regs[i].uV > 0) in q6v5_regulator_enable() 308 if (regs[i].uV > 0) in q6v5_regulator_disable() 2044 .uV = 1050000, 2086 .uV = 1050000, 2097 .uV = 1050000,
|