Hi Sylwester, On Fri, Jun 13, 2014 at 06:56:16PM +0200, Sylwester Nawrocki wrote: [...] > > @@ -3394,10 +3406,29 @@ static void coda_fw_callback(const struct firmware *fw, void *context) > > memcpy(dev->codebuf.vaddr, fw->data, fw->size); > > release_firmware(fw); > > > > - ret = coda_hw_init(dev); > > - if (ret) { > > - v4l2_err(&dev->v4l2_dev, "HW initialization failed\n"); > > - return; > > + if (IS_ENABLED(CONFIG_PM_RUNTIME) && pdev->dev.pm_domain) { > > How about using the pm_runtime_enabled() helper ? Also why do you need to > be checking dev.pm_domain here and in the resume() callback ? Couldn't it > be done unconditionally ? Why the driver needs to care about the PM domain > existence ? Thank you for the hint, pm_runtime_enabled() is what I want here. The idea with the pm_domain check was that without an associated pm_domain there is no need to do the hardware initialization over and over again. So if PM_RUNTIME is enabled, but no pm_domain is associated with the device, we call hw_init only once, and not on every runtime_resume. The hardware initialization on coda mostly consists of a 4KiB firmware upload into the code SRAM via an upload register, and a reset of the DSP processor. regards Philipp -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html