diff options
| author | Kory Maincent <kory.maincent@bootlin.com> | 2026-02-17 14:49:39 +0100 |
|---|---|---|
| committer | Fabio Estevam <festevam@gmail.com> | 2026-02-28 15:31:49 -0300 |
| commit | fd30e492cc39157825af599f9af400095a5f2f56 (patch) | |
| tree | 1fe2044520d35b1d939c0b6ba0336e6c1fa2d3cc | |
| parent | 10e0560ea8b41e12833c3d58e1477942b8a17b9b (diff) | |
mmc: fsl_esdhc_imx: Skip voltage switching for fixed 1.8V regulator
When using a fixed 1.8V regulator for vqmmc (indicated by vs18_enable),
attempting to change the voltage produces spurious errors since the
regulator cannot be adjusted. The driver currently attempts the voltage
change, receives -ENOSYS from the regulator subsystem, and reports:
Setting to 1.8V error: -38
esdhc_set_voltage error -5
Fix this by checking vs18_enable early in esdhc_set_voltage() and
returning -ENOTSUPP for all voltage switch requests, not just 3.3V.
This prevents unnecessary regulator operations and eliminates the
error messages when the hardware is correctly configured with a fixed
1.8V supply.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
| -rw-r--r-- | drivers/mmc/fsl_esdhc_imx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 7dc76563b7e..335b44a8a1a 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -752,10 +752,11 @@ static int esdhc_set_voltage(struct mmc *mmc) int ret; priv->signal_voltage = mmc->signal_voltage; + if (priv->vs18_enable) + return -ENOTSUPP; + switch (mmc->signal_voltage) { case MMC_SIGNAL_VOLTAGE_330: - if (priv->vs18_enable) - return -ENOTSUPP; if (CONFIG_IS_ENABLED(DM_REGULATOR) && !IS_ERR_OR_NULL(priv->vqmmc_dev)) { ret = regulator_set_value(priv->vqmmc_dev, |
