[PATCH 03/10] mmc: sdhci-of-k1: add regulator framework support
Yao Zi
me at ziyao.cc
Mon Mar 2 20:11:01 PST 2026
On Mon, Mar 02, 2026 at 04:13:24PM +0100, Iker Pedrosa wrote:
> Add regulator framework support for voltage switching operations. This
> enables proper PMIC control for UHS voltage switching between 3.3V and
> 1.8V signaling levels.
>
> - Add regulator supply parsing
> - Implement voltage switching callback
> - Enable mmc regulator framework integration
>
> Signed-off-by: Iker Pedrosa <ikerpedrosam at gmail.com>
> ---
> drivers/mmc/host/sdhci-of-k1.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
It seems PATCH 4 should be squashed into this one, or the functionality
of voltage switching isn't really complete.
> diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
> index b703b78282ed8d89183c816477c149c0a565618a..c260cb89704ae7a25bec0f07831d495553405bbd 100644
> --- a/drivers/mmc/host/sdhci-of-k1.c
> +++ b/drivers/mmc/host/sdhci-of-k1.c
...
> @@ -291,6 +297,12 @@ static int spacemit_sdhci_probe(struct platform_device *pdev)
>
> host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
>
> + ret = mmc_regulator_get_supply(host->mmc);
> + if (ret)
> + dev_warn(dev, "Failed to get regulators: %d\n", ret);
> +
> + host->mmc_host_ops.start_signal_voltage_switch = spacemit_sdhci_start_signal_voltage_switch;
Why not assign start_signal_voltage_switch in the declaration of
spacemit_sdhci_ops?
> ret = spacemit_sdhci_get_clocks(dev, pltfm_host);
> if (ret)
> goto err_pltfm;
>
> --
> 2.53.0
Best regards,
Yao Zi
More information about the linux-riscv
mailing list