On 8 November 2013 13:16, Guennadi Liakhovetski <g.liakhovetski@xxxxxx> wrote: > Hi Ulf, > > A general question concerning this your effort just occurred to me: what > if runtime PM is disabled on a system? Will the clock(s) then at all be > enabled? Doesn't one need for such a case either a fall-back to statically > enable clock in .probe() and disable in .remove() or should such drivers > select PM_RUNTIME? > That is a quite interesting question, I would suggest you post this one on linux-pm. :-) Normally I would expect it to be convenient to enable clocks in .probe and then use pm_runtime_set_active. So that will then work for both scenarios. A bit more tricky is the .remove. To make it work in both scenarios you can do pm_runtime_get_sync, a then explicitly disable the clocks. If the driver would select PM_RUNTIME, the code could likely be simplified. In best cases the .remove callback should not even need to exist since PM core will do it's best to put the device into "inactive" state. Kind regards Uffe > Thanks > Guennadi > > On Tue, 5 Nov 2013, Ulf Hansson wrote: > >> This patchset converts tmio and sh_mobile_sdhi to use the modern PM ops. >> >> Ulf Hansson (3): >> mmc: sh_mobile_sdhi: Use modern PM macros to define pm callbacks >> mmc: tmio_mmc: Convert from legacy to modern PM ops >> mmc: tmio: Adapt to proper PM configs for exported functions >> >> drivers/mmc/host/sh_mobile_sdhi.c | 8 ++++---- >> drivers/mmc/host/tmio_mmc.c | 32 ++++++++++++++++++-------------- >> drivers/mmc/host/tmio_mmc.h | 7 +++---- >> drivers/mmc/host/tmio_mmc_pio.c | 7 ++++--- >> 4 files changed, 29 insertions(+), 25 deletions(-) >> >> -- >> 1.7.9.5 >> > > --- > 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