diff options
author | Grygorii Strashko <Grygorii.Strashko@linaro.org> | 2015-01-23 17:32:42 +0200 |
---|---|---|
committer | Grygorii Strashko <Grygorii.Strashko@linaro.org> | 2015-02-09 23:28:44 +0800 |
commit | 822dd197affc8287b57b51e0013f0495b5a529eb (patch) | |
tree | 2f62fc59b95ee97c34d6d573556c0fdce02ed226 | |
parent | 1cc3d58deb34f50127659feca55a9b38f9e775d6 (diff) |
[boot-fix-ti] mmc: omap_hsmmc: defere probe if optional regulator not ready
The devm_regulator_get_optional90 will return EPROBE_DEFER if
phandle on optional regulator node is specified and valid.
But now this case isn't handled properly by OMAP HSMMC driver
and optional regulators initalization is just skipped.
Hence, fix it by deferring OMAP HSMMC driver probe if
optional regulator isn't ready yet.
Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index eb6bcecffd2..eceaeebe1ae 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -505,9 +505,19 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) /* Allow an aux regulator */ reg = devm_regulator_get_optional(host->dev, "vmmc_aux"); + if (PTR_ERR(reg) == -EPROBE_DEFER) { + dev_dbg(host->dev, "unable to get vmmc_aux regulator %ld\n", + PTR_ERR(reg)); + return -EPROBE_DEFER; + } host->vcc_aux = IS_ERR(reg) ? NULL : reg; reg = devm_regulator_get_optional(host->dev, "pbias"); + if (PTR_ERR(reg) == -EPROBE_DEFER) { + dev_dbg(host->dev, "unable to get pbias regulator %ld\n", + PTR_ERR(reg)); + return -EPROBE_DEFER; + } host->pbias = IS_ERR(reg) ? NULL : reg; /* For eMMC do not power off when not in sleep state */ |