2010-08-06 14:48:53

by Mark Brown

[permalink] [raw]
Subject: [PATCH] regulator: Default GPIO controlled WM8994 regulators to disabled

From: Joonyoung Shim <[email protected]>

This ensures that if the GPIO was not enabled prior to the driver
starting the regulator API will insert the required powerup ramp
delay when it enables the regulator. The gpiolib API does not
provide this information.

[Rewrote changelog to describe the actual change -- broonie.]

Signed-off-by: Joonyoung Shim <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
---
drivers/regulator/wm8994-regulator.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index 5a1dc8a..03713bc 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -219,8 +219,6 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)

ldo->wm8994 = wm8994;

- ldo->is_enabled = true;
-
if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) {
ldo->enable = pdata->ldo[id].enable;

@@ -237,7 +235,8 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
ret);
goto err_gpio;
}
- }
+ } else
+ ldo->is_enabled = true;

ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &pdev->dev,
pdata->ldo[id].init_data, ldo);
--
1.7.1


2010-08-09 08:24:17

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH] regulator: Default GPIO controlled WM8994 regulators to disabled

On Fri, 2010-08-06 at 15:48 +0100, Mark Brown wrote:
> From: Joonyoung Shim <[email protected]>
>
> This ensures that if the GPIO was not enabled prior to the driver
> starting the regulator API will insert the required powerup ramp
> delay when it enables the regulator. The gpiolib API does not
> provide this information.
>
> [Rewrote changelog to describe the actual change -- broonie.]
>
> Signed-off-by: Joonyoung Shim <[email protected]>
> Signed-off-by: Mark Brown <[email protected]>
> Cc: [email protected]
> ---

Applied.

Thanks

Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk