Browse Source

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>
imx_v2017.03_4.9.11_1.0.0_ga
Peng Fan 4 years ago
parent
commit
f04444fa8a
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      drivers/mmc/fsl_esdhc.c

+ 4
- 0
drivers/mmc/fsl_esdhc.c View File

@ -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;
}


Loading…
Cancel
Save