diff mbox series

[1/2] regulator: dt-bindings: Add PM8150x compatibles

Message ID 20190808093343.5600-1-vkoul@kernel.org
State Not Applicable, archived
Headers show
Series [1/2] regulator: dt-bindings: Add PM8150x compatibles | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Vinod Koul Aug. 8, 2019, 9:33 a.m. UTC
Add PM8150, PM8150L and PM8009 compatibles for these PMICs found
in some Qualcomm platforms.

Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 .../devicetree/bindings/regulator/qcom,rpmh-regulator.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Bjorn Andersson Aug. 9, 2019, 3:29 a.m. UTC | #1
On Thu 08 Aug 02:33 PDT 2019, Vinod Koul wrote:

> Add PM8150, PM8150L and PM8009 compatibles for these PMICs found
> in some Qualcomm platforms.
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>  .../devicetree/bindings/regulator/qcom,rpmh-regulator.txt | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> index 14d2eee96b3d..1a9cab50503a 100644
> --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> @@ -25,6 +25,9 @@ Supported regulator node names:
>  	PM8998:		smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
>  	PMI8998:	bob
>  	PM8005:		smps1 - smps4
> +	PM8150:		smps1 - smps10, ldo1 - ldo18
> +	PM8150L:	smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
> +	PM8009:		smps1 - smps2, ld01 - ldo7

Please maintain the sort order.

Apart from that

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

>  
>  ========================
>  First Level Nodes - PMIC
> @@ -35,7 +38,10 @@ First Level Nodes - PMIC
>  	Value type: <string>
>  	Definition: Must be one of: "qcom,pm8998-rpmh-regulators",
>  		    "qcom,pmi8998-rpmh-regulators" or
> -		    "qcom,pm8005-rpmh-regulators".
> +		    "qcom,pm8005-rpmh-regulators" or
> +		    "qcom,pm8150-rpmh-regulators" or
> +		    "qcom,pm8150l-rpmh-regulators" or
> +		    "qcom,pm8009-rpmh-regulators".
>  
>  - qcom,pmic-id
>  	Usage:      required
> -- 
> 2.20.1
>
Bjorn Andersson Aug. 9, 2019, 3:32 a.m. UTC | #2
On Thu 08 Aug 02:33 PDT 2019, Vinod Koul wrote:
> diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
[..]
> +static const struct rpmh_vreg_hw_data pmic5_bob = {
> +	.regulator_type = VRM,
> +	.ops = &rpmh_regulator_vrm_bypass_ops,
> +	.voltage_range = REGULATOR_LINEAR_RANGE(300000, 0, 135, 32000),
> +	.n_voltages = 135,

There are 136 voltages in [0,135]

> +	.pmic_mode_map = pmic_mode_map_pmic4_bob,
> +	.of_map_mode = rpmh_regulator_pmic4_bob_of_map_mode,
> +};
> +
[..]
> @@ -755,6 +890,18 @@ static const struct of_device_id rpmh_regulator_match_table[] = {
>  		.compatible = "qcom,pm8005-rpmh-regulators",
>  		.data = pm8005_vreg_data,
>  	},
> +	{
> +		.compatible = "qcom,pm8150-rpmh-regulators",
> +		.data = pm8150_vreg_data,
> +	},
> +	{
> +		.compatible = "qcom,pm8150l-rpmh-regulators",
> +		.data = pm8150l_vreg_data,
> +	},
> +	{
> +		.compatible = "qcom,pm8009-rpmh-regulators",
> +		.data = pm8009_vreg_data,
> +	},

Sort order...

>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table);

Apart from these nits this looks good.

Regards,
Bjorn
Vinod Koul Aug. 9, 2019, 4:43 a.m. UTC | #3
On 08-08-19, 20:29, Bjorn Andersson wrote:
> On Thu 08 Aug 02:33 PDT 2019, Vinod Koul wrote:
> 
> > Add PM8150, PM8150L and PM8009 compatibles for these PMICs found
> > in some Qualcomm platforms.
> > 
> > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > ---
> >  .../devicetree/bindings/regulator/qcom,rpmh-regulator.txt | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> > index 14d2eee96b3d..1a9cab50503a 100644
> > --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> > +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
> > @@ -25,6 +25,9 @@ Supported regulator node names:
> >  	PM8998:		smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
> >  	PMI8998:	bob
> >  	PM8005:		smps1 - smps4
> > +	PM8150:		smps1 - smps10, ldo1 - ldo18
> > +	PM8150L:	smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
> > +	PM8009:		smps1 - smps2, ld01 - ldo7
> 
> Please maintain the sort order.

Ah yes, Mark has applied the patch, I will send a sort order patch. Even
in previous entries, PM8005 should be the first one..

> 
> Apart from that
> 
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Thanks for the review.
Vinod Koul Aug. 9, 2019, 4:44 a.m. UTC | #4
On 08-08-19, 20:32, Bjorn Andersson wrote:
> On Thu 08 Aug 02:33 PDT 2019, Vinod Koul wrote:
> > diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
> [..]
> > +static const struct rpmh_vreg_hw_data pmic5_bob = {
> > +	.regulator_type = VRM,
> > +	.ops = &rpmh_regulator_vrm_bypass_ops,
> > +	.voltage_range = REGULATOR_LINEAR_RANGE(300000, 0, 135, 32000),
> > +	.n_voltages = 135,
> 
> There are 136 voltages in [0,135]

Oops, will send an update

> 
> > +	.pmic_mode_map = pmic_mode_map_pmic4_bob,
> > +	.of_map_mode = rpmh_regulator_pmic4_bob_of_map_mode,
> > +};
> > +
> [..]
> > @@ -755,6 +890,18 @@ static const struct of_device_id rpmh_regulator_match_table[] = {
> >  		.compatible = "qcom,pm8005-rpmh-regulators",
> >  		.data = pm8005_vreg_data,
> >  	},
> > +	{
> > +		.compatible = "qcom,pm8150-rpmh-regulators",
> > +		.data = pm8150_vreg_data,
> > +	},
> > +	{
> > +		.compatible = "qcom,pm8150l-rpmh-regulators",
> > +		.data = pm8150l_vreg_data,
> > +	},
> > +	{
> > +		.compatible = "qcom,pm8009-rpmh-regulators",
> > +		.data = pm8009_vreg_data,
> > +	},
> 
> Sort order...

Yes will sort all entries.

> >  	{}
> >  };
> >  MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table);
> 
> Apart from these nits this looks good.

Thanks :)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
index 14d2eee96b3d..1a9cab50503a 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt
@@ -25,6 +25,9 @@  Supported regulator node names:
 	PM8998:		smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
 	PMI8998:	bob
 	PM8005:		smps1 - smps4
+	PM8150:		smps1 - smps10, ldo1 - ldo18
+	PM8150L:	smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
+	PM8009:		smps1 - smps2, ld01 - ldo7
 
 ========================
 First Level Nodes - PMIC
@@ -35,7 +38,10 @@  First Level Nodes - PMIC
 	Value type: <string>
 	Definition: Must be one of: "qcom,pm8998-rpmh-regulators",
 		    "qcom,pmi8998-rpmh-regulators" or
-		    "qcom,pm8005-rpmh-regulators".
+		    "qcom,pm8005-rpmh-regulators" or
+		    "qcom,pm8150-rpmh-regulators" or
+		    "qcom,pm8150l-rpmh-regulators" or
+		    "qcom,pm8009-rpmh-regulators".
 
 - qcom,pmic-id
 	Usage:      required