From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH 2/9] PM / Domains: Remove dev->driver check for runtime PM Date: Fri, 21 Aug 2015 14:04:20 -0700 Message-ID: <7hio88gxpn.fsf@deeprootsystems.com> References: <1438731339-58317-1-git-send-email-lina.iyer@linaro.org> <1438731339-58317-3-git-send-email-lina.iyer@linaro.org> <7hfv3onv5c.fsf@deeprootsystems.com> <7hwpwylepx.fsf@deeprootsystems.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from mail-pa0-f53.google.com ([209.85.220.53]:35704 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752221AbbHUVEY (ORCPT ); Fri, 21 Aug 2015 17:04:24 -0400 Received: by pacdd16 with SMTP id dd16so51635441pac.2 for ; Fri, 21 Aug 2015 14:04:23 -0700 (PDT) In-Reply-To: (Geert Uytterhoeven's message of "Sun, 16 Aug 2015 11:24:51 +0200") Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Geert Uytterhoeven Cc: Lina Iyer , "Rafael J. Wysocki" , Ulf Hansson , Krzysztof =?utf-8?Q?Koz=C5=82owski?= , Linux PM list , "linux-arm-kernel@lists.infradead.org" , "msivasub@codeaurora.org" , Andy Gross , Stephen Boyd Geert Uytterhoeven writes: > Hi Kevin, > > On Fri, Aug 14, 2015 at 7:19 PM, Kevin Hilman wrote: >> On Fri, Aug 14, 2015 at 12:24 AM, Geert Uytterhoeven >> wrote: >>> On Fri, Aug 14, 2015 at 5:40 AM, Kevin Hilman wrote: >>>> Geert Uytterhoeven writes: >>>>> On Wed, Aug 12, 2015 at 9:50 PM, Kevin Hilman wrote: >>>>>> This check might have made sense before PM domains, but with PM domains, >>>>>> it's entirely possible to have a simple device without a driver and the >>>>>> PM domain handles all the necesary PM, so I think this check >>>>>> could/should be removed. >>>>>> >>>>>> Thoughts? >>>>> >>>>> Simple devices without a driver aren't handled automatically. >>>>> At minimum, the driver should call pm_runtime_enable(), cfr. >>>>> drivers/bus/simple-pm-bus.c. >>>> >>>> That's correct, and in the proof-of-concept stuff I hacked up and in >>>> Lina's series, the CPU "devices" do indeed to this. Without that, they >>>> wouldn't end up ever taking this codepath through genpd's >>>> runtime_suspend and power_off hooks. >>>> >>>> Also, I'm not sure if your comment was meant to be an objection to the >>>> patch? or if you're OK with it. >>> >>> My comment was purely meant as a response to "it's entirely possible to have a >>> simple device without a driver and the PM domain handles all the necesary PM". >> >> Right, so if the PM domain does the pm_runtime_enable() for these >> "simple" devices without drivers, they can still exist without a >> driver, and the PM domain doing all the magic. > > Is it possible to let the PM Domain do the pm_runtime_enable() itself in > the absence of a driver? Well, I suppose it's possible, not sure it's recommended. :) > If yes, I wouldn't have needed simple-pm-bus.c. > What if a driver is bound later? Yeah, you're approach is better. Kevin From mboxrd@z Thu Jan 1 00:00:00 1970 From: khilman@kernel.org (Kevin Hilman) Date: Fri, 21 Aug 2015 14:04:20 -0700 Subject: [PATCH 2/9] PM / Domains: Remove dev->driver check for runtime PM In-Reply-To: (Geert Uytterhoeven's message of "Sun, 16 Aug 2015 11:24:51 +0200") References: <1438731339-58317-1-git-send-email-lina.iyer@linaro.org> <1438731339-58317-3-git-send-email-lina.iyer@linaro.org> <7hfv3onv5c.fsf@deeprootsystems.com> <7hwpwylepx.fsf@deeprootsystems.com> Message-ID: <7hio88gxpn.fsf@deeprootsystems.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Geert Uytterhoeven writes: > Hi Kevin, > > On Fri, Aug 14, 2015 at 7:19 PM, Kevin Hilman wrote: >> On Fri, Aug 14, 2015 at 12:24 AM, Geert Uytterhoeven >> wrote: >>> On Fri, Aug 14, 2015 at 5:40 AM, Kevin Hilman wrote: >>>> Geert Uytterhoeven writes: >>>>> On Wed, Aug 12, 2015 at 9:50 PM, Kevin Hilman wrote: >>>>>> This check might have made sense before PM domains, but with PM domains, >>>>>> it's entirely possible to have a simple device without a driver and the >>>>>> PM domain handles all the necesary PM, so I think this check >>>>>> could/should be removed. >>>>>> >>>>>> Thoughts? >>>>> >>>>> Simple devices without a driver aren't handled automatically. >>>>> At minimum, the driver should call pm_runtime_enable(), cfr. >>>>> drivers/bus/simple-pm-bus.c. >>>> >>>> That's correct, and in the proof-of-concept stuff I hacked up and in >>>> Lina's series, the CPU "devices" do indeed to this. Without that, they >>>> wouldn't end up ever taking this codepath through genpd's >>>> runtime_suspend and power_off hooks. >>>> >>>> Also, I'm not sure if your comment was meant to be an objection to the >>>> patch? or if you're OK with it. >>> >>> My comment was purely meant as a response to "it's entirely possible to have a >>> simple device without a driver and the PM domain handles all the necesary PM". >> >> Right, so if the PM domain does the pm_runtime_enable() for these >> "simple" devices without drivers, they can still exist without a >> driver, and the PM domain doing all the magic. > > Is it possible to let the PM Domain do the pm_runtime_enable() itself in > the absence of a driver? Well, I suppose it's possible, not sure it's recommended. :) > If yes, I wouldn't have needed simple-pm-bus.c. > What if a driver is bound later? Yeah, you're approach is better. Kevin