Home
last modified time | relevance | path

Searched refs:uV (Results 1 – 25 of 189) sorted by relevance

12345678

/OK3568_Linux_fs/u-boot/drivers/power/regulator/
H A Dlp873x_regulator.c61 static int lp873x_buck_volt2hex(int uV) in lp873x_buck_volt2hex() argument
63 if (uV > LP873X_BUCK_VOLT_MAX) in lp873x_buck_volt2hex()
65 else if (uV > 1400000) in lp873x_buck_volt2hex()
66 return (uV - 1420000) / 20000 + 0x9E; in lp873x_buck_volt2hex()
67 else if (uV > 730000) in lp873x_buck_volt2hex()
68 return (uV - 735000) / 5000 + 0x18; in lp873x_buck_volt2hex()
69 else if (uV >= 700000) in lp873x_buck_volt2hex()
70 return (uV - 700000) / 10000 + 0x1; in lp873x_buck_volt2hex()
89 static int lp873x_buck_val(struct udevice *dev, int op, int *uV) in lp873x_buck_val() argument
98 *uV = 0; in lp873x_buck_val()
[all …]
H A Dpalmas_regulator.c89 static int palmas_smps_volt2hex(int uV) in palmas_smps_volt2hex() argument
91 if (uV > PALMAS_LDO_VOLT_MAX) in palmas_smps_volt2hex()
94 if (uV > 1650000) in palmas_smps_volt2hex()
95 return (uV - 1000000) / 20000 + 0x6; in palmas_smps_volt2hex()
97 if (uV == 500000) in palmas_smps_volt2hex()
100 return 0x6 + ((uV - 500000) / 10000); in palmas_smps_volt2hex()
105 unsigned int uV = 0; in palmas_smps_hex2volt() local
111 uV = 500000; in palmas_smps_hex2volt()
113 uV = 500000 + (hex - 0x6) * 10000; in palmas_smps_hex2volt()
116 uV *= 2; in palmas_smps_hex2volt()
[all …]
H A Dlp87565_regulator.c59 static int lp87565_buck_volt2val(int uV) in lp87565_buck_volt2val() argument
61 if (uV > LP87565_BUCK_VOLT_MAX) in lp87565_buck_volt2val()
63 else if (uV > 1400000) in lp87565_buck_volt2val()
64 return (uV - 1420000) / 20000 + 0x9E; in lp87565_buck_volt2val()
65 else if (uV > 730000) in lp87565_buck_volt2val()
66 return (uV - 735000) / 5000 + 0x18; in lp87565_buck_volt2val()
67 else if (uV >= 500000) in lp87565_buck_volt2val()
68 return (uV - 500000) / 10000; in lp87565_buck_volt2val()
87 static int lp87565_buck_val(struct udevice *dev, int op, int *uV) in lp87565_buck_val() argument
96 *uV = 0; in lp87565_buck_val()
[all …]
H A Dmax77686.c72 static int max77686_buck_volt2hex(int buck, int uV) in max77686_buck_volt2hex() argument
82 hex = (uV - MAX77686_BUCK_UV_LMIN) / MAX77686_BUCK_UV_LSTEP; in max77686_buck_volt2hex()
93 hex = (uV - MAX77686_BUCK_UV_HMIN) / MAX77686_BUCK_UV_HSTEP; in max77686_buck_volt2hex()
101 pr_err("Value: %d uV is wrong for BUCK%d", uV, buck); in max77686_buck_volt2hex()
107 unsigned uV = 0; in max77686_buck_hex2volt() local
122 uV = hex * MAX77686_BUCK_UV_LSTEP + MAX77686_BUCK_UV_LMIN; in max77686_buck_hex2volt()
130 uV = hex * MAX77686_BUCK_UV_HSTEP + MAX77686_BUCK_UV_HMIN; in max77686_buck_hex2volt()
134 return uV; in max77686_buck_hex2volt()
141 static int max77686_ldo_volt2hex(int ldo, int uV) in max77686_ldo_volt2hex() argument
152 hex = (uV - MAX77686_LDO_UV_MIN) / MAX77686_LDO_UV_LSTEP; in max77686_ldo_volt2hex()
[all …]
H A Dregulator-uclass.c41 int regulator_set_value(struct udevice *dev, int uV) in regulator_set_value() argument
49 if (uc_pdata->min_uV != -ENODATA && uV < uc_pdata->min_uV) in regulator_set_value()
51 if (uc_pdata->max_uV != -ENODATA && uV > uc_pdata->max_uV) in regulator_set_value()
65 ret = ops->set_value(dev, uV); in regulator_set_value()
67 if (!ret && (old_uV != -ENODATA) && (old_uV != uV)) { in regulator_set_value()
68 us = DIV_ROUND_UP(abs(uV - old_uV), uc_pdata->ramp_delay); in regulator_set_value()
71 uc_pdata->name, uc_pdata->ramp_delay, old_uV, uV, us); in regulator_set_value()
77 int regulator_set_suspend_value(struct udevice *dev, int uV) in regulator_set_suspend_value() argument
84 return ops->set_suspend_value(dev, uV); in regulator_set_suspend_value()
101 int regulator_set_value_force(struct udevice *dev, int uV) in regulator_set_value_force() argument
[all …]
H A Dpfuze100.c448 static int pfuze100_regulator_val(struct udevice *dev, int op, int *uV) in pfuze100_regulator_val() argument
458 *uV = 0; in pfuze100_regulator_val()
460 *uV = desc->voltage; in pfuze100_regulator_val()
466 *uV = desc->volt_table[val]; in pfuze100_regulator_val()
476 *uV = uc_pdata->min_uV + (int)val * desc->uV_step; in pfuze100_regulator_val()
487 if (*uV == desc->volt_table[i]) in pfuze100_regulator_val()
491 debug("Unsupported voltage %u\n", *uV); in pfuze100_regulator_val()
504 (*uV - uc_pdata->min_uV) / desc->uV_step); in pfuze100_regulator_val()
512 int uV; in pfuze100_regulator_get_value() local
515 ret = pfuze100_regulator_val(dev, PMIC_OP_GET, &uV); in pfuze100_regulator_get_value()
[all …]
/OK3568_Linux_fs/kernel/drivers/soc/rockchip/
H A Dio-domain.c82 int (*write)(struct rockchip_iodomain_supply *supply, int uV);
90 int (*write)(struct rockchip_iodomain_supply *supply, int uV);
93 static int rk3568_iodomain_write(struct rockchip_iodomain_supply *supply, int uV) in rk3568_iodomain_write() argument
96 u32 is_3v3 = uV > MAX_VOLTAGE_1_8; in rk3568_iodomain_write()
135 int uV) in rockchip_iodomain_write() argument
142 val = (uV > MAX_VOLTAGE_1_8) ? 0 : 1; in rockchip_iodomain_write()
161 int uV; in rockchip_iodomain_notify() local
180 uV = max_t(unsigned long, pvc_data->old_uV, pvc_data->max_uV); in rockchip_iodomain_notify()
183 uV = (unsigned long)data; in rockchip_iodomain_notify()
188 dev_dbg(supply->iod->dev, "Setting to %d\n", uV); in rockchip_iodomain_notify()
[all …]
/OK3568_Linux_fs/u-boot/drivers/power/pmic/
H A Dpmic_max77686.c21 static unsigned int max77686_ldo_volt2hex(int ldo, ulong uV) in max77686_ldo_volt2hex() argument
32 hex = (uV - 800000) / 25000; in max77686_ldo_volt2hex()
35 hex = (uV - 800000) / 50000; in max77686_ldo_volt2hex()
41 debug("%s: %ld is wrong voltage value for LDO%d\n", __func__, uV, ldo); in max77686_ldo_volt2hex()
45 static int max77686_buck_volt2hex(int buck, ulong uV) in max77686_buck_volt2hex() argument
54 hex = (uV - 750000) / 50000; in max77686_buck_volt2hex()
60 __func__, uV, buck); in max77686_buck_volt2hex()
64 int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV) in max77686_set_ldo_voltage() argument
74 hex = max77686_ldo_volt2hex(ldo, uV); in max77686_set_ldo_voltage()
90 int max77686_set_buck_voltage(struct pmic *p, int buck, ulong uV) in max77686_set_buck_voltage() argument
[all …]
H A Dpmic_max8997.c14 unsigned char max8997_reg_ldo(int uV) in max8997_reg_ldo() argument
17 if (uV <= 800000) in max8997_reg_ldo()
19 if (uV >= 3950000) in max8997_reg_ldo()
21 ret = (uV - 800000) / 50000; in max8997_reg_ldo()
23 printf("MAX8997 LDO SETTING ERROR (%duV) -> %u\n", uV, ret); in max8997_reg_ldo()
/OK3568_Linux_fs/u-boot/drivers/power/io-domain/
H A Drockchip-io-domain.c88 int (*write)(struct rockchip_iodomain_supply *supply, int uV);
108 int uV) in rk3568_pmu_iodomain_write() argument
112 u32 is_3v3 = uV > MAX_VOLTAGE_1_8; in rk3568_pmu_iodomain_write()
149 int uV) in rv1126_iodomain_write() argument
156 val = (uV > MAX_VOLTAGE_1_8) ? 0 : 1; in rv1126_iodomain_write()
165 priv->sdata->supply_names[supply->idx], uV, val); in rv1126_iodomain_write()
175 int uV) in rockchip_iodomain_write() argument
183 val = (uV > MAX_VOLTAGE_1_8) ? 0 : 1; in rockchip_iodomain_write()
627 u32 uV; in rockchip_iodomain_probe() local
636 uV = regulator_get_value(reg); in rockchip_iodomain_probe()
[all …]
/OK3568_Linux_fs/kernel/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()
224 ret = rpm_reg_write(vreg, req, uV / 1000); in rpm_reg_set_mV_sel()
[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()
631 if (uV > range_max_uV && range_max_uV > 0) in spmi_regulator_select_voltage()
642 voltage_sel = DIV_ROUND_UP(uV - range->min_uV, range->step_uV); in spmi_regulator_select_voltage()
643 uV = voltage_sel * range->step_uV + range->min_uV; in spmi_regulator_select_voltage()
645 if (uV > max_uV) { in spmi_regulator_select_voltage()
649 min_uV, max_uV, uV); in spmi_regulator_select_voltage()
656 selector += (uV - range->set_point_min_uV) / range->step_uV; in spmi_regulator_select_voltage()
[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 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 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()
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/power/
H A Drockchip-cpu-avs.txt12 - min-volt: The minimum voltage in uV. Even though opp's voltage will be
18 <min-leakage-mA max-leakage-mA volt-uV>.
21 volt: voltage offset in uV to apply to the opp table entries.
30 min-volt = <800000>; /* uV */
33 /* mA mA uV */
41 min-volt = <800000>; /* uV */
44 /* mA mA uV */
/OK3568_Linux_fs/u-boot/test/dm/
H A Dadc.c51 int uV; in dm_test_adc_supply() local
56 ut_assertok(adc_vss_value(dev, &uV)); in dm_test_adc_supply()
57 ut_asserteq(SANDBOX_ADC_VSS_VALUE, uV); in dm_test_adc_supply()
60 ut_assertok(adc_vdd_value(dev, &uV)); in dm_test_adc_supply()
61 ut_asserteq(SANDBOX_BUCK2_INITIAL_EXPECTED_UV, uV); in dm_test_adc_supply()
69 ut_assertok(adc_vdd_value(dev, &uV)); in dm_test_adc_supply()
70 ut_asserteq(SANDBOX_BUCK2_SET_UV, uV); in dm_test_adc_supply()
/OK3568_Linux_fs/kernel/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
915 uV = cpr_read_fuse_uV(desc, fdata, fuses->init_voltage, in cpr_fuse_corner_init()
917 if (uV < 0) in cpr_fuse_corner_init()
918 return uV; in cpr_fuse_corner_init()
[all …]
/OK3568_Linux_fs/u-boot/include/power/
H A Dregulator.h198 int (*set_value)(struct udevice *dev, int uV);
199 int (*set_suspend_value)(struct udevice *dev, int uV);
279 int regulator_set_value(struct udevice *dev, int uV);
288 int regulator_set_suspend_value(struct udevice *dev, int uV);
306 int regulator_set_value_force(struct udevice *dev, int uV);
/OK3568_Linux_fs/u-boot/test/rockchip/
H A Dtest-power.c21 int uV, save_uV, step_uV = 12500; in regulator_change_voltage() local
45 uV = regulator_get_value(dev); in regulator_change_voltage()
46 regulator_set_value(dev, uV + step_uV * i); in regulator_change_voltage()
48 dev->name, uc_pdata->name, uV, uV + step_uV * i, in regulator_change_voltage()
51 if ((uV + step_uV * i) != regulator_get_value(dev)) { in regulator_change_voltage()
/OK3568_Linux_fs/kernel/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()
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/power/supply/
H A Drt9455_charger.txt15 - richtek,battery-regulation-voltage: integer, maximum battery voltage in uV.
17 devices, when the charger is in boost mode, in uV.
20 - richtek,min-input-voltage-regulation: integer, input voltage level in uV, used to
25 Default: 4500000 uV (4.5V)
H A Dsc8551_charger.txt10 - input-voltage-limit-microvolt: integer, input voltage level in uV, used to
19 - sc,sc8551,bat-ovp-threshold: Configures the battery over voltage protection voltage (in uV).
21 - sc,sc8551,bus-ovp-threshold: Configures the bus over voltage protection voltage (in uV).
23 - sc,sc8551,ac-ovp-threshold: Configures the AC voltage protection voltage (in uV).
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/opp/
H A Dqcom-opp.txt18 a certain fuse corner/level. A fuse corner/level contains e.g. ref uV,
19 min uV, and max uV.
/OK3568_Linux_fs/kernel/arch/arm/boot/dts/
H A Dimx6q.dtsi25 /* kHz uV */
33 /* ARM kHz SOC-PU uV */
62 /* kHz uV */
70 /* ARM kHz SOC-PU uV */
97 /* kHz uV */
105 /* ARM kHz SOC-PU uV */
132 /* kHz uV */
140 /* ARM kHz SOC-PU uV */

12345678