From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH] PM / Domains: Power on the PM domain right after attach completes Date: Mon, 17 Nov 2014 10:28:56 -0800 Message-ID: <7hd28l3clz.fsf@deeprootsystems.com> References: <1416237550-31092-1-git-send-email-ulf.hansson@linaro.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from mail-pa0-f51.google.com ([209.85.220.51]:55177 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbaKQS27 (ORCPT ); Mon, 17 Nov 2014 13:28:59 -0500 Received: by mail-pa0-f51.google.com with SMTP id ey11so5924879pad.38 for ; Mon, 17 Nov 2014 10:28:58 -0800 (PST) In-Reply-To: <1416237550-31092-1-git-send-email-ulf.hansson@linaro.org> (Ulf Hansson's message of "Mon, 17 Nov 2014 16:19:10 +0100") Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Ulf Hansson Cc: "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org, Geert Uytterhoeven , Dmitry Torokhov , Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Ulf Hansson writes: > The amba bus, amba drivers and a vast amount of platform drivers which > enables runtime PM, don't invoke a pm_runtime_get_sync() while probing > their devices. > > Instead, once they have turned on their PM resourses during ->probe() > and are ready to handle I/O, these invokes pm_runtime_set_active() to > synchronize its state towards the runtime PM core. > > From a runtime PM point of view this behavior is perfectly acceptable, In the context of PM domains that can be dynamically powered on/off, I'm not so sure it's perfectly acceptable anymore. Why doesn't the bus do a _get_sync() instead of a _get_noresume() followed by a _set_active(). By using the _get_noresume() you're bypassing the paths that would bring up your PM domain. Kevin From mboxrd@z Thu Jan 1 00:00:00 1970 From: khilman@kernel.org (Kevin Hilman) Date: Mon, 17 Nov 2014 10:28:56 -0800 Subject: [PATCH] PM / Domains: Power on the PM domain right after attach completes In-Reply-To: <1416237550-31092-1-git-send-email-ulf.hansson@linaro.org> (Ulf Hansson's message of "Mon, 17 Nov 2014 16:19:10 +0100") References: <1416237550-31092-1-git-send-email-ulf.hansson@linaro.org> Message-ID: <7hd28l3clz.fsf@deeprootsystems.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Ulf Hansson writes: > The amba bus, amba drivers and a vast amount of platform drivers which > enables runtime PM, don't invoke a pm_runtime_get_sync() while probing > their devices. > > Instead, once they have turned on their PM resourses during ->probe() > and are ready to handle I/O, these invokes pm_runtime_set_active() to > synchronize its state towards the runtime PM core. > > From a runtime PM point of view this behavior is perfectly acceptable, In the context of PM domains that can be dynamically powered on/off, I'm not so sure it's perfectly acceptable anymore. Why doesn't the bus do a _get_sync() instead of a _get_noresume() followed by a _set_active(). By using the _get_noresume() you're bypassing the paths that would bring up your PM domain. Kevin