diff options
author | Josh Cartwright <joshc@codeaurora.org> | 2014-11-20 14:41:25 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-21 14:20:58 -0500 |
commit | 0f5bb5b5de3b18877373f746bdb85d8ea0efeedf (patch) | |
tree | b25f0d5d03e94d1d05766b401e7ea142d7058b59 /drivers/regulator | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) |
regulator: rpm: add support for RPM-controller SMB208
The IPQ8064 reference boards make use of SMB208 regulators which are
controlled by RPM. Implement support for these regulators in the RPM
regulator driver.
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/qcom_rpm-regulator.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c index b55cd5b50ebe..fbcbd3fe501e 100644 --- a/drivers/regulator/qcom_rpm-regulator.c +++ b/drivers/regulator/qcom_rpm-regulator.c | |||
@@ -183,6 +183,13 @@ static const struct regulator_linear_range ftsmps_ranges[] = { | |||
183 | REGULATOR_LINEAR_RANGE(1500000, 64, 100, 50000), | 183 | REGULATOR_LINEAR_RANGE(1500000, 64, 100, 50000), |
184 | }; | 184 | }; |
185 | 185 | ||
186 | static const struct regulator_linear_range smb208_ranges[] = { | ||
187 | REGULATOR_LINEAR_RANGE( 375000, 0, 29, 12500), | ||
188 | REGULATOR_LINEAR_RANGE( 750000, 30, 89, 12500), | ||
189 | REGULATOR_LINEAR_RANGE(1500000, 90, 153, 25000), | ||
190 | REGULATOR_LINEAR_RANGE(3100000, 154, 234, 25000), | ||
191 | }; | ||
192 | |||
186 | static const struct regulator_linear_range ncp_ranges[] = { | 193 | static const struct regulator_linear_range ncp_ranges[] = { |
187 | REGULATOR_LINEAR_RANGE(1500000, 0, 31, 50000), | 194 | REGULATOR_LINEAR_RANGE(1500000, 0, 31, 50000), |
188 | }; | 195 | }; |
@@ -559,6 +566,16 @@ static const struct qcom_rpm_reg pm8921_switch = { | |||
559 | .parts = &rpm8960_switch_parts, | 566 | .parts = &rpm8960_switch_parts, |
560 | }; | 567 | }; |
561 | 568 | ||
569 | static const struct qcom_rpm_reg smb208_smps = { | ||
570 | .desc.linear_ranges = smb208_ranges, | ||
571 | .desc.n_linear_ranges = ARRAY_SIZE(smb208_ranges), | ||
572 | .desc.n_voltages = 235, | ||
573 | .desc.ops = &uV_ops, | ||
574 | .parts = &rpm8960_smps_parts, | ||
575 | .supports_force_mode_auto = false, | ||
576 | .supports_force_mode_bypass = false, | ||
577 | }; | ||
578 | |||
562 | static const struct of_device_id rpm_of_match[] = { | 579 | static const struct of_device_id rpm_of_match[] = { |
563 | { .compatible = "qcom,rpm-pm8058-pldo", .data = &pm8058_pldo }, | 580 | { .compatible = "qcom,rpm-pm8058-pldo", .data = &pm8058_pldo }, |
564 | { .compatible = "qcom,rpm-pm8058-nldo", .data = &pm8058_nldo }, | 581 | { .compatible = "qcom,rpm-pm8058-nldo", .data = &pm8058_nldo }, |
@@ -578,6 +595,8 @@ static const struct of_device_id rpm_of_match[] = { | |||
578 | { .compatible = "qcom,rpm-pm8921-ftsmps", .data = &pm8921_ftsmps }, | 595 | { .compatible = "qcom,rpm-pm8921-ftsmps", .data = &pm8921_ftsmps }, |
579 | { .compatible = "qcom,rpm-pm8921-ncp", .data = &pm8921_ncp }, | 596 | { .compatible = "qcom,rpm-pm8921-ncp", .data = &pm8921_ncp }, |
580 | { .compatible = "qcom,rpm-pm8921-switch", .data = &pm8921_switch }, | 597 | { .compatible = "qcom,rpm-pm8921-switch", .data = &pm8921_switch }, |
598 | |||
599 | { .compatible = "qcom,rpm-smb208", .data = &smb208_smps }, | ||
581 | { } | 600 | { } |
582 | }; | 601 | }; |
583 | MODULE_DEVICE_TABLE(of, rpm_of_match); | 602 | MODULE_DEVICE_TABLE(of, rpm_of_match); |