public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: Fix WM8994 LDO enable gpio set when probed
@ 2010-08-06  2:07 Joonyoung Shim
  2010-08-06 10:41 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Joonyoung Shim @ 2010-08-06  2:07 UTC (permalink / raw)
  To: lrg; +Cc: broonie, kyungmin.park, linux-kernel

The enable time needs to enable WM8994 LDO, but WM8994 LDO is enabled
without the enable time at the probe function. This can cause the
problem to try i2c operation before LDO is enabled.

This patch sets to 0 WM8994 LDO enable gpio when probed then if it is
requested to enable WM8994 LDO, will be enabled by enable interface of
regulator core with enable time.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
 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.0.4


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

end of thread, other threads:[~2010-08-06 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-06  2:07 [PATCH] regulator: Fix WM8994 LDO enable gpio set when probed Joonyoung Shim
2010-08-06 10:41 ` Mark Brown

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