From: Joonyoung Shim <jy0922.shim@samsung.com>
To: lrg@slimlogic.co.uk
Cc: linux-kernel@vger.kernel.org,
broonie@opensource.wolfsonmicro.com, kyungmin.park@samsung.com
Subject: [PATCH] regulator: Add enable_time on probe of WM8994
Date: Sun, 07 Feb 2010 09:41:26 +0900 [thread overview]
Message-ID: <4B6E0C36.3090608@samsung.com> (raw)
WM8994 regulator needs some delay to enable when it is probed too.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
drivers/regulator/wm8994-regulator.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index 1639806..a9f0c89 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -15,6 +15,7 @@
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
@@ -206,7 +207,7 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
struct wm8994_pdata *pdata = wm8994->dev->platform_data;
int id = pdev->id % ARRAY_SIZE(pdata->ldo);
struct wm8994_ldo *ldo;
- int ret;
+ int ret, delay;
dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1);
@@ -239,6 +240,12 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
ret);
goto err_gpio;
}
+
+ delay = wm8994_ldo_enable_time(NULL);
+ if (delay >= 1000)
+ mdelay(delay / 1000);
+ else if (delay)
+ udelay(delay);
}
ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &pdev->dev,
--
1.6.3.3
next reply other threads:[~2010-02-07 0:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 0:41 Joonyoung Shim [this message]
2010-02-07 23:56 ` [PATCH] regulator: Add enable_time on probe of WM8994 Mark Brown
2010-02-08 6:03 ` Joonyoung Shim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B6E0C36.3090608@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox