Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp388495rwe; Fri, 26 Aug 2022 06:59:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR5EFJ8NyLZ3wd6IoMdw5/GrqC6y076LjZ3DE58JMGunsJD6eklOVjqsxnQuf+MU3As3AwEw X-Received: by 2002:a17:906:4795:b0:73d:daa0:3cbf with SMTP id cw21-20020a170906479500b0073ddaa03cbfmr3799570ejc.693.1661522354035; Fri, 26 Aug 2022 06:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661522354; cv=none; d=google.com; s=arc-20160816; b=a5V63lhueB45QW+pe0xm7t+6vHNCRl23ignFmLbUhBUPxsSJydOdV4XIX4qIbnaJ2X 59WJ4mCaslneYRGxdiDYw1YLjiGGVFHopoUITzxl2IJ/49M2zbJUHv5TFEX0kgx/joQi FiwMqAczM0cOmZgppSsHK2js3rNwLn5NCv84jP2bYMXQE6R8D2rKx0Z8MOwd+5Mzrel6 IzN1gNu96PLrTa/6rd+skg/CnvMmrjAG49So5bpAuH9sJEDhfB3ttSiVZtf5WdoyP8nq pVSgCvZLzHT5jVbOGKdlXo7XJ+57WMBhBCxSxeXRJd2pbU6/ohX9bGmktaj0GF1ISaDm Gd8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Y2l9bTh3XUs5YKIzQSTCxLqvYEJTEkHLpP5cGtmOIiw=; b=wgq9DBcetohBM7bdegSWS6Onk+2jzxGjNaMYsmHfQebl4+ewqTEppy1Vez3VvJxWXj MG++QVhu51OwLfGWgj1Rep6mwSkMzK2cATszX5YUDaYlZWu7beetP0uGSvTVwXths2S8 Di8AT3gLVHmiFIGGci2RgVNfF1GmcoOqRBhK79q5xJx3Vf9FWwBCxnnMa8Dn3ubIr10B 7JDOIXxZsYnlN4dPWaMCTkIFUgsVwbg+jYymk/cQSFWqRpeARh5GUO/ETuOycvNs+eJc fZ2wJJZl80yLOzy9UJ3uh11h/tOYa45h05Nn/PUx5B1pIT8/gv9qPdsr928xJyPoNLU3 DO8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zLLCu36I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c23-20020aa7c997000000b004466b489152si1355858edt.472.2022.08.26.06.58.47; Fri, 26 Aug 2022 06:59:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zLLCu36I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344196AbiHZNv3 (ORCPT + 99 others); Fri, 26 Aug 2022 09:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242864AbiHZNv1 (ORCPT ); Fri, 26 Aug 2022 09:51:27 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71A11BB928 for ; Fri, 26 Aug 2022 06:51:25 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id l8so2061995lfc.12 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=LmpmYvT8U+SnNYELPyDxtDPR1tXyDCJRhYdOZQZmnKrT/iWsxtCvr1FHGv/UYeCXKK QNOD/lQmLzMymAcWq5XNpeh2CuqlCYtaCMy95uOLkXoDsK31N7jJmBZBJ8cKLVPyhf6I iP+Xk9nmeFcjIe5TxrOYV7UEiWQVYh4RsfwWZQhj6KTBYE1dABU7TXna1zpLSgF/0UP1 x6ZbW4zaLLyFp3JuU7AbtiBGLtabGvgETzGrdt7HyBgQm0W8N+o9KeedU8ZnUHILwylZ hStYNm1vcichfIaV/N3AVua7QDW+XOSirNGkhW/nYRnFjui9JJ0TBHxkqLkB5PcJHh+v 457w== X-Gm-Message-State: ACgBeo3VKwb6ymd/E7UX199N57hyzlfwf6DEXco2/nf/YOJnphSUZGRF JEsyHGfdjgnOg1Wt89a/2JtYsTh54QjOIFY8MSB/1g== 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" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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