lkml.org 
[lkml]   [2010]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] regulator: Add enable_time on probe of WM8994
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

\
 
 \ /
  Last update: 2010-02-07 01:43    [W:0.042 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site