Hi Ulf,
On Tue, Nov 22 2011, Ulf Hansson wrote:
> Thanks for the quick reply! I understand the idea better now. Just a
> minor follow-up question..
>
> The power_restore function for sdio also uses this flag, which is a
> little bit strange I think.
Yeah, it's being used to detect whether we're in the middle of a powered
resume, and therefore shouldn't be trying to reinit the card. Then the
value of MMC_PM_KEEP_POWER gets reset once the resume's finished.
> Especially since the mmc_power_off|up is always called no matter of
> the value of this flag.
Hm, I don't think that's true.
mmc_suspend_host() checks !mmc_card_keep_power(host) before mmc_power_off()
mmc_resume_host() checks !mmc_card_keep_power(host) before mmc_power_up()
static inline int mmc_card_keep_power(struct mmc_host *host)
{
return host->pm_flags & MMC_PM_KEEP_POWER;
}
Thanks,
- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html