[BUG] mmc_regulator_set_ocr can't cope with regulator-fixed

Mark Brown broonie at kernel.org
Thu Aug 5 05:46:50 PDT 2021


On Thu, Aug 05, 2021 at 07:38:06AM -0400, Peter Geis wrote:

> Also, I've got a possible fix to the dw-mmc issue, the following patch
> changes the behavior to only enable a fixed regulator, not try to set
> the voltage. It's a split between the behavior when vmmc isn't defined
> at all and when its a variable regulator:

One thing to watch out for with this approach is if there's things that
really need a specific voltage to be set then you'll have to stop those
things happening if you've got a voltage regulator that can't deliver a
voltage in the required range.  I don't know if this affects MMC or not,
if it's just a case of being less efficient it's not such an issue.

> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index d333130d1531..b30102980261 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1446,11 +1446,13 @@ static void dw_mci_set_ios(struct mmc_host
> *mmc, struct mmc_ios *ios)
>   switch (ios->power_mode) {
>   case MMC_POWER_UP:
>   if (!IS_ERR(mmc->supply.vmmc)) {
> - ret = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc,

This patch is very whitespace damaged FWIW.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20210805/cb6c9286/attachment.sig>


More information about the Linux-rockchip mailing list