[V4,2/5] regulator: qcom_smd: Add MP5496 S1 regulator

Message ID 20230407155727.20615-3-quic_devipriy@quicinc.com
State New
Headers
Series Add regulator support for IPQ9574 SoC |

Commit Message

Devi Priya April 7, 2023, 3:57 p.m. UTC
  Adding support for MP5496 S1 regulator on IPQ9574 SoC.

Co-developed-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
---
 Changes in V4:
	- Dropped struct mp5496_smpa1 which was the same as mp5496_smpa2
	  and renamed mp5496_smpa2 to mp5496_smps as suggested by Konrad
	
 drivers/regulator/qcom_smd-regulator.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

Konrad Dybcio April 7, 2023, 7:36 p.m. UTC | #1
On 7.04.2023 17:57, Devi Priya wrote:
> Adding support for MP5496 S1 regulator on IPQ9574 SoC.
> 
> Co-developed-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  Changes in V4:
> 	- Dropped struct mp5496_smpa1 which was the same as mp5496_smpa2
> 	  and renamed mp5496_smpa2 to mp5496_smps as suggested by Konrad
> 	
>  drivers/regulator/qcom_smd-regulator.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
> index 6f722b2d682e..18189f35db68 100644
> --- a/drivers/regulator/qcom_smd-regulator.c
> +++ b/drivers/regulator/qcom_smd-regulator.c
> @@ -749,7 +749,7 @@ static const struct regulator_desc pms405_pldo600 = {
>  	.ops = &rpm_smps_ldo_ops,
>  };
>  
> -static const struct regulator_desc mp5496_smpa2 = {
> +static const struct regulator_desc mp5496_smps = {
>  	.linear_ranges = (struct linear_range[]) {
>  		REGULATOR_LINEAR_RANGE(600000, 0, 127, 12500),
>  	},
> @@ -794,7 +794,8 @@ struct rpm_regulator_data {
>  };
>  
>  static const struct rpm_regulator_data rpm_mp5496_regulators[] = {
> -	{ "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smpa2, "s2" },
> +	{ "s1", QCOM_SMD_RPM_SMPA, 1, &mp5496_smps, "s1" },
> +	{ "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smps, "s2" },
>  	{ "l2", QCOM_SMD_RPM_LDOA, 2, &mp5496_ldoa2, "l2" },
>  	{}
>  };
  

Patch

diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index 6f722b2d682e..18189f35db68 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -749,7 +749,7 @@  static const struct regulator_desc pms405_pldo600 = {
 	.ops = &rpm_smps_ldo_ops,
 };
 
-static const struct regulator_desc mp5496_smpa2 = {
+static const struct regulator_desc mp5496_smps = {
 	.linear_ranges = (struct linear_range[]) {
 		REGULATOR_LINEAR_RANGE(600000, 0, 127, 12500),
 	},
@@ -794,7 +794,8 @@  struct rpm_regulator_data {
 };
 
 static const struct rpm_regulator_data rpm_mp5496_regulators[] = {
-	{ "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smpa2, "s2" },
+	{ "s1", QCOM_SMD_RPM_SMPA, 1, &mp5496_smps, "s1" },
+	{ "s2", QCOM_SMD_RPM_SMPA, 2, &mp5496_smps, "s2" },
 	{ "l2", QCOM_SMD_RPM_LDOA, 2, &mp5496_ldoa2, "l2" },
 	{}
 };