Re: [Query] mmc: core "MMC_PM_KEEP_POWER"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Ball wrote:
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.

I were thinking of mmc_power_save|restore_host, those functions is always doing power_off|on.



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.

BR
Uffe

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux