On 30 September 2015 at 08:46, Mirza Krak <mirza.krak@xxxxxxxxxxxxxxxx> wrote: > Hi. > > I have a questing regard of what happens during suspend with the MMC > card, or even more correctly what does not happen. > > I am running the 4.1.5 kernel on a Colibri VF SOM. > > What I would like to happen when i suspend my system to memory is that > the MMC card is removed before suspend. The reason is that we will cut > the power rail to the MMC card during suspend on our board, which > means that it will fail on resume if we do not remove the card before > suspending. At suspend, the mmc core tries to power off the card. Whether that's actually done is up to each and every host driver to deal with via the host_ops->set_ios() callback. At resume, the mmc core expect the card to be powered off and starts new round of power up and initialization cycle of the card. This is the short story, obviously for eMMC which has specific commands to deal with power management more things get involved. > > From what I read on the "internet", above behavior used to be default. > It no longer is it seems. Unfortunate the kernel doc for MMC is very poor. It certainly would need some update. In this case you better read the code, since what you read on the internet seems to tell you something different. > > My question is, is there a "correct" way of getting the behavior I would like? > > My hack today is to declare a pre_suspend callback in mmc.c returning -ENOSYS. > > -- > Med Vänliga Hälsningar / Best Regards > > ******************************************************************* > Mirza Krak > Host Mobility AB > mirza.krak@xxxxxxxxxxxxxxxx > Anders Personsgatan 12, 416 64 Göteborg > Sweden > http://www.hostmobility.com > Direct: +46 31 31 32 704 > Phone: +46 31 31 32 700 > Fax: +46 31 80 67 51 > Mobile: +46 730 28 06 22 > ******************************************************************* > -- > 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 Kind regards 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