summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2017-04-20 10:34:26 +0800
committerPeng Fan <peng.fan@nxp.com>2017-04-20 10:34:26 +0800
commitf04444fa8a1c8c99fad5d8781324cff27892b9b6 (patch)
tree989ddbc143eba773af76eb64af081f6fa9014529
parentb1d2ec2d646c5802ebdbbe6f1526c28a1f881933 (diff)
downloadu-boot-imx-f04444fa8a1c8c99fad5d8781324cff27892b9b6.zip
u-boot-imx-f04444fa8a1c8c99fad5d8781324cff27892b9b6.tar.gz
u-boot-imx-f04444fa8a1c8c99fad5d8781324cff27892b9b6.tar.bz2
MLK-14708 mmc: fsl_esdhc: fix wrong usage device_get_supply_regulator
Fix wrong usage of device_get_supply_regulator. device_get_supply_regulator returns 0 on success. Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r--drivers/mmc/fsl_esdhc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index bc9dc2a..c0e64ee 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -1028,9 +1028,13 @@ static int fsl_esdhc_probe(struct udevice *dev)
#endif
}
+ priv->vs18_enable = 0;
+
#ifdef CONFIG_DM_REGULATOR
ret = device_get_supply_regulator(dev, "vqmmc-supply", &vqmmc_dev);
if (ret) {
+ dev_dbg(dev, "no vqmmc supply\n");
+ } else {
if (regulator_get_value(vqmmc_dev) == 1800000)
priv->vs18_enable = 1;
}