Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760033AbcLBKrZ (ORCPT ); Fri, 2 Dec 2016 05:47:25 -0500 Received: from mail-pf0-f181.google.com ([209.85.192.181]:34439 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759929AbcLBKrV (ORCPT ); Fri, 2 Dec 2016 05:47:21 -0500 Date: Fri, 2 Dec 2016 16:17:17 +0530 From: Viresh Kumar To: Stephen Boyd Cc: Kevin Hilman , Vincent Guittot , Rob Herring , Rafael Wysocki , "linaro-kernel@lists.linaro.org" , "linux-pm@vger.kernel.org" , linux-kernel , Mark Rutland , Ulf Hansson , Lina Iyer , "devicetree@vger.kernel.org" , Nayak Rajendra Subject: Re: [PATCH 1/2] PM / Domains: Introduce domain-performance-state binding Message-ID: <20161202104717.GC22049@vireshk-i7> References: <20161124020322.GI6095@codeaurora.org> <20161124044020.GC9376@vireshk-i7> <4f815e31-22d0-fef7-953c-257fa2bbcb9d@codeaurora.org> <20161129065726.GG3288@vireshk-i7> <20161130010804.GI6095@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161130010804.GI6095@codeaurora.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2011 Lines: 45 On 29-11-16, 17:08, Stephen Boyd wrote: > Perhaps. One question is if we consider a shared regulator as a > regulator in the kernel, or if we want to hide the regulator > behind some other API that aggregates the users of the voltage. I > don't see how to draw the line clearly between a regulator and a Neither do I :) > power domain that modifies a regulator underneath. It seems like > everything that's using a regulator on the SoC could be using a > power domain instead and then we could be aggregating the voltage > requirements outside of the regulator APIs. If I am not wrong the regulator API chooses an intersection instead of the max requested voltage and so it may not fit very well in the use-case we are trying to solve. > The only other way I can think of doing it is by having the > voltages in the OPP tables for each device. That gets sort of > messy though because all the devices calling > regulator_set_voltage() have to set the min voltage to be their > required voltage and the max to be the global max voltage on the > system. Otherwise a higher voltage may not be used while it may > be required. Of course, we could encode that as the last value in > the triplet and everything works. Where will we get the performance levels in this case ? > What do we do if the device is part of multiple domains? For > example it may be part of two power domains for different pieces > of the silicon within one device, and we may want to > independently control those domains depending on the clock > frequency. I thought the best way to handle would be to add a virtual domain for such a device. That domain shall be responsible for changing its parent based on the performance level selected, and at that point only the recalculations for both the parents should happen to select the new best performance level. @Rob / Kevin: Do you have any inputs on the things we are discussing here? I want to involve you guys as early as possible, or we will come back to this again :( -- viresh