On Tue, 22 Nov 2011, Eliad Peller wrote: > hi Ulf, > > On Tue, Nov 22, 2011 at 3:29 PM, Ulf Hansson <ulf.hansson@xxxxxxxxxxxxxx> wrote: > > In mmc_resume_host we clear the MMC_PM_KEEP_POWER flag from the pm_flags > > bitfield. This is done by a patch from Eliad Peller a while ago, "mmc: clear > > MMC_PM_KEEP_POWER flag on resume" > > > > I would like to understand if there are any reason to why we want to clear > > this flag after we done a resume. I think it will add complexity to an sdio > > function driver since it must update this flag for after each suspend/resume > > sequence. Should it not just be enough to do this during the initialization > > of the sdio func driver. > > > please check out the sdio_set_host_pm_flags() documentation: > > /** > * sdio_set_host_pm_flags - set wanted host power management capabilities > * @func: SDIO function attached to host > * > * Set a capability bitmask corresponding to wanted host controller > * power management features for the upcoming suspend state. > * This must be called, if needed, each time the suspend method of > * the function driver is called, and must contain only bits that > * were returned by sdio_get_host_pm_caps(). > * The host doesn't need to be claimed, nor the function active, > * for this information to be set. > */ > int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags) > > as we have to set the flags on each suspend, we have to clear them on resume. When I introduced this interface, the flags were cleared by the core code upon resume. Nicolas -- 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