On Mon, 17 Nov 2014, Dmitry Torokhov wrote: > > > Except buses > > > usually call pm_generic_runtime_resume() which ends up fetching driver's > > > callbacks. Maybe pm_generic_runtime_*() need be a bit smarter? > > > > No, the bus subsystem needs to be smarter. It shouldn't call > > pm_generic_runtime_resume() if the driver hasn't been probed yet, or if > > the driver has already been unbound from the device. > > But that code wold be exactly the same for all buses, right? So why > can't pm_generic_runtime_resume() be smarter? It would not be the same for all buses. Each bus will have its own way of recognizing whether or not a driver has been probed (i.e., by checking some field in the bus-specific part of the device structure). > However, is it allowed to call pm_runtime_get_sync() on devices that > didn't issue pm_runtime_enable()? Yes. But the bus has to issue pm_runtime_enable() before probing the driver, because the driver will expect runtime PM to work properly while its probe routine runs. For example, the probe routine might want to leave the device in a runtime-suspended state. It can't do that if the device isn't enabled for runtime PM. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html