Re: [PATCH 2/5] mmc: core: Further avoid re-storing power to the eMMC before a shutdown
From: Wolfram Sang
Date: Mon Mar 31 2025 - 04:21:44 EST
> > +static bool mmc_may_poweroff_notify(const struct mmc_host *host,
> > + bool is_suspend)
Maybe add some comments about the difference between
mmc_can_poweroff_notify() and mmc_may_poweroff_notify()? Like make it
super-obvious, so I will easily remember next year again :)
> > if (mmc_can_poweroff_notify(host->card) &&
> > - !(host->caps2 & MMC_CAP2_FULL_PWR_CYCLE))
> > + !mmc_may_poweroff_notify(host, true))
> I guess this deserve some extra documentation because:
> If MMC_CAP2_FULL_PWR_CYCLE is not set but MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND is set,
> !mmc_may_poweroff_notify(host, true) will evaluate to false while !(host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) will evaluate to true.
I agree, I neither get this. Another way to express my confusion is: Why
do we set the 'is_suspend' flag to true in the shutdown function?
Attachment:
signature.asc
Description: PGP signature