Hi Ulf, > mmc_card_can_poweroff_notify() would not be consistent with all the > other mmc_can_* helpers, so I rather stay with > mmc_can_poweroff_notify(), for now. If you think a rename makes sense, > I suggest we do that as a follow up and rename all the helpers. I vageuly recall that the commit I mentioned below (renaming hw_reset to card_hw_reset) should have been a start to do exactly this, renaming more of the helpers. I drifted away. Yet, I still think this would make MMC core code a lot easier to understand. I'll work on it today, timing seems good with rc1 on the horizon... > mmc_host_can_poweroff_notify() seems fine to me! Great! > > I do understand that. I don't see why this needs a change in the > > existing logic as Alan pointed out above. > > Aha. I get your point now. As stated in the commit message: > > Due to an earlier suspend request the eMMC may already have been properly > powered-off, hence we are sometimes leaving the eMMC in its current state. > However, in one case when the host has MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND > set we may unnecessarily restore the power to the eMMC, let's avoid this. Oookay, now I see what you are aiming at. It seems I got the PWR_CYCLE flags wrong? I thought MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND is only a subset of MMC_CAP2_FULL_PWR_CYCLE. The former can do the power cycles only in suspend, while the latter can do them in suspend and shutdown. So, in my thinking, full power cycle might also have the eMMC powered-off during shutdown. This is wrong? > Let me try to clarify the commit message a bit with this information. Whatever is the final outcome, it needs a comment in the code, I am quite sure. Happy hacking, Wolfram
Attachment:
signature.asc
Description: PGP signature