[PATCH 1/7] mmc: sdhci-of-k1: no pinctrl state switching
From: Yixun Lan
Date: Wed Sep 02 2026 - 04:05:46 EST
From: Long Wan <long.wan@xxxxxxxxxxxxxxxxxx>
No need to switch pinctrl state if the SDHCI controller only support 1.8v
IO voltage which DT will only provide a "default" pinctrl state, otherwise
function pinctrl_select_state() will trigger a NULL pointer error.
Fixes: 00a97fc57c09 ("mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support")
Signed-off-by: Long Wan <long.wan@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Yixun Lan <dlan@xxxxxxxxxx>
---
drivers/mmc/host/sdhci-of-k1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
index 37b0911e7cf2..0916340d3265 100644
--- a/drivers/mmc/host/sdhci-of-k1.c
+++ b/drivers/mmc/host/sdhci-of-k1.c
@@ -407,7 +407,8 @@ static int spacemit_sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
if (ret)
return ret;
- if (!sdhst->pinctrl)
+ /* No pinctrl or no "uhs" state */
+ if (!sdhst->pinctrl || !sdhst->pinctrl_uhs)
return 0;
/* Select appropriate pinctrl state based on signal voltage */
--
2.55.0