Skip to contentSkip to conversation

regulator: ab8500: Set enable enable_time in regulator_desc

PATCH In review Axel Lin 3 participants 6 messages Jul 4, 2012 – Aug 7, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: ab8500: Set enable enable_time in regulator_desc

---
Hi Linus,
While working on this patch, I found in original code:
ab8500_regulator_ops set enable_time callback to ab8500_regulator_enable_time, but does not set the delay in ab8500_regulator_info.
I'm not sure the delay value is 0 for ab8500_regulator_ops, or the setting is just missing.
Anyway, there is no behavior change by this patch.

Regards,
Axel

 drivers/regulator/ab8500.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/regulator/ab8500.c +1 -9
index 13d424f..6230c40 100644
@@ -238,13 +238,6 @@ static int ab8500_regulator_set_voltage_sel(struct regulator_dev *rdev,
 	return ret;
 }
 
-static int ab8500_regulator_enable_time(struct regulator_dev *rdev)
-{
-	struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
-
-	return info->delay;
-}
-
 static int ab8500_regulator_set_voltage_time_sel(struct regulator_dev *rdev,
 					     unsigned int old_sel,
 					     unsigned int new_sel)
@@ -261,7 +254,6 @@ static struct regulator_ops ab8500_regulator_ops = {
 	.get_voltage_sel = ab8500_regulator_get_voltage_sel,
 	.set_voltage_sel = ab8500_regulator_set_voltage_sel,
 	.list_voltage	= regulator_list_voltage_table,
-	.enable_time	= ab8500_regulator_enable_time,
 	.set_voltage_time_sel = ab8500_regulator_set_voltage_time_sel,
 };
 
@@ -276,7 +268,6 @@ static struct regulator_ops ab8500_regulator_fixed_ops = {
 	.is_enabled	= ab8500_regulator_is_enabled,
 	.get_voltage	= ab8500_fixed_get_voltage,
 	.list_voltage	= regulator_list_voltage_linear,
-	.enable_time	= ab8500_regulator_enable_time,
 };
 
 static struct ab8500_regulator_info
@@ -374,6 +365,7 @@ static struct ab8500_regulator_info
 			.owner		= THIS_MODULE,
 			.n_voltages	= 1,
 			.min_uV		= 2000000,
+			.enable_time	= 10000,
 		},
 		.delay			= 10000,
 		.update_bank		= 0x03,
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 9 lines · Axel Lin

---
Hi Linus,
While working on this patch, I found in original code:
ab8500_regulator_ops set enable_time callback to ab8500_regulator_enable_time, but does not set the delay in ab8500_regulator_info.
I'm not sure the delay value is 0 for ab8500_regulator_ops, or the setting is just missing.
Anyway, there is no behavior change by this patch.

Surely if the delay is not set in info then it'll introduce a delay which wasn't there before (but which may well be a bug fix)?

author
#2 lore raw

2012/7/4 Mark Brown <[email protected]>:

Quoted 11 lines · Axel Lin
Quoted 9 lines

---
Hi Linus,
While working on this patch, I found in original code:
ab8500_regulator_ops set enable_time callback to ab8500_regulator_enable_time, but does not set the delay in ab8500_regulator_info.
I'm not sure the delay value is 0 for ab8500_regulator_ops, or the setting is just missing.
Anyway, there is no behavior change by this patch.

Quoted 2 lines

Surely if the delay is not set in info then it'll introduce a delay which wasn't there before (but which may well be a bug fix)?

Ping...

Hi Linus,
Any comments on this patch?

Regards,
Axel

Acked-by
#3 lore raw
Quoted 12 lines · Axel Lin

2012/7/4 Mark Brown <[email protected]>:

Quoted 11 lines · Axel Lin
Quoted 9 lines

---
Hi Linus,
While working on this patch, I found in original code:
ab8500_regulator_ops set enable_time callback to ab8500_regulator_enable_time, but does not set the delay in ab8500_regulator_info.
I'm not sure the delay value is 0 for ab8500_regulator_ops, or the setting is just missing.
Anyway, there is no behavior change by this patch.

Quoted 7 lines
Quoted 2 lines

Surely if the delay is not set in info then it'll introduce a delay which wasn't there before (but which may well be a bug fix)?

Ping...

Hi Linus,
Any comments on this patch?

Looks good to me:

I need to check the proper rise times with the maintainers.

Yours,
Linus Walleij

#4 lore raw
Quoted 18 lines · Linus Walleij
Quoted 17 lines · Axel Lin

2012/7/4 Mark Brown <[email protected]>:

Quoted 11 lines · Axel Lin
Quoted 9 lines

---
Hi Linus,
While working on this patch, I found in original code:
ab8500_regulator_ops set enable_time callback to ab8500_regulator_enable_time, but does not set the delay in ab8500_regulator_info.
I'm not sure the delay value is 0 for ab8500_regulator_ops, or the setting is just missing.
Anyway, there is no behavior change by this patch.

Quoted 2 lines

Surely if the delay is not set in info then it'll introduce a delay which wasn't there before (but which may well be a bug fix)?

Ping...

Quoted 7 lines
Quoted 2 lines

Hi Linus,
Any comments on this patch?

Looks good to me:

I need to check the proper rise times with the maintainers.

I remember this now. Only that one regulator has a non-negligeble rise time, so for that reason it's set to that value. Atleast so I was told once upon a time when I implemented it, so this patch should be fine.

Yours,
Linus Walleij

#5 lore raw
Quoted 4 lines · Linus Walleij

I remember this now. Only that one regulator has a non-negligeble rise time, so for that reason it's set to that value. Atleast so I was told once upon a time when I implemented it, so this patch should be fine.

Please resend the patch if I didn't apply it already, I've not got it any more.