From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B397FECAAD4 for ; Fri, 26 Aug 2022 13:51:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344188AbiHZNv3 (ORCPT ); Fri, 26 Aug 2022 09:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343798AbiHZNv2 (ORCPT ); Fri, 26 Aug 2022 09:51:28 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 737FEBFA99 for ; Fri, 26 Aug 2022 06:51:25 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id z6so2077418lfu.9 for ; Fri, 26 Aug 2022 06:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=Y2l9bTh3XUs5YKIzQSTCxLqvYEJTEkHLpP5cGtmOIiw=; b=zLLCu36Iy57QP/hL5yT4LCCazH11eC6IZlsw0aIIwlGZh+KImrOh2dn8PBwe9YwdTQ ZBujQ/kcT5HwGE7ec3XCxSDovJbcicsQbZiNxvL0JC9seelbJ3TA5Pt6HxjE6lnbPU55 Kxko21qWFVeTm8r+PEPSzveLwSrbP3g7RvsX5o4TCLC92rbsBilUWnTedD6MyUilE5Aa bLiZEi1fciLdZIMGxuyAjdkunYZBgGZHBLQfuFRdEbU3AaQTu2nnoiwXrI6gRXsfn0mQ qHZBlhZ7Lm96Nn2rK3oRiCQ3GOO1DUDNZATRgSFa2iFxA4A+26KBIjoyS31iPW/dm9Ib u+WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Y2l9bTh3XUs5YKIzQSTCxLqvYEJTEkHLpP5cGtmOIiw=; b=0uNSauu6PCs/CYByFi4EEo65oupuhMxpeHi+PD9fJAHTXL4+GPNqbVGnxvWO42HXrF os7vTPjYHFrLASWZD1lNSvFsQmylir8oql6Onys1TE5thGXnqT/pCFlwBRiFVJN8jIpT ZHZyNp3C9CfMYBhdlgJaJGyjjUAGW9IpKklrkQphFqh0ElJuNhLONbfeDajCKFfAOrw5 JYOp1ANQ1PYIbfhCSlR/YsGCYJvDetUIvHQ1m/LHfeYFxvHDBQpWfgXXdZ0ACOLp3v2D 5IfDdKXGtvrbu2G4tno7PPdRfEEY53vwlzrW/XaJfXNqPMNqt3Q7ieO+n34lHRu4fSEJ zjag== X-Gm-Message-State: ACgBeo14R0nj0eafpOFeNQZV+jMkEKMv6l4kS58RTeK5X4FE7MTqRt+A pEedWYm0uUMfK0hQ+FFgEIp7B1NGUvJ8gCEu4S5u9Q== X-Google-Smtp-Source: AA6agR6731hY6W3f0y2L3JzHdc41U+Xgvox8D2w/g/nEHhwlH5Uv+hyHCT1xMzOJCEW3F0U0J5cyBh0Rie5REAA42Vo= X-Received: by 2002:ac2:59cf:0:b0:492:bf97:9a03 with SMTP id x15-20020ac259cf000000b00492bf979a03mr2837904lfn.233.1661521883493; Fri, 26 Aug 2022 06:51:23 -0700 (PDT) MIME-Version: 1.0 References: <20220609150851.23084-1-max.oss.09@gmail.com> <20220726160337.GA41736@francesco-nb.int.toradex.com> <20220728112146.GA97654@francesco-nb.int.toradex.com> In-Reply-To: <20220728112146.GA97654@francesco-nb.int.toradex.com> From: Ulf Hansson Date: Fri, 26 Aug 2022 15:50:46 +0200 Message-ID: Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls To: Francesco Dolcini Cc: Mark Brown , Krzysztof Kozlowski , Robin Murphy , Max Krummenacher , Linus Walleij , Max Krummenacher , Linux PM list , "Rafael J . Wysocki" , Kevin Hilman , Andrejs Cainikovs , Biju Das , Bjorn Andersson , Catalin Marinas , Dmitry Baryshkov , Fabio Estevam , Geert Uytterhoeven , Marcel Ziswiler , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , Vinod Koul , Will Deacon , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, 28 Jul 2022 at 13:21, Francesco Dolcini wrote: > > On Thu, Jul 28, 2022 at 11:37:07AM +0200, Ulf Hansson wrote: > > On Tue, 26 Jul 2022 at 18:03, Francesco Dolcini > > wrote: > > > > > > Hello Ulf and everybody, > > > > > > On Wed, Jul 13, 2022 at 01:43:28PM +0200, Ulf Hansson wrote: > > > > On Thu, 23 Jun 2022 at 18:14, Max Krummenacher wrote: > > > > > So our plan is to explicitly handle a (shared) regulator in every > > > > > driver involved, adding that regulator capability for drivers not > > > > > already having one. > > > > > > > > Please don't! I have recently rejected a similar approach for Tegra > > > > platforms, which now have been converted into using the power domain > > > > approach. > > > > > > Just to quickly re-iterate how our hardware design looks like, we do > > > have a single gpio that control the power of a whole board area that is > > > supposed to be powered-off in suspend mode, this area could contains > > > devices that have a proper Linux driver and some passive driver-less > > > components (e.g. level shifter) - the exact mix varies. > > > > > > Our proposal in this series was to model this as a power domain that > > > could be controlled with a regulator. Krzysztof, Robin and others > > > clearly argued against this idea. > > > > Well, historically we haven't modelled these kinds of power-rails > > other than through power-domains. And this is exactly what genpd and > > PM domains in Linux are there to help us with. > > > > Moreover, on another SoC/platform, maybe the power-rails are deployed > > differently and maybe those have the ability to scale performance too. > > Then it doesn't really fit well with the regulator model anymore. > > > > If we want to continue to keep drivers portable, I don't see any > > better option than continuing to model these power-rails as > > power-domains. > > > > > > > > The other approach would be to have a single regulator shared with the > > > multiple devices we have there (still not clear how that would work in > > > case we have only driver-less passive components). This is just a > > > device-tree matter, maybe we would need to add support for a supply to > > > some device drivers. > > > > > > Honestly my conclusion from this discussion is that the only viable > > > option is this second one, do I miss something? > > > > No thanks! > > > > Well, unless you can convince me there are benefits to this approach > > over the power-domain approach. > > I'm fine with our current power-domain proposal here, I do not need to > convince you, I have the other problem to convince someone to merge > it :-) > > Maybe Krzysztof, Robin or Mark can comment again after you explained > your view on this topic. To move things forward, I suggest you re-start with the power domain approach. Moreover, to avoid any churns, just implement it as another new SoC specific genpd provider and let the provider deal with the regulator. In this way, you don't need to invent any new types of DT bindings, but can re-use existing ones. If you post a new version, please keep me cced, then I will help to review it. Kind regards Uffe