Skip to content

Commit

Permalink
regulator: add smb208 support
Browse files Browse the repository at this point in the history
Smb208 regulators are used on some ipq806x soc.
Add support for it to make it avaiable on some routers
that use it.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Adrian Panella <ianchi74@outlook.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200219163711.479-1-ansuelsmth@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Ansuel Smith authored and Mark Brown committed Feb 26, 2020
1 parent a0fc8b6 commit b5f2530
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/mfd/qcom-rpm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Regulator nodes are identified by their compatible:
"qcom,rpm-pm8901-regulators"
"qcom,rpm-pm8921-regulators"
"qcom,rpm-pm8018-regulators"
"qcom,rpm-smb208-regulators"

- vdd_l0_l1_lvs-supply:
- vdd_l2_l11_l12-supply:
Expand Down Expand Up @@ -171,6 +172,9 @@ pm8018:
s1, s2, s3, s4, s5, , l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
l12, l14, lvs1

smb208:
s1a, s1b, s2a, s2b

The content of each sub-node is defined by the standard binding for regulators -
see regulator.txt - with additional custom properties described below:

Expand Down
9 changes: 9 additions & 0 deletions drivers/regulator/qcom_rpm-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,12 +925,21 @@ static const struct rpm_regulator_data rpm_pm8921_regulators[] = {
{ }
};

static const struct rpm_regulator_data rpm_smb208_regulators[] = {
{ "s1a", QCOM_RPM_SMB208_S1a, &smb208_smps, "vin_s1a" },
{ "s1b", QCOM_RPM_SMB208_S1b, &smb208_smps, "vin_s1b" },
{ "s2a", QCOM_RPM_SMB208_S2a, &smb208_smps, "vin_s2a" },
{ "s2b", QCOM_RPM_SMB208_S2b, &smb208_smps, "vin_s2b" },
{ }
};

static const struct of_device_id rpm_of_match[] = {
{ .compatible = "qcom,rpm-pm8018-regulators",
.data = &rpm_pm8018_regulators },
{ .compatible = "qcom,rpm-pm8058-regulators", .data = &rpm_pm8058_regulators },
{ .compatible = "qcom,rpm-pm8901-regulators", .data = &rpm_pm8901_regulators },
{ .compatible = "qcom,rpm-pm8921-regulators", .data = &rpm_pm8921_regulators },
{ .compatible = "qcom,rpm-smb208-regulators", .data = &rpm_smb208_regulators },
{ }
};
MODULE_DEVICE_TABLE(of, rpm_of_match);
Expand Down

0 comments on commit b5f2530

Please sign in to comment.