Hi Ohad On Thu, 24 May 2012, Ohad Ben-Cohen wrote: > Hi Guennadi, > > On Thu, May 24, 2012 at 5:06 PM, Guennadi Liakhovetski > <g.liakhovetski@xxxxxx> wrote: > > Sorry, I mean - you don't know what card will be plugged in, so, you > > cannot know, whether that specific card and its driver can be safely > > powered off. > > We do know in certain cases, most commonly with wifi SDIO cards which > are hardwired to the board. Yes, exactly, in certain cases. And when it's not hard-wired? > > Ok, I think, it's this: MMC_PM_KEEP_POWER is for system-wide suspend / > > resume, whereas MMC_CAP_POWER_OFF_CARD is for runtime PM. Am I right? > > MMC_CAP_POWER_OFF_CARD is used by SDIO runtime PM, but I won't > classify it as "runtime PM" specific. It describes the hardware, and > not inherently limited to a specific use case. Ok > > that case, I think, they also should function similar > > Can you explain why ? Because with pluggable cards one flag is not enough. I think, you need (1) board capability to switch power, and (2) driver's allowance to power the card down. > > - wouldn't it make > > sense to use MMC_CAP_POWER_OFF_CARD similar to MMC_PM_KEEP_POWER - as a > > static capability flag (meaning, whether the board is physically able to > > switch power) and a dynamic flag, that, say, an SDIO function driver could > > set if it knows, that it cannot handle runtime power switching properly? > > I'm not sure I'm following the reasoning. > > Can you explain what are you trying to solve ? Is there a specific > problem you have in mind ? The problem of hot-pluggable cards. One card / driver combination will support powering down at runtime, another one will not. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- 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