ipq: more v4.9 fixes
[openwrt/staging/blogic.git] / target / linux / ipq806x / patches-4.9 / 0053-regulator-add-smb208-support.patch
1 From ef10381ca4d01848ebedb4afb2c78feb8052f103 Mon Sep 17 00:00:00 2001
2 From: Adrian Panella <ianchi74@outlook.com>
3 Date: Thu, 9 Mar 2017 08:26:54 +0100
4 Subject: [PATCH 53/69] regulator: add smb208 support
5
6 Signed-off-by: Adrian Panella <ianchi74@outlook.com>
7 ---
8 Documentation/devicetree/bindings/mfd/qcom-rpm.txt | 4 ++++
9 drivers/regulator/qcom_rpm-regulator.c | 9 +++++++++
10 2 files changed, 13 insertions(+)
11
12 diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt
13 index 485bc59fcc48..6131f6863305 100644
14 --- a/Documentation/devicetree/bindings/mfd/qcom-rpm.txt
15 +++ b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt
16 @@ -61,6 +61,7 @@ Regulator nodes are identified by their compatible:
17 "qcom,rpm-pm8901-regulators"
18 "qcom,rpm-pm8921-regulators"
19 "qcom,rpm-pm8018-regulators"
20 + "qcom,rpm-smb208-regulators"
21
22 - vdd_l0_l1_lvs-supply:
23 - vdd_l2_l11_l12-supply:
24 @@ -171,6 +172,9 @@ pm8018:
25 s1, s2, s3, s4, s5, , l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
26 l12, l14, lvs1
27
28 +smb208:
29 + s1a, s1b, s2a, s2b
30 +
31 The content of each sub-node is defined by the standard binding for regulators -
32 see regulator.txt - with additional custom properties described below:
33
34 diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c
35 index 1b2acc43fea1..54c28454b472 100644
36 --- a/drivers/regulator/qcom_rpm-regulator.c
37 +++ b/drivers/regulator/qcom_rpm-regulator.c
38 @@ -933,12 +933,21 @@ static const struct rpm_regulator_data rpm_pm8921_regulators[] = {
39 { }
40 };
41
42 +static const struct rpm_regulator_data rpm_smb208_regulators[] = {
43 + { "s1a", QCOM_RPM_SMB208_S1a, &smb208_smps, "vin_s1a" },
44 + { "s1b", QCOM_RPM_SMB208_S1b, &smb208_smps, "vin_s1b" },
45 + { "s2a", QCOM_RPM_SMB208_S2a, &smb208_smps, "vin_s2a" },
46 + { "s2b", QCOM_RPM_SMB208_S2b, &smb208_smps, "vin_s2b" },
47 + { }
48 +};
49 +
50 static const struct of_device_id rpm_of_match[] = {
51 { .compatible = "qcom,rpm-pm8018-regulators",
52 .data = &rpm_pm8018_regulators },
53 { .compatible = "qcom,rpm-pm8058-regulators", .data = &rpm_pm8058_regulators },
54 { .compatible = "qcom,rpm-pm8901-regulators", .data = &rpm_pm8901_regulators },
55 { .compatible = "qcom,rpm-pm8921-regulators", .data = &rpm_pm8921_regulators },
56 + { .compatible = "qcom,rpm-smb208-regulators", .data = &rpm_smb208_regulators },
57 { }
58 };
59 MODULE_DEVICE_TABLE(of, rpm_of_match);
60 --
61 2.11.0
62