public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: ab8500: Fix build error
@ 2013-03-25  6:53 Axel Lin
  2013-03-25  6:59 ` [PATCH 2/2] regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage Axel Lin
  2013-03-25 10:20 ` [PATCH 1/2] regulator: ab8500: Fix build error Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2013-03-25  6:53 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Mattias WALLIN,
	Liam Girdwood, linux-kernel

Fix below build error:

  CC      drivers/regulator/ab8500.o
drivers/regulator/ab8500.c:500:23: error: 'ab8500_regulator_fixed_ops' undeclared here (not in a function)
drivers/regulator/ab8500.c: In function 'ab8500_regulator_probe':
drivers/regulator/ab8500.c:972:8: warning: assignment from incompatible pointer type [enabled by default]
make[2]: *** [drivers/regulator/ab8500.o] Error 1
make[1]: *** [drivers/regulator] Error 2
make: *** [drivers] Error 2

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

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index f7d1f53..a2d19c6 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -494,10 +494,14 @@ static struct ab8500_regulator_info
 		.update_val_idle	= 0x82,
 		.update_val_normal	= 0x02,
 	},
+
+	/*
+	 * Regulators with fixed voltage and normal mode
+	 */
 	[AB8500_LDO_USB] = {
 		.desc = {
 			.name           = "LDO-USB",
-			.ops            = &ab8500_regulator_fixed_ops,
+			.ops            = &ab8500_regulator_ops,
 			.type           = REGULATOR_VOLTAGE,
 			.id             = AB8500_LDO_USB,
 			.owner          = THIS_MODULE,
@@ -508,10 +512,6 @@ static struct ab8500_regulator_info
 		.update_reg             = 0x82,
 		.update_mask            = 0x03,
 	},
-
-	/*
-	 * Regulators with fixed voltage and normal mode
-	 */
 	[AB8500_LDO_AUDIO] = {
 		.desc = {
 			.name		= "LDO-AUDIO",
-- 
1.7.10.4




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

* [PATCH 2/2] regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage
  2013-03-25  6:53 [PATCH 1/2] regulator: ab8500: Fix build error Axel Lin
@ 2013-03-25  6:59 ` Axel Lin
  2013-03-25  8:44   ` Lee Jones
  2013-03-25 10:20 ` [PATCH 1/2] regulator: ab8500: Fix build error Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2013-03-25  6:59 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel


Both ab8500_regulator_mode_ops and ab8500_regulator_ops do not have volt_table
setting, thus we can not use regulator_list_voltage_table for them.
However, they have min_uV setting with n_voltages = 1, so use
regulator_list_voltage_linear instead.

Also remove setting set_voltage_time_sel for ab8500_regulator_mode_ops.
It is used only for fixed voltage, so it does not need to implement
set_voltage_time_sel.

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

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index a2d19c6..12e2740 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -363,8 +363,7 @@ static struct regulator_ops ab8500_regulator_mode_ops = {
 	.set_mode		= ab8500_regulator_set_mode,
 	.get_mode		= ab8500_regulator_get_mode,
 	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
-	.list_voltage		= regulator_list_voltage_table,
-	.set_voltage_time_sel	= ab8500_regulator_set_voltage_time_sel,
+	.list_voltage		= regulator_list_voltage_linear,
 };
 
 static struct regulator_ops ab8500_regulator_ops = {
@@ -372,7 +371,7 @@ static struct regulator_ops ab8500_regulator_ops = {
 	.disable		= ab8500_regulator_disable,
 	.is_enabled		= ab8500_regulator_is_enabled,
 	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
-	.list_voltage		= regulator_list_voltage_table,
+	.list_voltage		= regulator_list_voltage_linear,
 };
 
 static struct ab8500_regulator_info
-- 
1.7.10.4





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

* Re: [PATCH 2/2] regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage
  2013-03-25  6:59 ` [PATCH 2/2] regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage Axel Lin
@ 2013-03-25  8:44   ` Lee Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2013-03-25  8:44 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Bengt Jonsson, Yvan FILLION, Liam Girdwood,
	linux-kernel

On Mon, 25 Mar 2013, Axel Lin wrote:

> 
> Both ab8500_regulator_mode_ops and ab8500_regulator_ops do not have volt_table
> setting, thus we can not use regulator_list_voltage_table for them.
> However, they have min_uV setting with n_voltages = 1, so use
> regulator_list_voltage_linear instead.
> 
> Also remove setting set_voltage_time_sel for ab8500_regulator_mode_ops.
> It is used only for fixed voltage, so it does not need to implement
> set_voltage_time_sel.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Looks good to me.

Acked-by: Lee Jones <lee.jones@linaro.org>

> ---
>  drivers/regulator/ab8500.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
> index a2d19c6..12e2740 100644
> --- a/drivers/regulator/ab8500.c
> +++ b/drivers/regulator/ab8500.c
> @@ -363,8 +363,7 @@ static struct regulator_ops ab8500_regulator_mode_ops = {
>  	.set_mode		= ab8500_regulator_set_mode,
>  	.get_mode		= ab8500_regulator_get_mode,
>  	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
> -	.list_voltage		= regulator_list_voltage_table,
> -	.set_voltage_time_sel	= ab8500_regulator_set_voltage_time_sel,
> +	.list_voltage		= regulator_list_voltage_linear,
>  };
>  
>  static struct regulator_ops ab8500_regulator_ops = {
> @@ -372,7 +371,7 @@ static struct regulator_ops ab8500_regulator_ops = {
>  	.disable		= ab8500_regulator_disable,
>  	.is_enabled		= ab8500_regulator_is_enabled,
>  	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
> -	.list_voltage		= regulator_list_voltage_table,
> +	.list_voltage		= regulator_list_voltage_linear,
>  };
>  
>  static struct ab8500_regulator_info

-- 
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] 4+ messages in thread

* Re: [PATCH 1/2] regulator: ab8500: Fix build error
  2013-03-25  6:53 [PATCH 1/2] regulator: ab8500: Fix build error Axel Lin
  2013-03-25  6:59 ` [PATCH 2/2] regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage Axel Lin
@ 2013-03-25 10:20 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-03-25 10:20 UTC (permalink / raw)
  To: Axel Lin
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Mattias WALLIN,
	Liam Girdwood, linux-kernel

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

On Mon, Mar 25, 2013 at 02:53:50PM +0800, Axel Lin wrote:
> Fix below build error:

Applied both, thanks.

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

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

end of thread, other threads:[~2013-03-25 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-25  6:53 [PATCH 1/2] regulator: ab8500: Fix build error Axel Lin
2013-03-25  6:59 ` [PATCH 2/2] regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage Axel Lin
2013-03-25  8:44   ` Lee Jones
2013-03-25 10:20 ` [PATCH 1/2] regulator: ab8500: Fix build error Mark Brown

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