linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR()
@ 2016-06-21  6:59 Axel Lin
  2016-06-21 10:16 ` Keerthy
  2016-06-21 18:52 ` Applied "regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR()" to the regulator tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2016-06-21  6:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: Keerthy, Liam Girdwood, linux-kernel

No need to pass _nlr to LP873X_REGULATOR(), use ARRAY_SIZE to calculate it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/lp873x-regulator.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/lp873x-regulator.c b/drivers/regulator/lp873x-regulator.c
index b4ffd11..e504b91 100644
--- a/drivers/regulator/lp873x-regulator.c
+++ b/drivers/regulator/lp873x-regulator.c
@@ -20,7 +20,7 @@
 #include <linux/mfd/lp873x.h>
 
 #define LP873X_REGULATOR(_name, _id, _of, _ops, _n, _vr, _vm, _er, _em, \
-			 _delay, _lr, _nlr, _cr)			\
+			 _delay, _lr, _cr)				\
 	[_id] = {							\
 		.desc = {						\
 			.name			= _name,		\
@@ -37,7 +37,7 @@
 			.enable_mask		= _em,			\
 			.ramp_delay		= _delay,		\
 			.linear_ranges		= _lr,			\
-			.n_linear_ranges	= _nlr,			\
+			.n_linear_ranges	= ARRAY_SIZE(_lr),	\
 		},							\
 		.ctrl2_reg = _cr,					\
 	}
@@ -175,22 +175,20 @@ static const struct lp873x_regulator regulators[] = {
 			 256, LP873X_REG_BUCK0_VOUT,
 			 LP873X_BUCK0_VOUT_BUCK0_VSET, LP873X_REG_BUCK0_CTRL_1,
 			 LP873X_BUCK0_CTRL_1_BUCK0_EN, 10000,
-			 buck0_buck1_ranges, 4, LP873X_REG_BUCK0_CTRL_2),
+			 buck0_buck1_ranges, LP873X_REG_BUCK0_CTRL_2),
 	LP873X_REGULATOR("BUCK1", LP873X_BUCK_1, "buck1", lp873x_buck01_ops,
 			 256, LP873X_REG_BUCK1_VOUT,
 			 LP873X_BUCK1_VOUT_BUCK1_VSET, LP873X_REG_BUCK1_CTRL_1,
 			 LP873X_BUCK1_CTRL_1_BUCK1_EN, 10000,
-			 buck0_buck1_ranges, 4, LP873X_REG_BUCK1_CTRL_2),
+			 buck0_buck1_ranges, LP873X_REG_BUCK1_CTRL_2),
 	LP873X_REGULATOR("LDO0", LP873X_LDO_0, "ldo0", lp873x_ldo01_ops, 26,
 			 LP873X_REG_LDO0_VOUT, LP873X_LDO0_VOUT_LDO0_VSET,
 			 LP873X_REG_LDO0_CTRL,
-			 LP873X_LDO0_CTRL_LDO0_EN, 0, ldo0_ldo1_ranges, 1,
-			 0xFF),
+			 LP873X_LDO0_CTRL_LDO0_EN, 0, ldo0_ldo1_ranges, 0xFF),
 	LP873X_REGULATOR("LDO1", LP873X_LDO_1, "ldo1", lp873x_ldo01_ops, 26,
 			 LP873X_REG_LDO1_VOUT, LP873X_LDO1_VOUT_LDO1_VSET,
 			 LP873X_REG_LDO1_CTRL,
-			 LP873X_LDO1_CTRL_LDO1_EN, 0, ldo0_ldo1_ranges, 1,
-			 0xFF),
+			 LP873X_LDO1_CTRL_LDO1_EN, 0, ldo0_ldo1_ranges, 0xFF),
 };
 
 static int lp873x_regulator_probe(struct platform_device *pdev)
-- 
2.5.0

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

* Re: [PATCH] regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR()
  2016-06-21  6:59 [PATCH] regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR() Axel Lin
@ 2016-06-21 10:16 ` Keerthy
  2016-06-21 18:52 ` Applied "regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR()" to the regulator tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Keerthy @ 2016-06-21 10:16 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: Keerthy, Liam Girdwood, linux-kernel



On Tuesday 21 June 2016 12:29 PM, Axel Lin wrote:
> No need to pass _nlr to LP873X_REGULATOR(), use ARRAY_SIZE to calculate it.

Looks good to me.

Acked-by: Keerthy <j-keerthy@ti.com>

>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>   drivers/regulator/lp873x-regulator.c | 14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/regulator/lp873x-regulator.c b/drivers/regulator/lp873x-regulator.c
> index b4ffd11..e504b91 100644
> --- a/drivers/regulator/lp873x-regulator.c
> +++ b/drivers/regulator/lp873x-regulator.c
> @@ -20,7 +20,7 @@
>   #include <linux/mfd/lp873x.h>
>
>   #define LP873X_REGULATOR(_name, _id, _of, _ops, _n, _vr, _vm, _er, _em, \
> -			 _delay, _lr, _nlr, _cr)			\
> +			 _delay, _lr, _cr)				\
>   	[_id] = {							\
>   		.desc = {						\
>   			.name			= _name,		\
> @@ -37,7 +37,7 @@
>   			.enable_mask		= _em,			\
>   			.ramp_delay		= _delay,		\
>   			.linear_ranges		= _lr,			\
> -			.n_linear_ranges	= _nlr,			\
> +			.n_linear_ranges	= ARRAY_SIZE(_lr),	\
>   		},							\
>   		.ctrl2_reg = _cr,					\
>   	}
> @@ -175,22 +175,20 @@ static const struct lp873x_regulator regulators[] = {
>   			 256, LP873X_REG_BUCK0_VOUT,
>   			 LP873X_BUCK0_VOUT_BUCK0_VSET, LP873X_REG_BUCK0_CTRL_1,
>   			 LP873X_BUCK0_CTRL_1_BUCK0_EN, 10000,
> -			 buck0_buck1_ranges, 4, LP873X_REG_BUCK0_CTRL_2),
> +			 buck0_buck1_ranges, LP873X_REG_BUCK0_CTRL_2),
>   	LP873X_REGULATOR("BUCK1", LP873X_BUCK_1, "buck1", lp873x_buck01_ops,
>   			 256, LP873X_REG_BUCK1_VOUT,
>   			 LP873X_BUCK1_VOUT_BUCK1_VSET, LP873X_REG_BUCK1_CTRL_1,
>   			 LP873X_BUCK1_CTRL_1_BUCK1_EN, 10000,
> -			 buck0_buck1_ranges, 4, LP873X_REG_BUCK1_CTRL_2),
> +			 buck0_buck1_ranges, LP873X_REG_BUCK1_CTRL_2),
>   	LP873X_REGULATOR("LDO0", LP873X_LDO_0, "ldo0", lp873x_ldo01_ops, 26,
>   			 LP873X_REG_LDO0_VOUT, LP873X_LDO0_VOUT_LDO0_VSET,
>   			 LP873X_REG_LDO0_CTRL,
> -			 LP873X_LDO0_CTRL_LDO0_EN, 0, ldo0_ldo1_ranges, 1,
> -			 0xFF),
> +			 LP873X_LDO0_CTRL_LDO0_EN, 0, ldo0_ldo1_ranges, 0xFF),
>   	LP873X_REGULATOR("LDO1", LP873X_LDO_1, "ldo1", lp873x_ldo01_ops, 26,
>   			 LP873X_REG_LDO1_VOUT, LP873X_LDO1_VOUT_LDO1_VSET,
>   			 LP873X_REG_LDO1_CTRL,
> -			 LP873X_LDO1_CTRL_LDO1_EN, 0, ldo0_ldo1_ranges, 1,
> -			 0xFF),
> +			 LP873X_LDO1_CTRL_LDO1_EN, 0, ldo0_ldo1_ranges, 0xFF),
>   };
>
>   static int lp873x_regulator_probe(struct platform_device *pdev)
>

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

* Applied "regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR()" to the regulator tree
  2016-06-21  6:59 [PATCH] regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR() Axel Lin
  2016-06-21 10:16 ` Keerthy
@ 2016-06-21 18:52 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-06-21 18:52 UTC (permalink / raw)
  To: Axel Lin
  Cc: Keerthy, Mark Brown, Mark Brown, Keerthy, Liam Girdwood, linux-kernel

The patch

   regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR()

has been applied to the regulator tree at

   git://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 4335f6537a62df50c049427134fe07d9bc6354ab Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Tue, 21 Jun 2016 14:59:11 +0800
Subject: [PATCH] regulator: lp873x: Drop _nlr parameter from
 LP873X_REGULATOR()

No need to pass _nlr to LP873X_REGULATOR(), use ARRAY_SIZE to calculate it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/lp873x-regulator.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/lp873x-regulator.c b/drivers/regulator/lp873x-regulator.c
index b4ffd113ba21..e504b9148226 100644
--- a/drivers/regulator/lp873x-regulator.c
+++ b/drivers/regulator/lp873x-regulator.c
@@ -20,7 +20,7 @@
 #include <linux/mfd/lp873x.h>
 
 #define LP873X_REGULATOR(_name, _id, _of, _ops, _n, _vr, _vm, _er, _em, \
-			 _delay, _lr, _nlr, _cr)			\
+			 _delay, _lr, _cr)				\
 	[_id] = {							\
 		.desc = {						\
 			.name			= _name,		\
@@ -37,7 +37,7 @@
 			.enable_mask		= _em,			\
 			.ramp_delay		= _delay,		\
 			.linear_ranges		= _lr,			\
-			.n_linear_ranges	= _nlr,			\
+			.n_linear_ranges	= ARRAY_SIZE(_lr),	\
 		},							\
 		.ctrl2_reg = _cr,					\
 	}
@@ -175,22 +175,20 @@ static const struct lp873x_regulator regulators[] = {
 			 256, LP873X_REG_BUCK0_VOUT,
 			 LP873X_BUCK0_VOUT_BUCK0_VSET, LP873X_REG_BUCK0_CTRL_1,
 			 LP873X_BUCK0_CTRL_1_BUCK0_EN, 10000,
-			 buck0_buck1_ranges, 4, LP873X_REG_BUCK0_CTRL_2),
+			 buck0_buck1_ranges, LP873X_REG_BUCK0_CTRL_2),
 	LP873X_REGULATOR("BUCK1", LP873X_BUCK_1, "buck1", lp873x_buck01_ops,
 			 256, LP873X_REG_BUCK1_VOUT,
 			 LP873X_BUCK1_VOUT_BUCK1_VSET, LP873X_REG_BUCK1_CTRL_1,
 			 LP873X_BUCK1_CTRL_1_BUCK1_EN, 10000,
-			 buck0_buck1_ranges, 4, LP873X_REG_BUCK1_CTRL_2),
+			 buck0_buck1_ranges, LP873X_REG_BUCK1_CTRL_2),
 	LP873X_REGULATOR("LDO0", LP873X_LDO_0, "ldo0", lp873x_ldo01_ops, 26,
 			 LP873X_REG_LDO0_VOUT, LP873X_LDO0_VOUT_LDO0_VSET,
 			 LP873X_REG_LDO0_CTRL,
-			 LP873X_LDO0_CTRL_LDO0_EN, 0, ldo0_ldo1_ranges, 1,
-			 0xFF),
+			 LP873X_LDO0_CTRL_LDO0_EN, 0, ldo0_ldo1_ranges, 0xFF),
 	LP873X_REGULATOR("LDO1", LP873X_LDO_1, "ldo1", lp873x_ldo01_ops, 26,
 			 LP873X_REG_LDO1_VOUT, LP873X_LDO1_VOUT_LDO1_VSET,
 			 LP873X_REG_LDO1_CTRL,
-			 LP873X_LDO1_CTRL_LDO1_EN, 0, ldo0_ldo1_ranges, 1,
-			 0xFF),
+			 LP873X_LDO1_CTRL_LDO1_EN, 0, ldo0_ldo1_ranges, 0xFF),
 };
 
 static int lp873x_regulator_probe(struct platform_device *pdev)
-- 
2.8.1

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

end of thread, other threads:[~2016-06-21 18:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-21  6:59 [PATCH] regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR() Axel Lin
2016-06-21 10:16 ` Keerthy
2016-06-21 18:52 ` Applied "regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR()" 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).