public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings
@ 2013-03-27  9:47 Axel Lin
  2013-03-27  9:48 ` [PATCH RFT 2/2] regulator: ab8500: Remove set_voltage_time_sel and delay setting Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Axel Lin @ 2013-03-27  9:47 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

Base on the data provide by Bengt Jönsson, add below enable_time settings:

Worst case enable time from data sheet:
Vana: enable time = 140 us
Vaux1/2: enable time = 200 us
Vaux3: enable time = 450 us
Vintcore: enable time = 750 us
Vamic1/2: enable time = 500 us
Vdmic: enable time = 420 us
VTVout: enable time = 500 us
Vaudio: enable time = 140 us
Vusb: enable time = 150 us

This discussion thread is available at: https://lkml.org/lkml/2013/3/26/795

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

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 12e2740..1a38524 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -391,6 +391,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= ARRAY_SIZE(ldo_vauxn_voltages),
 			.volt_table	= ldo_vauxn_voltages,
+			.enable_time	= 200,
 		},
 		.load_lp_uA		= 5000,
 		.update_bank		= 0x04,
@@ -412,6 +413,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= ARRAY_SIZE(ldo_vauxn_voltages),
 			.volt_table	= ldo_vauxn_voltages,
+			.enable_time	= 200,
 		},
 		.load_lp_uA		= 5000,
 		.update_bank		= 0x04,
@@ -433,6 +435,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= ARRAY_SIZE(ldo_vaux3_voltages),
 			.volt_table	= ldo_vaux3_voltages,
+			.enable_time	= 450,
 		},
 		.load_lp_uA		= 5000,
 		.update_bank		= 0x04,
@@ -454,6 +457,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= ARRAY_SIZE(ldo_vintcore_voltages),
 			.volt_table	= ldo_vintcore_voltages,
+			.enable_time	= 750,
 		},
 		.load_lp_uA		= 5000,
 		.update_bank		= 0x03,
@@ -506,6 +510,7 @@ static struct ab8500_regulator_info
 			.owner          = THIS_MODULE,
 			.n_voltages     = 1,
 			.min_uV		= 3300000,
+			.enable_time	= 150,
 		},
 		.update_bank            = 0x03,
 		.update_reg             = 0x82,
@@ -520,6 +525,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= 1,
 			.min_uV		= 2000000,
+			.enable_time	= 140,
 		},
 		.update_bank		= 0x03,
 		.update_reg		= 0x83,
@@ -535,6 +541,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= 1,
 			.min_uV		= 2050000,
+			.enable_time	= 500,
 		},
 		.update_bank		= 0x03,
 		.update_reg		= 0x83,
@@ -550,6 +557,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= 1,
 			.min_uV		= 2050000,
+			.enable_time	= 500,
 		},
 		.update_bank		= 0x03,
 		.update_reg		= 0x83,
@@ -565,6 +573,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= 1,
 			.min_uV		= 1800000,
+			.enable_time	= 420,
 		},
 		.update_bank		= 0x03,
 		.update_reg		= 0x83,
@@ -584,6 +593,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= 1,
 			.min_uV		= 1200000,
+			.enable_time	= 140,
 		},
 		.load_lp_uA		= 1000,
 		.update_bank		= 0x04,
-- 
1.7.10.4




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

* [PATCH RFT 2/2] regulator: ab8500: Remove set_voltage_time_sel and delay setting
  2013-03-27  9:47 [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings Axel Lin
@ 2013-03-27  9:48 ` Axel Lin
  2013-03-27 10:42   ` Bengt Jönsson
  2013-03-27 10:35 ` [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings Bengt Jönsson
  2013-03-27 23:18 ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2013-03-27  9:48 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

The data sheet does not specify time delay for voltage selection,
thus remove set_voltage_time_sel and delay setting.

Note, currently set_voltage_time_sel callback returns 0 due to missing
delay settings.

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

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 1a38524..d0d9e83 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -42,7 +42,6 @@
  * @voltage_reg: register to control regulator voltage
  * @voltage_mask: mask to control regulator voltage
  * @voltage_shift: shift to control regulator voltage
- * @delay: startup/set voltage delay in us
  */
 struct ab8500_regulator_info {
 	struct device		*dev;
@@ -60,7 +59,6 @@ struct ab8500_regulator_info {
 	u8 voltage_reg;
 	u8 voltage_mask;
 	u8 voltage_shift;
-	unsigned int delay;
 };
 
 /* voltage tables for the vauxn/vintcore supplies */
@@ -333,15 +331,6 @@ static int ab8500_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,
@@ -352,7 +341,6 @@ static struct regulator_ops ab8500_regulator_volt_mode_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 = {
@@ -488,7 +476,6 @@ static struct ab8500_regulator_info
 			.min_uV		= 2000000,
 			.enable_time	= 10000,
 		},
-		.delay			= 10000,
 		.load_lp_uA		= 1000,
 		.update_bank		= 0x03,
 		.update_reg		= 0x80,
-- 
1.7.10.4




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

* Re: [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings
  2013-03-27  9:47 [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings Axel Lin
  2013-03-27  9:48 ` [PATCH RFT 2/2] regulator: ab8500: Remove set_voltage_time_sel and delay setting Axel Lin
@ 2013-03-27 10:35 ` Bengt Jönsson
  2013-03-27 23:18 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Bengt Jönsson @ 2013-03-27 10:35 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel@vger.kernel.org

On 03/27/2013 10:47 AM, Axel Lin wrote:
> Base on the data provide by Bengt Jönsson, add below enable_time settings:
>
> Worst case enable time from data sheet:
> Vana: enable time = 140 us
> Vaux1/2: enable time = 200 us
> Vaux3: enable time = 450 us
> Vintcore: enable time = 750 us
> Vamic1/2: enable time = 500 us
> Vdmic: enable time = 420 us
> VTVout: enable time = 500 us
> Vaudio: enable time = 140 us
> Vusb: enable time = 150 us
>
> This discussion thread is available at: https://lkml.org/lkml/2013/3/26/795
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>
Looks good.

Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>

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

* Re: [PATCH RFT 2/2] regulator: ab8500: Remove set_voltage_time_sel and delay setting
  2013-03-27  9:48 ` [PATCH RFT 2/2] regulator: ab8500: Remove set_voltage_time_sel and delay setting Axel Lin
@ 2013-03-27 10:42   ` Bengt Jönsson
  0 siblings, 0 replies; 5+ messages in thread
From: Bengt Jönsson @ 2013-03-27 10:42 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel@vger.kernel.org

On 03/27/2013 10:48 AM, Axel Lin wrote:
> The data sheet does not specify time delay for voltage selection,
> thus remove set_voltage_time_sel and delay setting.
>
> Note, currently set_voltage_time_sel callback returns 0 due to missing
> delay settings.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Looks good.

Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>

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

* Re: [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings
  2013-03-27  9:47 [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings Axel Lin
  2013-03-27  9:48 ` [PATCH RFT 2/2] regulator: ab8500: Remove set_voltage_time_sel and delay setting Axel Lin
  2013-03-27 10:35 ` [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings Bengt Jönsson
@ 2013-03-27 23:18 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-03-27 23:18 UTC (permalink / raw)
  To: Axel Lin
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

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

On Wed, Mar 27, 2013 at 05:47:22PM +0800, Axel Lin wrote:
> Base on the data provide by Bengt Jönsson, add below enable_time settings:

Applied both, thanks.

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

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

end of thread, other threads:[~2013-03-27 23:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27  9:47 [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings Axel Lin
2013-03-27  9:48 ` [PATCH RFT 2/2] regulator: ab8500: Remove set_voltage_time_sel and delay setting Axel Lin
2013-03-27 10:42   ` Bengt Jönsson
2013-03-27 10:35 ` [PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings Bengt Jönsson
2013-03-27 23:18 ` Mark Brown

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