On Thu, 4 Nov 2010, Linus Walleij wrote: > David Vrabel wrote: > > Linus Walleij wrote: > >> @@ -148,14 +148,19 @@ static int mmc_runtime_suspend(struct device *dev) > >> { > >> struct mmc_card *card = mmc_dev_to_card(dev); > >> > >> + mmc_gate_clock(card->host); > >> return mmc_power_save_host(card->host); > >> } > > > > Haven't you tied the clock gating to the power on/off state of the > > card/host? This looks like the wrong thing to me. Surely we want to > > gate the clock even if the card (or SDIO functions) are active? > > You're probably right :-/ > > Since the runtime_pm_get/put calls are balanced for the host > enable/disable case and the clock gating is orthogonal, > I need to create an orthogonal instance of hooks, maybe it's > easiest to just spawn a second dummy device like mmc0_clk > for this to be able to use the runtime PM hooks? Maybe the runtime PM stuff is not the right abstraction for this? Like I said before, the host controller driver should do opportunistic power savings on its own and remain transparent to the core layer and the card. But power saving on the card should be controlled by the core code or the function driver. So there shouldn't be any coupling between those, even if the host controller driver is in the middle. 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