Home
last modified time | relevance | path

Searched refs:uV (Results 1 - 25 of 68) sorted by relevance

123

/kernel/linux/linux-6.6/drivers/soc/rockchip/
H A Dio-domain.c71 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()
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()
123 rockchip_iodomain_write(struct rockchip_iodomain_supply *supply, int uV) rockchip_iodomain_write() argument
614 int uV; rockchip_iodomain_probe() local
[all...]
/kernel/linux/linux-5.10/drivers/soc/rockchip/
H A Dio-domain.c80 int uV) in rockchip_iodomain_write()
87 val = (uV > MAX_VOLTAGE_1_8) ? 0 : 1; in rockchip_iodomain_write()
106 int uV; in rockchip_iodomain_notify() local
125 uV = max_t(unsigned long, pvc_data->old_uV, pvc_data->max_uV); in rockchip_iodomain_notify()
128 uV = (unsigned long)data; in rockchip_iodomain_notify()
133 dev_dbg(supply->iod->dev, "Setting to %d\n", uV); in rockchip_iodomain_notify()
135 if (uV > MAX_VOLTAGE_3_3) { in rockchip_iodomain_notify()
136 dev_err(supply->iod->dev, "Voltage too high: %d\n", uV); in rockchip_iodomain_notify()
142 ret = rockchip_iodomain_write(supply, uV); in rockchip_iodomain_notify()
146 dev_dbg(supply->iod->dev, "Setting to %d done\n", uV); in rockchip_iodomain_notify()
79 rockchip_iodomain_write(struct rockchip_iodomain_supply *supply, int uV) rockchip_iodomain_write() argument
525 int uV; rockchip_iodomain_probe() local
[all...]
/kernel/linux/linux-5.10/drivers/regulator/
H A Dqcom_rpm-regulator.c28 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()
240 int uV; rpm_reg_set_uV_sel() local
[all...]
H A Dqcom_spmi-regulator.c609 int uV = min_uV; in spmi_regulator_select_voltage() local
618 if (uV < lim_min_uV && max_uV >= lim_min_uV) in spmi_regulator_select_voltage()
619 uV = lim_min_uV; in spmi_regulator_select_voltage()
621 if (uV < lim_min_uV || uV > lim_max_uV) { in spmi_regulator_select_voltage()
628 /* Find the range which uV is inside of. */ in spmi_regulator_select_voltage()
631 if (uV > range_max_uV && range_max_uV > 0) in spmi_regulator_select_voltage()
639 * Force uV to be an allowed set point by applying a ceiling function to in spmi_regulator_select_voltage()
640 * the uV value. in spmi_regulator_select_voltage()
642 voltage_sel = DIV_ROUND_UP(uV in spmi_regulator_select_voltage()
746 int uV = min_uV; spmi_regulator_select_voltage_same_range() local
876 int uV; spmi_regulator_ftsmps426_get_voltage() local
967 int uV = 0; spmi_regulator_common_list_voltage() local
[all...]
H A Dltc3676.c73 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()
H A Dvctrl-regulator.c100 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()
H A Dvexpress-regulator.c19 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()
H A Dwm831x-ldo.c66 int uV) in wm831x_gp_ldo_set_suspend_voltage()
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()
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()
531 sel = regulator_map_voltage_linear(rdev, uV, uV); in wm831x_alive_ldo_set_suspend_voltage()
65 wm831x_gp_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) wm831x_gp_ldo_set_suspend_voltage() argument
318 wm831x_aldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) wm831x_aldo_set_suspend_voltage() argument
524 wm831x_alive_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) wm831x_alive_ldo_set_suspend_voltage() argument
H A Dltc3589.c113 static int ltc3589_set_suspend_voltage(struct regulator_dev *rdev, int uV) in ltc3589_set_suspend_voltage() argument
118 sel = regulator_map_voltage_linear(rdev, uV, uV); in ltc3589_set_suspend_voltage()
179 static inline unsigned int ltc3589_scale(unsigned int uV, u32 r1, u32 r2) in ltc3589_scale() argument
183 if (uV == 0) in ltc3589_scale()
186 tmp = (uint64_t)uV * r1; in ltc3589_scale()
188 return uV + (unsigned int)tmp; in ltc3589_scale()
H A Dmax8925-regulator.c102 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()
H A Dfan53555.c112 static int fan53555_set_suspend_voltage(struct regulator_dev *rdev, int uV) in fan53555_set_suspend_voltage() argument
117 if (di->sleep_vol_cache == uV) in fan53555_set_suspend_voltage()
119 ret = regulator_map_voltage_linear(rdev, uV, uV); in fan53555_set_suspend_voltage()
128 di->sleep_vol_cache = uV; in fan53555_set_suspend_voltage()
/kernel/linux/linux-6.6/drivers/regulator/
H A Dqcom_rpm-regulator.c28 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()
240 int uV; rpm_reg_set_uV_sel() local
[all...]
H A Dqcom_spmi-regulator.c339 /* slew_rate has units of uV/us. */
670 int uV = min_uV; in spmi_regulator_select_voltage() local
679 if (uV < lim_min_uV && max_uV >= lim_min_uV) in spmi_regulator_select_voltage()
680 uV = lim_min_uV; in spmi_regulator_select_voltage()
682 if (uV < lim_min_uV || uV > lim_max_uV) { in spmi_regulator_select_voltage()
689 /* Find the range which uV is inside of. */ in spmi_regulator_select_voltage()
692 if (uV > range_max_uV && range_max_uV > 0) in spmi_regulator_select_voltage()
700 * Force uV to be an allowed set point by applying a ceiling function to in spmi_regulator_select_voltage()
701 * the uV valu in spmi_regulator_select_voltage()
807 int uV = min_uV; spmi_regulator_select_voltage_same_range() local
937 int uV; spmi_regulator_ftsmps426_get_voltage() local
1028 int uV = 0; spmi_regulator_common_list_voltage() local
[all...]
H A Dvctrl-regulator.c100 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()
H A Dltc3676.c73 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()
H A Dpf8x00-regulator.c302 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() local
316 dev_dbg(rdev_get_dev(rdev), "uV: %i, reg: 0x%x, msk: 0x%x, val: 0x%x\n", in pf8x00_set_suspend_voltage()
317 uV, regl->suspend_voltage_reg, regl->desc.vsel_mask, ret); in pf8x00_set_suspend_voltage() local
321 dev_err(rdev_get_dev(rdev), "failed to set %i uV\n", uV); in pf8x00_set_suspend_voltage() local
[all...]
H A Dvexpress-regulator.c20 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()
H A Dwm831x-ldo.c66 int uV) in wm831x_gp_ldo_set_suspend_voltage()
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()
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()
533 sel = regulator_map_voltage_linear(rdev, uV, uV); in wm831x_alive_ldo_set_suspend_voltage()
65 wm831x_gp_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) wm831x_gp_ldo_set_suspend_voltage() argument
319 wm831x_aldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) wm831x_aldo_set_suspend_voltage() argument
526 wm831x_alive_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) wm831x_alive_ldo_set_suspend_voltage() argument
H A Dltc3589.c99 static int ltc3589_set_suspend_voltage(struct regulator_dev *rdev, int uV) in ltc3589_set_suspend_voltage() argument
104 sel = regulator_map_voltage_linear(rdev, uV, uV); in ltc3589_set_suspend_voltage()
165 static inline unsigned int ltc3589_scale(unsigned int uV, u32 r1, u32 r2) in ltc3589_scale() argument
169 if (uV == 0) in ltc3589_scale()
172 tmp = (uint64_t)uV * r1; in ltc3589_scale()
174 return uV + (unsigned int)tmp; in ltc3589_scale()
H A Dmax8925-regulator.c102 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()
H A Drt5739.c98 static int rt5739_set_suspend_voltage(struct regulator_dev *rdev, int uV) in rt5739_set_suspend_voltage() argument
107 if (uV < desc->min_uV || uV > max_uV) in rt5739_set_suspend_voltage()
115 vsel = (uV - desc->min_uV) / desc->uV_step; in rt5739_set_suspend_voltage()
/kernel/linux/linux-6.6/sound/soc/atmel/
H A Dtse850-pcm5142.c194 unsigned int uV = ucontrol->value.enumerated.item[0]; in tse850_put_ana() local
197 if (uV >= e->items) in tse850_put_ana()
209 if (uV) in tse850_put_ana()
210 uV = 11000000 + (1000000 * uV); in tse850_put_ana()
212 uV = 2000000; in tse850_put_ana()
214 ret = regulator_set_voltage(tse850->ana, uV, uV); in tse850_put_ana()
/kernel/linux/linux-5.10/drivers/soc/qcom/
H A Dcpr.c204 int uV; member
216 int uV; member
780 new_uV = corner->uV; in cpr_set_performance_state()
862 int step_size_uV, steps, uV; in cpr_read_fuse_uV() local
877 uV = fdata->ref_uV + steps * step_size_uV; in cpr_read_fuse_uV()
878 return DIV_ROUND_UP(uV, step_volt) * step_volt; in cpr_read_fuse_uV()
890 int uV; in cpr_fuse_corner_init() local
914 /* Populate uV */ in cpr_fuse_corner_init()
915 uV = cpr_read_fuse_uV(desc, fdata, fuses->init_voltage, in cpr_fuse_corner_init()
917 if (uV < in cpr_fuse_corner_init()
1024 int uV_high, uV_low, uV; cpr_interpolate() local
[all...]
/kernel/linux/linux-6.6/drivers/pmdomain/qcom/
H A Dcpr.c203 int uV; member
215 int uV; member
779 new_uV = corner->uV; in cpr_set_performance_state()
828 int step_size_uV, steps, uV; in cpr_read_fuse_uV() local
843 uV = fdata->ref_uV + steps * step_size_uV; in cpr_read_fuse_uV()
844 return DIV_ROUND_UP(uV, step_volt) * step_volt; in cpr_read_fuse_uV()
856 int uV; in cpr_fuse_corner_init() local
880 /* Populate uV */ in cpr_fuse_corner_init()
881 uV = cpr_read_fuse_uV(desc, fdata, fuses->init_voltage, in cpr_fuse_corner_init()
883 if (uV < in cpr_fuse_corner_init()
990 int uV_high, uV_low, uV; cpr_interpolate() local
[all...]
/kernel/linux/linux-5.10/sound/soc/atmel/
H A Dtse850-pcm5142.c194 unsigned int uV = ucontrol->value.enumerated.item[0]; in tse850_put_ana() local
197 if (uV >= e->items) in tse850_put_ana()
209 if (uV) in tse850_put_ana()
210 uV = 11000000 + (1000000 * uV); in tse850_put_ana()
212 uV = 2000000; in tse850_put_ana()
214 ret = regulator_set_voltage(tse850->ana, uV, uV); in tse850_put_ana()

Completed in 22 milliseconds

123