Skip to contentSkip to conversation

regulator: Default GPIO controlled WM8994 regulators to disabled

PATCH Applied Mark Brown 2 participants 2 messages Aug 6, 2010 – Aug 9, 2010

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.]

---
 drivers/regulator/wm8994-regulator.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/regulator/wm8994-regulator.c +2 -3
index 5a1dc8a..03713bc 100644
@@ -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);
Signature · 1 line
1.7.1
#1 lore raw
Quoted 7 lines · Mark Brown

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.

Quoted 6 lines

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

---

Applied.

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk