Re: [PATCH RESEND v2 1/8] mmc: sdhci-of-k1: No pinctrl state switching

From: Adrian Hunter

Date: Thu Dec 03 2026 - 04:44:11 EST


On 01/12/2026 12:54, Yixun Lan wrote:
> 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>

Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>

> ---
> drivers/mmc/host/sdhci-of-k1.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
> index 37b0911e7cf2..9596d79fa97f 100644
> --- a/drivers/mmc/host/sdhci-of-k1.c
> +++ b/drivers/mmc/host/sdhci-of-k1.c
> @@ -407,8 +407,12 @@ static int spacemit_sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
> if (ret)
> return ret;
>
> + /* No pinctrl */
> if (!sdhst->pinctrl)
> return 0;
> + /* No "uhs" state */
> + if (!sdhst->pinctrl_uhs)
> + return 0;
>
> /* Select appropriate pinctrl state based on signal voltage */
> switch (ios->signal_voltage) {
>