* [PATCH] regulator: qcom_spmi: Add support for pmi8994
@ 2017-11-02 9:24 Rajendra Nayak
2017-11-02 17:58 ` Stephen Boyd
0 siblings, 1 reply; 3+ messages in thread
From: Rajendra Nayak @ 2017-11-02 9:24 UTC (permalink / raw)
To: broonie; +Cc: linux-arm-msm, linux-arm, sboyd, Rajendra Nayak
Document the regulators available on pmi8994 and add support for
this PMIC to the SPMI PMIC regulator driver.
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
---
.../devicetree/bindings/regulator/qcom,spmi-regulator.txt | 13 +++++++++++++
drivers/regulator/qcom_spmi-regulator.c | 9 +++++++++
2 files changed, 22 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
index 0fa3b0f..57d2c65 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
@@ -8,6 +8,7 @@ Qualcomm SPMI Regulators
"qcom,pm8916-regulators"
"qcom,pm8941-regulators"
"qcom,pm8994-regulators"
+ "qcom,pmi8994-regulators"
- interrupts:
Usage: optional
@@ -100,6 +101,15 @@ Qualcomm SPMI Regulators
Definition: Reference to regulator supplying the input pin, as
described in the data sheet.
+- vdd_s1-supply:
+- vdd_s2-supply:
+- vdd_s3-supply:
+- vdd_l1-supply:
+ Usage: optional (pmi8994 only)
+ Value type: <phandle>
+ Definition: Reference to regulator supplying the input pin, as
+ described in the data sheet.
+
The regulator node houses sub-nodes for each regulator within the device. Each
sub-node is identified using the node's name, with valid values listed for each
@@ -122,6 +132,9 @@ pm8994:
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
+pmi8994:
+ s1, s2, s3, l1
+
The content of each sub-node is defined by the standard binding for regulators -
see regulator.txt - with additional custom properties described below:
diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
index 16c5f84..9f8eb5d 100644
--- a/drivers/regulator/qcom_spmi-regulator.c
+++ b/drivers/regulator/qcom_spmi-regulator.c
@@ -1619,11 +1619,20 @@ static int spmi_regulator_of_parse(struct device_node *node,
{ }
};
+static const struct spmi_regulator_data pmi8994_regulators[] = {
+ { "s1", 0x1400, "vdd_s1", },
+ { "s2", 0x1700, "vdd_s2", },
+ { "s3", 0x1a00, "vdd_s3", },
+ { "l1", 0x4000, "vdd_l1", },
+ { }
+};
+
static const struct of_device_id qcom_spmi_regulator_match[] = {
{ .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators },
{ .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators },
{ .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators },
{ .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators },
+ { .compatible = "qcom,pmi8994-regulators", .data = &pmi8994_regulators },
{ }
};
MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match);
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] regulator: qcom_spmi: Add support for pmi8994
2017-11-02 9:24 [PATCH] regulator: qcom_spmi: Add support for pmi8994 Rajendra Nayak
@ 2017-11-02 17:58 ` Stephen Boyd
2017-11-03 2:33 ` Rajendra Nayak
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2017-11-02 17:58 UTC (permalink / raw)
To: Rajendra Nayak, broonie; +Cc: linux-arm-msm, linux-arm
On 11/02/2017 02:24 AM, Rajendra Nayak wrote:
> Document the regulators available on pmi8994 and add support for
> this PMIC to the SPMI PMIC regulator driver.
>
> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
> diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
> index 16c5f84..9f8eb5d 100644
> --- a/drivers/regulator/qcom_spmi-regulator.c
> +++ b/drivers/regulator/qcom_spmi-regulator.c
> @@ -1619,11 +1619,20 @@ static int spmi_regulator_of_parse(struct device_node *node,
> { }
> };
>
> +static const struct spmi_regulator_data pmi8994_regulators[] = {
> + { "s1", 0x1400, "vdd_s1", },
> + { "s2", 0x1700, "vdd_s2", },
> + { "s3", 0x1a00, "vdd_s3", },
> + { "l1", 0x4000, "vdd_l1", },
> + { }
Should be a tab instead of spaces?
> +};
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] regulator: qcom_spmi: Add support for pmi8994
2017-11-02 17:58 ` Stephen Boyd
@ 2017-11-03 2:33 ` Rajendra Nayak
0 siblings, 0 replies; 3+ messages in thread
From: Rajendra Nayak @ 2017-11-03 2:33 UTC (permalink / raw)
To: Stephen Boyd, broonie; +Cc: linux-arm-msm, linux-arm
On 11/02/2017 11:28 PM, Stephen Boyd wrote:
> On 11/02/2017 02:24 AM, Rajendra Nayak wrote:
>> Document the regulators available on pmi8994 and add support for
>> this PMIC to the SPMI PMIC regulator driver.
>>
>> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
>
> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
> Tested-by: Stephen Boyd <sboyd@codeaurora.org>
thanks
>
>> diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
>> index 16c5f84..9f8eb5d 100644
>> --- a/drivers/regulator/qcom_spmi-regulator.c
>> +++ b/drivers/regulator/qcom_spmi-regulator.c
>> @@ -1619,11 +1619,20 @@ static int spmi_regulator_of_parse(struct device_node *node,
>> { }
>> };
>>
>> +static const struct spmi_regulator_data pmi8994_regulators[] = {
>> + { "s1", 0x1400, "vdd_s1", },
>> + { "s2", 0x1700, "vdd_s2", },
>> + { "s3", 0x1a00, "vdd_s3", },
>> + { "l1", 0x4000, "vdd_l1", },
>> + { }
>
> Should be a tab instead of spaces?
Oops, looks like Mark already applied this :/
>
>> +};
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-03 2:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-02 9:24 [PATCH] regulator: qcom_spmi: Add support for pmi8994 Rajendra Nayak
2017-11-02 17:58 ` Stephen Boyd
2017-11-03 2:33 ` Rajendra Nayak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox