linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFT] regulator: mp5416: Fix output discharge enable bit for LDOs
@ 2020-02-12 15:02 Axel Lin
  2020-02-14 21:16 ` saravanan sekar
  2020-02-17 22:04 ` Applied "regulator: mp5416: Fix output discharge enable bit for LDOs" to the regulator tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2020-02-12 15:02 UTC (permalink / raw)
  To: Mark Brown; +Cc: Saravanan Sekar, Liam Girdwood, linux-kernel, Axel Lin

The .active_discharge_on/.active_discharge_mask settings does not match
the datasheet, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Saravanan,
I don't have the h/w to test, please help review and test this patch.

Thanks,
Axel

 drivers/regulator/mp5416.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/regulator/mp5416.c b/drivers/regulator/mp5416.c
index 7954ad17249b..67ce1b52a1a1 100644
--- a/drivers/regulator/mp5416.c
+++ b/drivers/regulator/mp5416.c
@@ -73,7 +73,7 @@
 		.owner			= THIS_MODULE,			\
 	}
 
-#define MP5416LDO(_name, _id)						\
+#define MP5416LDO(_name, _id, _dval)					\
 	[MP5416_LDO ## _id] = {						\
 		.id = MP5416_LDO ## _id,				\
 		.name = _name,						\
@@ -87,9 +87,9 @@
 		.vsel_mask = MP5416_MASK_VSET,				\
 		.enable_reg = MP5416_REG_LDO ##_id,			\
 		.enable_mask = MP5416_REGULATOR_EN,			\
-		.active_discharge_on	= BIT(_id),			\
+		.active_discharge_on	= _dval,			\
 		.active_discharge_reg	= MP5416_REG_CTL2,		\
-		.active_discharge_mask	= BIT(_id),			\
+		.active_discharge_mask	= _dval,			\
 		.owner			= THIS_MODULE,			\
 	}
 
@@ -155,10 +155,10 @@ static struct regulator_desc mp5416_regulators_desc[MP5416_MAX_REGULATORS] = {
 	MP5416BUCK("buck2", 2, mp5416_I_limits2, MP5416_REG_CTL1, BIT(1), 2),
 	MP5416BUCK("buck3", 3, mp5416_I_limits1, MP5416_REG_CTL1, BIT(2), 1),
 	MP5416BUCK("buck4", 4, mp5416_I_limits2, MP5416_REG_CTL2, BIT(5), 2),
-	MP5416LDO("ldo1", 1),
-	MP5416LDO("ldo2", 2),
-	MP5416LDO("ldo3", 3),
-	MP5416LDO("ldo4", 4),
+	MP5416LDO("ldo1", 1, BIT(4)),
+	MP5416LDO("ldo2", 2, BIT(3)),
+	MP5416LDO("ldo3", 3, BIT(2)),
+	MP5416LDO("ldo4", 4, BIT(1)),
 };
 
 /*
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RFT] regulator: mp5416: Fix output discharge enable bit for LDOs
  2020-02-12 15:02 [PATCH RFT] regulator: mp5416: Fix output discharge enable bit for LDOs Axel Lin
@ 2020-02-14 21:16 ` saravanan sekar
  2020-02-17 22:04 ` Applied "regulator: mp5416: Fix output discharge enable bit for LDOs" to the regulator tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: saravanan sekar @ 2020-02-14 21:16 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: Liam Girdwood, linux-kernel


On 12/02/20 4:02 pm, Axel Lin wrote:
> The .active_discharge_on/.active_discharge_mask settings does not match
> the datasheet, fix it.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> Hi Saravanan,
> I don't have the h/w to test, please help review and test this patch.

Thanks for pointing out, I have tested this patch and works as expected.

>
> Thanks,
> Axel
>
>   drivers/regulator/mp5416.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/regulator/mp5416.c b/drivers/regulator/mp5416.c
> index 7954ad17249b..67ce1b52a1a1 100644
> --- a/drivers/regulator/mp5416.c
> +++ b/drivers/regulator/mp5416.c
> @@ -73,7 +73,7 @@
>   		.owner			= THIS_MODULE,			\
>   	}
>   
> -#define MP5416LDO(_name, _id)						\
> +#define MP5416LDO(_name, _id, _dval)					\
>   	[MP5416_LDO ## _id] = {						\
>   		.id = MP5416_LDO ## _id,				\
>   		.name = _name,						\
> @@ -87,9 +87,9 @@
>   		.vsel_mask = MP5416_MASK_VSET,				\
>   		.enable_reg = MP5416_REG_LDO ##_id,			\
>   		.enable_mask = MP5416_REGULATOR_EN,			\
> -		.active_discharge_on	= BIT(_id),			\
> +		.active_discharge_on	= _dval,			\
>   		.active_discharge_reg	= MP5416_REG_CTL2,		\
> -		.active_discharge_mask	= BIT(_id),			\
> +		.active_discharge_mask	= _dval,			\
>   		.owner			= THIS_MODULE,			\
>   	}
>   
> @@ -155,10 +155,10 @@ static struct regulator_desc mp5416_regulators_desc[MP5416_MAX_REGULATORS] = {
>   	MP5416BUCK("buck2", 2, mp5416_I_limits2, MP5416_REG_CTL1, BIT(1), 2),
>   	MP5416BUCK("buck3", 3, mp5416_I_limits1, MP5416_REG_CTL1, BIT(2), 1),
>   	MP5416BUCK("buck4", 4, mp5416_I_limits2, MP5416_REG_CTL2, BIT(5), 2),
> -	MP5416LDO("ldo1", 1),
> -	MP5416LDO("ldo2", 2),
> -	MP5416LDO("ldo3", 3),
> -	MP5416LDO("ldo4", 4),
> +	MP5416LDO("ldo1", 1, BIT(4)),
> +	MP5416LDO("ldo2", 2, BIT(3)),
> +	MP5416LDO("ldo3", 3, BIT(2)),
> +	MP5416LDO("ldo4", 4, BIT(1)),
>   };
>   
>   /*

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Applied "regulator: mp5416: Fix output discharge enable bit for LDOs" to the regulator tree
  2020-02-12 15:02 [PATCH RFT] regulator: mp5416: Fix output discharge enable bit for LDOs Axel Lin
  2020-02-14 21:16 ` saravanan sekar
@ 2020-02-17 22:04 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-02-17 22:04 UTC (permalink / raw)
  To: Axel Lin; +Cc: Liam Girdwood, linux-kernel, Mark Brown, Saravanan Sekar

The patch

   regulator: mp5416: Fix output discharge enable bit for LDOs

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 502cdd605edd95209661c8bf90927af6d05c011c Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Wed, 12 Feb 2020 23:02:23 +0800
Subject: [PATCH] regulator: mp5416: Fix output discharge enable bit for LDOs

The .active_discharge_on/.active_discharge_mask settings does not match
the datasheet, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20200212150223.20042-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/mp5416.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/regulator/mp5416.c b/drivers/regulator/mp5416.c
index 7954ad17249b..67ce1b52a1a1 100644
--- a/drivers/regulator/mp5416.c
+++ b/drivers/regulator/mp5416.c
@@ -73,7 +73,7 @@
 		.owner			= THIS_MODULE,			\
 	}
 
-#define MP5416LDO(_name, _id)						\
+#define MP5416LDO(_name, _id, _dval)					\
 	[MP5416_LDO ## _id] = {						\
 		.id = MP5416_LDO ## _id,				\
 		.name = _name,						\
@@ -87,9 +87,9 @@
 		.vsel_mask = MP5416_MASK_VSET,				\
 		.enable_reg = MP5416_REG_LDO ##_id,			\
 		.enable_mask = MP5416_REGULATOR_EN,			\
-		.active_discharge_on	= BIT(_id),			\
+		.active_discharge_on	= _dval,			\
 		.active_discharge_reg	= MP5416_REG_CTL2,		\
-		.active_discharge_mask	= BIT(_id),			\
+		.active_discharge_mask	= _dval,			\
 		.owner			= THIS_MODULE,			\
 	}
 
@@ -155,10 +155,10 @@ static struct regulator_desc mp5416_regulators_desc[MP5416_MAX_REGULATORS] = {
 	MP5416BUCK("buck2", 2, mp5416_I_limits2, MP5416_REG_CTL1, BIT(1), 2),
 	MP5416BUCK("buck3", 3, mp5416_I_limits1, MP5416_REG_CTL1, BIT(2), 1),
 	MP5416BUCK("buck4", 4, mp5416_I_limits2, MP5416_REG_CTL2, BIT(5), 2),
-	MP5416LDO("ldo1", 1),
-	MP5416LDO("ldo2", 2),
-	MP5416LDO("ldo3", 3),
-	MP5416LDO("ldo4", 4),
+	MP5416LDO("ldo1", 1, BIT(4)),
+	MP5416LDO("ldo2", 2, BIT(3)),
+	MP5416LDO("ldo3", 3, BIT(2)),
+	MP5416LDO("ldo4", 4, BIT(1)),
 };
 
 /*
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-17 22:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 15:02 [PATCH RFT] regulator: mp5416: Fix output discharge enable bit for LDOs Axel Lin
2020-02-14 21:16 ` saravanan sekar
2020-02-17 22:04 ` Applied "regulator: mp5416: Fix output discharge enable bit for LDOs" to the regulator tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).