public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error
@ 2013-04-03  2:30 Axel Lin
  2013-04-03  2:32 ` [PATCH 2/4] regulator: ab8500: Remove voltages and voltages_len " Axel Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Axel Lin @ 2013-04-03  2:30 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

The delay field is removed from struct ab8500_regulator_info in commit 29234928
"regulator: ab8500: Remove set_voltage_time_sel and delay setting".

In additional, current delay setting does not make sense at all.
ab8500_regulator_mode_ops is for fixed voltage only, which does not need
set_voltage_time_sel. All ab8540_aux3_regulator_volt_mode_ops users do not have
delay settings so set_voltage_time_sel actually returns 0.

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

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index ef12d3d..abdfbd4 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -633,15 +633,6 @@ static int ab8540_aux3_regulator_set_voltage_sel(struct regulator_dev *rdev,
 	return ret;
 }
 
-static int ab8500_regulator_set_voltage_time_sel(struct regulator_dev *rdev,
-					     unsigned int old_sel,
-					     unsigned int new_sel)
-{
-	struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
-
-	return info->delay;
-}
-
 static struct regulator_ops ab8500_regulator_volt_mode_ops = {
 	.enable			= ab8500_regulator_enable,
 	.disable		= ab8500_regulator_disable,
@@ -664,7 +655,6 @@ static struct regulator_ops ab8540_aux3_regulator_volt_mode_ops = {
 	.get_voltage_sel = ab8540_aux3_regulator_get_voltage_sel,
 	.set_voltage_sel = ab8540_aux3_regulator_set_voltage_sel,
 	.list_voltage	= regulator_list_voltage_table,
-	.set_voltage_time_sel = ab8500_regulator_set_voltage_time_sel,
 };
 
 static struct regulator_ops ab8500_regulator_volt_ops = {
@@ -674,7 +664,6 @@ static struct regulator_ops ab8500_regulator_volt_ops = {
 	.get_voltage_sel = ab8500_regulator_get_voltage_sel,
 	.set_voltage_sel = ab8500_regulator_set_voltage_sel,
 	.list_voltage	= regulator_list_voltage_table,
-	.set_voltage_time_sel = ab8500_regulator_set_voltage_time_sel,
 };
 
 static struct regulator_ops ab8500_regulator_mode_ops = {
@@ -1092,7 +1081,6 @@ static struct ab8500_regulator_info
 			.n_voltages	= 1,
 			.volt_table	= fixed_2000000_voltage,
 		},
-		.delay			= 10000,
 		.load_lp_uA		= 1000,
 		.update_bank		= 0x03,
 		.update_reg		= 0x80,
@@ -1357,7 +1345,6 @@ static struct ab8500_regulator_info
 			.n_voltages	= 1,
 			.volt_table	= fixed_2000000_voltage,
 		},
-		.delay			= 10000,
 		.load_lp_uA		= 1000,
 		.update_bank		= 0x03,
 		.update_reg		= 0x80,
@@ -1606,7 +1593,6 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= 1,
 		},
-		.delay			= 10000,
 		.load_lp_uA		= 1000,
 		.update_bank		= 0x03,
 		.update_reg		= 0x80,
-- 
1.7.10.4




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

* [PATCH 2/4] regulator: ab8500: Remove voltages and voltages_len to fix build error
  2013-04-03  2:30 [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Axel Lin
@ 2013-04-03  2:32 ` Axel Lin
  2013-04-03  2:33 ` [PATCH 3/4] regulator: ab8500: Fix 'match_size' undeclared and missing semicolon Axel Lin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Axel Lin @ 2013-04-03  2:32 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

Both voltages and voltages_len are not exist in struct ab8500_regulator_info.

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

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index abdfbd4..bdd17e6 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -1124,8 +1124,6 @@ static struct ab8500_regulator_info
 		.voltage_reg		= 0x57,
 		.voltage_mask		= 0x7,
 		.voltage_shift		= 4,
-		.voltages		= ldo_vaudio_voltages,
-		.voltages_len		= ARRAY_SIZE(ldo_vaudio_voltages),
 	},
 	[AB8505_LDO_ANAMIC1] = {
 		.desc = {
@@ -1207,8 +1205,6 @@ static struct ab8500_regulator_info
 		.voltage_bank		= 0x04,
 		.voltage_reg		= 0x29,
 		.voltage_mask		= 0x7,
-		.voltages		= ldo_vana_voltages,
-		.voltages_len		= ARRAY_SIZE(ldo_vana_voltages),
 	},
 };
 
@@ -1666,6 +1662,7 @@ static struct ab8500_regulator_info
 			.id		= AB8540_LDO_DMIC,
 			.owner		= THIS_MODULE,
 			.n_voltages	= ARRAY_SIZE(ldo_vdmic_voltages),
+			.volt_table	= ldo_vdmic_voltages,
 		},
 		.load_lp_uA		= 1000,
 		.update_bank		= 0x03,
@@ -1675,8 +1672,6 @@ static struct ab8500_regulator_info
 		.voltage_bank		= 0x03,
 		.voltage_reg		= 0x83,
 		.voltage_mask		= 0xc0,
-		.voltages		= ldo_vdmic_voltages,
-		.voltages_len		= ARRAY_SIZE(ldo_vdmic_voltages),
 	},
 
 	/*
-- 
1.7.10.4




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

* [PATCH 3/4] regulator: ab8500: Fix 'match_size' undeclared and missing semicolon
  2013-04-03  2:30 [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Axel Lin
  2013-04-03  2:32 ` [PATCH 2/4] regulator: ab8500: Remove voltages and voltages_len " Axel Lin
@ 2013-04-03  2:33 ` Axel Lin
  2013-04-03  8:22   ` Lee Jones
  2013-04-03  2:34 ` [PATCH 4/4] regulator: ab8500: Set match pointer and match_size for ab8505 and ab8540 Axel Lin
  2013-04-03 17:42 ` [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Mark Brown
  3 siblings, 1 reply; 8+ messages in thread
From: Axel Lin @ 2013-04-03  2:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

Fix below build errors:
  CC      drivers/regulator/ab8500.o
drivers/regulator/ab8500.c: In function 'ab8500_regulator_probe':
drivers/regulator/ab8500.c:3018:3: error: 'match_size' undeclared (first use in this function)
drivers/regulator/ab8500.c:3018:3: note: each undeclared identifier is reported only once for each function it appears in
drivers/regulator/ab8500.c:3019:2: error: expected ';' before '}' token
drivers/regulator/ab8500.c:3036:2: error: expected ';' before '}' token

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

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index bdd17e6..73d84d8 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -3007,7 +3007,7 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
 	struct ab8500_regulator_info *regulator_info;
 	int regulator_info_size;
 	struct ab8500_reg_init *reg_init;
-	int reg_init_size;
+	int reg_init_size, match_size;
 
 	if (is_ab9540(ab8500)) {
 		regulator_info = ab9540_regulator_info;
@@ -3015,7 +3015,7 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
 		reg_init = ab9540_reg_init;
 		reg_init_size = AB9540_NUM_REGULATOR_REGISTERS;
 		match = ab9540_regulator_match;
-		match_size = ARRAY_SIZE(ab9540_regulator_match)
+		match_size = ARRAY_SIZE(ab9540_regulator_match);
 	} else if (is_ab8505(ab8500)) {
 		regulator_info = ab8505_regulator_info;
 		regulator_info_size = ARRAY_SIZE(ab8505_regulator_info);
@@ -3032,7 +3032,7 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
 		reg_init = ab8500_reg_init;
 		reg_init_size = AB8500_NUM_REGULATOR_REGISTERS;
 		match = ab8500_regulator_match;
-		match_size = ARRAY_SIZE(ab8500_regulator_match)
+		match_size = ARRAY_SIZE(ab8500_regulator_match);
 	}
 
 	if (np) {
-- 
1.7.10.4




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

* [PATCH 4/4] regulator: ab8500: Set match pointer and match_size for ab8505 and ab8540
  2013-04-03  2:30 [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Axel Lin
  2013-04-03  2:32 ` [PATCH 2/4] regulator: ab8500: Remove voltages and voltages_len " Axel Lin
  2013-04-03  2:33 ` [PATCH 3/4] regulator: ab8500: Fix 'match_size' undeclared and missing semicolon Axel Lin
@ 2013-04-03  2:34 ` Axel Lin
  2013-04-03  8:24   ` Lee Jones
  2013-04-03 17:42 ` [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Mark Brown
  3 siblings, 1 reply; 8+ messages in thread
From: Axel Lin @ 2013-04-03  2:34 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

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

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 73d84d8..d3170ae 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -3021,11 +3021,15 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
 		regulator_info_size = ARRAY_SIZE(ab8505_regulator_info);
 		reg_init = ab8505_reg_init;
 		reg_init_size = AB8505_NUM_REGULATOR_REGISTERS;
+		match = ab8505_regulator_match;
+		match_size = ARRAY_SIZE(ab8505_regulator_match);
 	} else if (is_ab8540(ab8500)) {
 		regulator_info = ab8540_regulator_info;
 		regulator_info_size = ARRAY_SIZE(ab8540_regulator_info);
 		reg_init = ab8540_reg_init;
 		reg_init_size = AB8540_NUM_REGULATOR_REGISTERS;
+		match = ab8540_regulator_match;
+		match_size = ARRAY_SIZE(ab8540_regulator_match);
 	} else {
 		regulator_info = ab8500_regulator_info;
 		regulator_info_size = ARRAY_SIZE(ab8500_regulator_info);
-- 
1.7.10.4




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

* Re: [PATCH 3/4] regulator: ab8500: Fix 'match_size' undeclared and missing semicolon
  2013-04-03  2:33 ` [PATCH 3/4] regulator: ab8500: Fix 'match_size' undeclared and missing semicolon Axel Lin
@ 2013-04-03  8:22   ` Lee Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-04-03  8:22 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Bengt Jonsson, Yvan FILLION, Liam Girdwood,
	linux-kernel

On Wed, 03 Apr 2013, Axel Lin wrote:

> Fix below build errors:
>   CC      drivers/regulator/ab8500.o
> drivers/regulator/ab8500.c: In function 'ab8500_regulator_probe':
> drivers/regulator/ab8500.c:3018:3: error: 'match_size' undeclared (first use in this function)
> drivers/regulator/ab8500.c:3018:3: note: each undeclared identifier is reported only once for each function it appears in
> drivers/regulator/ab8500.c:3019:2: error: expected ';' before '}' token
> drivers/regulator/ab8500.c:3036:2: error: expected ';' before '}' token
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/regulator/ab8500.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
> index bdd17e6..73d84d8 100644
> --- a/drivers/regulator/ab8500.c
> +++ b/drivers/regulator/ab8500.c
> @@ -3007,7 +3007,7 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
>  	struct ab8500_regulator_info *regulator_info;
>  	int regulator_info_size;
>  	struct ab8500_reg_init *reg_init;
> -	int reg_init_size;
> +	int reg_init_size, match_size;
>  
>  	if (is_ab9540(ab8500)) {
>  		regulator_info = ab9540_regulator_info;
> @@ -3015,7 +3015,7 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
>  		reg_init = ab9540_reg_init;
>  		reg_init_size = AB9540_NUM_REGULATOR_REGISTERS;
>  		match = ab9540_regulator_match;
> -		match_size = ARRAY_SIZE(ab9540_regulator_match)
> +		match_size = ARRAY_SIZE(ab9540_regulator_match);
>  	} else if (is_ab8505(ab8500)) {
>  		regulator_info = ab8505_regulator_info;
>  		regulator_info_size = ARRAY_SIZE(ab8505_regulator_info);
> @@ -3032,7 +3032,7 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
>  		reg_init = ab8500_reg_init;
>  		reg_init_size = AB8500_NUM_REGULATOR_REGISTERS;
>  		match = ab8500_regulator_match;
> -		match_size = ARRAY_SIZE(ab8500_regulator_match)
> +		match_size = ARRAY_SIZE(ab8500_regulator_match);
>  	}
>  
>  	if (np) {

We already satisfy this requirement in:

"regulator: ab8500: Use a struct to select the good regulator
configuration"

... which is queued.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 4/4] regulator: ab8500: Set match pointer and match_size for ab8505 and ab8540
  2013-04-03  2:34 ` [PATCH 4/4] regulator: ab8500: Set match pointer and match_size for ab8505 and ab8540 Axel Lin
@ 2013-04-03  8:24   ` Lee Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2013-04-03  8:24 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Bengt Jonsson, Yvan FILLION, Liam Girdwood,
	linux-kernel

On Wed, 03 Apr 2013, Axel Lin wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/regulator/ab8500.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
> index 73d84d8..d3170ae 100644
> --- a/drivers/regulator/ab8500.c
> +++ b/drivers/regulator/ab8500.c
> @@ -3021,11 +3021,15 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
>  		regulator_info_size = ARRAY_SIZE(ab8505_regulator_info);
>  		reg_init = ab8505_reg_init;
>  		reg_init_size = AB8505_NUM_REGULATOR_REGISTERS;
> +		match = ab8505_regulator_match;
> +		match_size = ARRAY_SIZE(ab8505_regulator_match);
>  	} else if (is_ab8540(ab8500)) {
>  		regulator_info = ab8540_regulator_info;
>  		regulator_info_size = ARRAY_SIZE(ab8540_regulator_info);
>  		reg_init = ab8540_reg_init;
>  		reg_init_size = AB8540_NUM_REGULATOR_REGISTERS;
> +		match = ab8540_regulator_match;
> +		match_size = ARRAY_SIZE(ab8540_regulator_match);
>  	} else {
>  		regulator_info = ab8500_regulator_info;
>  		regulator_info_size = ARRAY_SIZE(ab8500_regulator_info);

Hmm... looks like a merge error, sorry for that.

Again is solved by the next patch in Mark's list:

"regulator: ab8500: Use a struct to select the good regulator
configuration"

Ironically Mark this is No11.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error
  2013-04-03  2:30 [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Axel Lin
                   ` (2 preceding siblings ...)
  2013-04-03  2:34 ` [PATCH 4/4] regulator: ab8500: Set match pointer and match_size for ab8505 and ab8540 Axel Lin
@ 2013-04-03 17:42 ` Mark Brown
  2013-04-03 22:01   ` Axel Lin
  3 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2013-04-03 17:42 UTC (permalink / raw)
  To: Axel Lin
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On Wed, Apr 03, 2013 at 10:30:43AM +0800, Axel Lin wrote:
> The delay field is removed from struct ab8500_regulator_info in commit 29234928
> "regulator: ab8500: Remove set_voltage_time_sel and delay setting".

I've now finished applying all Lee's outstanding patches (which weren't
sent to the list...) - could you please recheck if the first two of
these patches are still revlevant and that the last two are addressed
properly as per Lee's mails?  Thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error
  2013-04-03 17:42 ` [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Mark Brown
@ 2013-04-03 22:01   ` Axel Lin
  0 siblings, 0 replies; 8+ messages in thread
From: Axel Lin @ 2013-04-03 22:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

2013/4/4 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Wed, Apr 03, 2013 at 10:30:43AM +0800, Axel Lin wrote:
>> The delay field is removed from struct ab8500_regulator_info in commit 29234928
>> "regulator: ab8500: Remove set_voltage_time_sel and delay setting".
>
> I've now finished applying all Lee's outstanding patches (which weren't
> sent to the list...) - could you please recheck if the first two of
> these patches are still revlevant and that the last two are addressed
> properly as per Lee's mails?  Thanks.

Yes, it looks ok now except ab8500_regulator_set_voltage_time_sel() is not
useful because it always return 0.

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

end of thread, other threads:[~2013-04-03 22:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03  2:30 [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Axel Lin
2013-04-03  2:32 ` [PATCH 2/4] regulator: ab8500: Remove voltages and voltages_len " Axel Lin
2013-04-03  2:33 ` [PATCH 3/4] regulator: ab8500: Fix 'match_size' undeclared and missing semicolon Axel Lin
2013-04-03  8:22   ` Lee Jones
2013-04-03  2:34 ` [PATCH 4/4] regulator: ab8500: Set match pointer and match_size for ab8505 and ab8540 Axel Lin
2013-04-03  8:24   ` Lee Jones
2013-04-03 17:42 ` [PATCH 1/4] regulator: ab8500: Remove set_voltage_time_sel and delay to fix build error Mark Brown
2013-04-03 22:01   ` Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox