mirror of https://gitee.com/openkylin/linux.git
Merge remote-tracking branches 'regulator/topic/pv88080', 'regulator/topic/pv88090', 'regulator/topic/qcom-smd', 'regulator/topic/rc5t583' and 'regulator/topic/rn5t618' into regulator-next
This commit is contained in:
commit
0755fad8a6
|
@ -22,6 +22,7 @@ Regulator nodes are identified by their compatible:
|
|||
"qcom,rpm-pm8841-regulators"
|
||||
"qcom,rpm-pm8916-regulators"
|
||||
"qcom,rpm-pm8941-regulators"
|
||||
"qcom,rpm-pm8994-regulators"
|
||||
"qcom,rpm-pma8084-regulators"
|
||||
|
||||
- vdd_s1-supply:
|
||||
|
@ -68,6 +69,56 @@ Regulator nodes are identified by their compatible:
|
|||
Definition: reference to regulator supplying the input pin, as
|
||||
described in the data sheet
|
||||
|
||||
- vdd_s1-supply:
|
||||
- vdd_s2-supply:
|
||||
- vdd_s3-supply:
|
||||
- vdd_s4-supply:
|
||||
- vdd_s5-supply:
|
||||
- vdd_s6-supply:
|
||||
- vdd_s7-supply:
|
||||
- vdd_s8-supply:
|
||||
- vdd_s9-supply:
|
||||
- vdd_s10-supply:
|
||||
- vdd_s11-supply:
|
||||
- vdd_s12-supply:
|
||||
- vdd_l1-supply:
|
||||
- vdd_l2_l26_l28-supply:
|
||||
- vdd_l3_l11-supply:
|
||||
- vdd_l4_l27_l31-supply:
|
||||
- vdd_l5_l7-supply:
|
||||
- vdd_l6_l12_l32-supply:
|
||||
- vdd_l5_l7-supply:
|
||||
- vdd_l8_l16_l30-supply:
|
||||
- vdd_l9_l10_l18_l22-supply:
|
||||
- vdd_l9_l10_l18_l22-supply:
|
||||
- vdd_l3_l11-supply:
|
||||
- vdd_l6_l12_l32-supply:
|
||||
- vdd_l13_l19_l23_l24-supply:
|
||||
- vdd_l14_l15-supply:
|
||||
- vdd_l14_l15-supply:
|
||||
- vdd_l8_l16_l30-supply:
|
||||
- vdd_l17_l29-supply:
|
||||
- vdd_l9_l10_l18_l22-supply:
|
||||
- vdd_l13_l19_l23_l24-supply:
|
||||
- vdd_l20_l21-supply:
|
||||
- vdd_l20_l21-supply:
|
||||
- vdd_l9_l10_l18_l22-supply:
|
||||
- vdd_l13_l19_l23_l24-supply:
|
||||
- vdd_l13_l19_l23_l24-supply:
|
||||
- vdd_l25-supply:
|
||||
- vdd_l2_l26_l28-supply:
|
||||
- vdd_l4_l27_l31-supply:
|
||||
- vdd_l2_l26_l28-supply:
|
||||
- vdd_l17_l29-supply:
|
||||
- vdd_l8_l16_l30-supply:
|
||||
- vdd_l4_l27_l31-supply:
|
||||
- vdd_l6_l12_l32-supply:
|
||||
- vdd_lvs1_2-supply:
|
||||
Usage: optional (pm8994 only)
|
||||
Value type: <phandle>
|
||||
Definition: reference to regulator supplying the input pin, as
|
||||
described in the data sheet
|
||||
|
||||
- vdd_s1-supply:
|
||||
- vdd_s2-supply:
|
||||
- vdd_s3-supply:
|
||||
|
@ -113,6 +164,11 @@ pm8941:
|
|||
l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2,
|
||||
lvs3, 5vs1, 5vs2
|
||||
|
||||
pm8994:
|
||||
s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3, l4, l5,
|
||||
l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20,
|
||||
l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, l32, lvs1, lvs2
|
||||
|
||||
pma8084:
|
||||
s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3, l4, l5,
|
||||
l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20,
|
||||
|
|
|
@ -306,7 +306,7 @@ static int pv88080_get_current_limit(struct regulator_dev *rdev)
|
|||
return info->current_limits[data];
|
||||
}
|
||||
|
||||
static struct regulator_ops pv88080_buck_ops = {
|
||||
static const struct regulator_ops pv88080_buck_ops = {
|
||||
.get_mode = pv88080_buck_get_mode,
|
||||
.set_mode = pv88080_buck_set_mode,
|
||||
.enable = regulator_enable_regmap,
|
||||
|
@ -319,7 +319,7 @@ static struct regulator_ops pv88080_buck_ops = {
|
|||
.get_current_limit = pv88080_get_current_limit,
|
||||
};
|
||||
|
||||
static struct regulator_ops pv88080_hvbuck_ops = {
|
||||
static const struct regulator_ops pv88080_hvbuck_ops = {
|
||||
.enable = regulator_enable_regmap,
|
||||
.disable = regulator_disable_regmap,
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
|
|
|
@ -184,7 +184,7 @@ static int pv88090_get_current_limit(struct regulator_dev *rdev)
|
|||
return info->current_limits[data];
|
||||
}
|
||||
|
||||
static struct regulator_ops pv88090_buck_ops = {
|
||||
static const struct regulator_ops pv88090_buck_ops = {
|
||||
.get_mode = pv88090_buck_get_mode,
|
||||
.set_mode = pv88090_buck_set_mode,
|
||||
.enable = regulator_enable_regmap,
|
||||
|
@ -197,7 +197,7 @@ static struct regulator_ops pv88090_buck_ops = {
|
|||
.get_current_limit = pv88090_get_current_limit,
|
||||
};
|
||||
|
||||
static struct regulator_ops pv88090_ldo_ops = {
|
||||
static const struct regulator_ops pv88090_ldo_ops = {
|
||||
.enable = regulator_enable_regmap,
|
||||
.disable = regulator_disable_regmap,
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
|
|
|
@ -305,6 +305,56 @@ static const struct regulator_desc pm8916_buck_hvo_smps = {
|
|||
.ops = &rpm_smps_ldo_ops,
|
||||
};
|
||||
|
||||
static const struct regulator_desc pm8994_hfsmps = {
|
||||
.linear_ranges = (struct regulator_linear_range[]) {
|
||||
REGULATOR_LINEAR_RANGE( 375000, 0, 95, 12500),
|
||||
REGULATOR_LINEAR_RANGE(1550000, 96, 158, 25000),
|
||||
},
|
||||
.n_linear_ranges = 2,
|
||||
.n_voltages = 159,
|
||||
.ops = &rpm_smps_ldo_ops,
|
||||
};
|
||||
|
||||
static const struct regulator_desc pm8994_ftsmps = {
|
||||
.linear_ranges = (struct regulator_linear_range[]) {
|
||||
REGULATOR_LINEAR_RANGE(350000, 0, 199, 5000),
|
||||
REGULATOR_LINEAR_RANGE(700000, 200, 349, 10000),
|
||||
},
|
||||
.n_linear_ranges = 2,
|
||||
.n_voltages = 350,
|
||||
.ops = &rpm_smps_ldo_ops,
|
||||
};
|
||||
|
||||
static const struct regulator_desc pm8994_nldo = {
|
||||
.linear_ranges = (struct regulator_linear_range[]) {
|
||||
REGULATOR_LINEAR_RANGE(750000, 0, 63, 12500),
|
||||
},
|
||||
.n_linear_ranges = 1,
|
||||
.n_voltages = 64,
|
||||
.ops = &rpm_smps_ldo_ops,
|
||||
};
|
||||
|
||||
static const struct regulator_desc pm8994_pldo = {
|
||||
.linear_ranges = (struct regulator_linear_range[]) {
|
||||
REGULATOR_LINEAR_RANGE( 750000, 0, 63, 12500),
|
||||
REGULATOR_LINEAR_RANGE(1550000, 64, 126, 25000),
|
||||
REGULATOR_LINEAR_RANGE(3100000, 127, 163, 50000),
|
||||
},
|
||||
.n_linear_ranges = 3,
|
||||
.n_voltages = 164,
|
||||
.ops = &rpm_smps_ldo_ops,
|
||||
};
|
||||
|
||||
static const struct regulator_desc pm8994_switch = {
|
||||
.ops = &rpm_switch_ops,
|
||||
};
|
||||
|
||||
static const struct regulator_desc pm8994_lnldo = {
|
||||
.fixed_uV = 1740000,
|
||||
.n_voltages = 1,
|
||||
.ops = &rpm_smps_ldo_ops_fixed,
|
||||
};
|
||||
|
||||
struct rpm_regulator_data {
|
||||
const char *name;
|
||||
u32 type;
|
||||
|
@ -443,10 +493,62 @@ static const struct rpm_regulator_data rpm_pma8084_regulators[] = {
|
|||
{}
|
||||
};
|
||||
|
||||
static const struct rpm_regulator_data rpm_pm8994_regulators[] = {
|
||||
{ "s1", QCOM_SMD_RPM_SMPA, 1, &pm8994_ftsmps, "vdd_s1" },
|
||||
{ "s2", QCOM_SMD_RPM_SMPA, 2, &pm8994_ftsmps, "vdd_s2" },
|
||||
{ "s3", QCOM_SMD_RPM_SMPA, 3, &pm8994_hfsmps, "vdd_s3" },
|
||||
{ "s4", QCOM_SMD_RPM_SMPA, 4, &pm8994_hfsmps, "vdd_s4" },
|
||||
{ "s5", QCOM_SMD_RPM_SMPA, 5, &pm8994_hfsmps, "vdd_s5" },
|
||||
{ "s6", QCOM_SMD_RPM_SMPA, 6, &pm8994_ftsmps, "vdd_s6" },
|
||||
{ "s7", QCOM_SMD_RPM_SMPA, 7, &pm8994_hfsmps, "vdd_s7" },
|
||||
{ "s8", QCOM_SMD_RPM_SMPA, 8, &pm8994_ftsmps, "vdd_s8" },
|
||||
{ "s9", QCOM_SMD_RPM_SMPA, 9, &pm8994_ftsmps, "vdd_s9" },
|
||||
{ "s10", QCOM_SMD_RPM_SMPA, 10, &pm8994_ftsmps, "vdd_s10" },
|
||||
{ "s11", QCOM_SMD_RPM_SMPA, 11, &pm8994_ftsmps, "vdd_s11" },
|
||||
{ "s12", QCOM_SMD_RPM_SMPA, 12, &pm8994_ftsmps, "vdd_s12" },
|
||||
{ "l1", QCOM_SMD_RPM_LDOA, 1, &pm8994_nldo, "vdd_l1" },
|
||||
{ "l2", QCOM_SMD_RPM_LDOA, 2, &pm8994_nldo, "vdd_l2_l26_l28" },
|
||||
{ "l3", QCOM_SMD_RPM_LDOA, 3, &pm8994_nldo, "vdd_l3_l11" },
|
||||
{ "l4", QCOM_SMD_RPM_LDOA, 4, &pm8994_nldo, "vdd_l4_l27_l31" },
|
||||
{ "l5", QCOM_SMD_RPM_LDOA, 5, &pm8994_lnldo, "vdd_l5_l7" },
|
||||
{ "l6", QCOM_SMD_RPM_LDOA, 6, &pm8994_pldo, "vdd_l6_l12_l32" },
|
||||
{ "l7", QCOM_SMD_RPM_LDOA, 7, &pm8994_lnldo, "vdd_l5_l7" },
|
||||
{ "l8", QCOM_SMD_RPM_LDOA, 8, &pm8994_pldo, "vdd_l8_l16_l30" },
|
||||
{ "l9", QCOM_SMD_RPM_LDOA, 9, &pm8994_pldo, "vdd_l9_l10_l18_l22" },
|
||||
{ "l10", QCOM_SMD_RPM_LDOA, 10, &pm8994_pldo, "vdd_l9_l10_l18_l22" },
|
||||
{ "l11", QCOM_SMD_RPM_LDOA, 11, &pm8994_nldo, "vdd_l3_l11" },
|
||||
{ "l12", QCOM_SMD_RPM_LDOA, 12, &pm8994_pldo, "vdd_l6_l12_l32" },
|
||||
{ "l13", QCOM_SMD_RPM_LDOA, 13, &pm8994_pldo, "vdd_l13_l19_l23_l24" },
|
||||
{ "l14", QCOM_SMD_RPM_LDOA, 14, &pm8994_pldo, "vdd_l14_l15" },
|
||||
{ "l15", QCOM_SMD_RPM_LDOA, 15, &pm8994_pldo, "vdd_l14_l15" },
|
||||
{ "l16", QCOM_SMD_RPM_LDOA, 16, &pm8994_pldo, "vdd_l8_l16_l30" },
|
||||
{ "l17", QCOM_SMD_RPM_LDOA, 17, &pm8994_pldo, "vdd_l17_l29" },
|
||||
{ "l18", QCOM_SMD_RPM_LDOA, 18, &pm8994_pldo, "vdd_l9_l10_l18_l22" },
|
||||
{ "l19", QCOM_SMD_RPM_LDOA, 19, &pm8994_pldo, "vdd_l13_l19_l23_l24" },
|
||||
{ "l20", QCOM_SMD_RPM_LDOA, 20, &pm8994_pldo, "vdd_l20_l21" },
|
||||
{ "l21", QCOM_SMD_RPM_LDOA, 21, &pm8994_pldo, "vdd_l20_l21" },
|
||||
{ "l22", QCOM_SMD_RPM_LDOA, 22, &pm8994_pldo, "vdd_l9_l10_l18_l22" },
|
||||
{ "l23", QCOM_SMD_RPM_LDOA, 23, &pm8994_pldo, "vdd_l13_l19_l23_l24" },
|
||||
{ "l24", QCOM_SMD_RPM_LDOA, 24, &pm8994_pldo, "vdd_l13_l19_l23_l24" },
|
||||
{ "l25", QCOM_SMD_RPM_LDOA, 25, &pm8994_pldo, "vdd_l25" },
|
||||
{ "l26", QCOM_SMD_RPM_LDOA, 26, &pm8994_nldo, "vdd_l2_l26_l28" },
|
||||
{ "l27", QCOM_SMD_RPM_LDOA, 27, &pm8994_nldo, "vdd_l4_l27_l31" },
|
||||
{ "l28", QCOM_SMD_RPM_LDOA, 28, &pm8994_nldo, "vdd_l2_l26_l28" },
|
||||
{ "l29", QCOM_SMD_RPM_LDOA, 29, &pm8994_pldo, "vdd_l17_l29" },
|
||||
{ "l30", QCOM_SMD_RPM_LDOA, 30, &pm8994_pldo, "vdd_l8_l16_l30" },
|
||||
{ "l31", QCOM_SMD_RPM_LDOA, 31, &pm8994_nldo, "vdd_l4_l27_l31" },
|
||||
{ "l32", QCOM_SMD_RPM_LDOA, 32, &pm8994_pldo, "vdd_l6_l12_l32" },
|
||||
{ "lvs1", QCOM_SMD_RPM_VSA, 1, &pm8994_switch, "vdd_lvs1_2" },
|
||||
{ "lvs2", QCOM_SMD_RPM_VSA, 2, &pm8994_switch, "vdd_lvs1_2" },
|
||||
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct of_device_id rpm_of_match[] = {
|
||||
{ .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators },
|
||||
{ .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators },
|
||||
{ .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators },
|
||||
{ .compatible = "qcom,rpm-pm8994-regulators", .data = &rpm_pm8994_regulators },
|
||||
{ .compatible = "qcom,rpm-pma8084-regulators", .data = &rpm_pma8084_regulators },
|
||||
{}
|
||||
};
|
||||
|
|
|
@ -61,7 +61,7 @@ static int rc5t583_regulator_enable_time(struct regulator_dev *rdev)
|
|||
return DIV_ROUND_UP(curr_uV, reg->reg_info->enable_uv_per_us);
|
||||
}
|
||||
|
||||
static struct regulator_ops rc5t583_ops = {
|
||||
static const struct regulator_ops rc5t583_ops = {
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
.enable = regulator_enable_regmap,
|
||||
.disable = regulator_disable_regmap,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <linux/regulator/driver.h>
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
|
||||
static struct regulator_ops rn5t618_reg_ops = {
|
||||
static const struct regulator_ops rn5t618_reg_ops = {
|
||||
.enable = regulator_enable_regmap,
|
||||
.disable = regulator_disable_regmap,
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
|
|
Loading…
Reference in New Issue