[PATCH 2/3] mfd: arizona: Wait for internal clocks to startup after reset

From: Mark Brown
Date: Wed Apr 03 2013 - 14:05:37 EST


From: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
---
drivers/mfd/arizona-core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index e4c8dc2..69e9796 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -519,8 +519,10 @@ int arizona_dev_init(struct arizona *arizona)
goto err_enable;
}

- if (arizona->pdata.reset)
+ if (arizona->pdata.reset) {
gpio_set_value_cansleep(arizona->pdata.reset, 1);
+ msleep(1);
+ }

regcache_cache_only(arizona->regmap, false);

@@ -579,6 +581,8 @@ int arizona_dev_init(struct arizona *arizona)
goto err_reset;
}

+ msleep(1);
+
ret = regcache_sync(arizona->regmap);
if (ret != 0) {
dev_err(dev, "Failed to sync device: %d\n", ret);
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/