Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp368388imn; Thu, 28 Jul 2022 03:19:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1swRPip08qdC3Px6wMasymuSuCbxIgrR0lLBbnNRzzqQM5iqkEilaCTMjBCbMFMKQJofHZ3 X-Received: by 2002:a05:6402:5510:b0:43a:76ff:b044 with SMTP id fi16-20020a056402551000b0043a76ffb044mr27215676edb.197.1659003554523; Thu, 28 Jul 2022 03:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659003554; cv=none; d=google.com; s=arc-20160816; b=Xq8Wg69/8N0m637IM97q7Ot2in8Mv9/U/UcJG10PReTXIkKMOzHGiOdU1oY6Eh9dvF itP0LBQ6yPxXdL0WDy7+rgzab5bYDk/GjxDxdAujyn4jrRQLYiSNjNDg9RVnFCndPkqe tOQuchKTGiT87YykHBu2AP0dHHOR+v/X/P5kMmKRTEHtac+NLY/OETz7eQYRMt6Bwoek 0fExZoFt1M2FR+0hVrr0bwZLPvKTyKKFmusJ2krMbQaYlSIn70Y8F9kAXrRJtXWEvOxr QM64DpyGyPj9HEVyTn0F8uLe2P6Fzmy5lxVsiT5ucZFF+4d3LgcTnY42hMptxZsL35kJ Criw== 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=8JmHUzVejHKie8HTRAolerKNkqFMF0TC8kqIrcN4GZo=; b=X4Q9IGlV9g12pa9Qlw667YyKGACaMZEiWJhnaMgJRwxLw+CWgYT7H2iKoCFD7Z3V44 3pgMVcAcS1I93WKyV9shbBfOaZ+oP2/lDpbYGgzkdJFNWknB9zP1phZEikqHCHwKx+AG QVRu38Yc23jOXMN7tPc2f24wzLM2wVG1SsBI9PeDNnycQ48+DSMdIhyRrG6TZvALpL2N d6K4uMd5MB5bex0FkbZLntwdiFKureHEPkmhdkLsIyWKTyx3e7xZ2ngb2JieIY0gNWVr xBiTSH2OswCeRVcHMUpk5TLdvtYlvULsczuV+WfGr1VEkakzPlfjhserCinVWgzX8YUk Rczg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lB4vLEJr; 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 xa6-20020a170906fd8600b006fe4c66b711si448548ejb.46.2022.07.28.03.18.48; Thu, 28 Jul 2022 03:19: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=lB4vLEJr; 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 S235594AbiG1Jhu (ORCPT + 99 others); Thu, 28 Jul 2022 05:37:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235577AbiG1Jhs (ORCPT ); Thu, 28 Jul 2022 05:37:48 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2564A61DA4 for ; Thu, 28 Jul 2022 02:37:46 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id t17so2087185lfk.0 for ; Thu, 28 Jul 2022 02:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8JmHUzVejHKie8HTRAolerKNkqFMF0TC8kqIrcN4GZo=; b=lB4vLEJrwzE71UKK834Pf5O06Jg6ogSa3Dvcuxgp+4S9Dv2VCMquOICJcCHjYPJBxU +9N8GJXdyV1ldMUygXvuKCCVNfE7A5I8DLufpcbN1Oh63jFmkt+b5oqcqY7yCy9b5UoH GvWUuKdeRBFbZUN+4GyppsL5WyINRw+S3yU4ikzpHQ9QpK0EzS+1J9zjxm92nAbGUNzv uc5dmvrIus5SHp6D/8zRmJrYFgrYJ58GMytqNIoZr0yYejJSoVOaO98qek8O1XiffeGn TyFtqDmFBR8oeEzkzabFg359QGWVyBi98dWr86IEtlyznGquiSScimQHoD7dh2WuUoPn 5h4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8JmHUzVejHKie8HTRAolerKNkqFMF0TC8kqIrcN4GZo=; b=5dKwql7eT2d+EJArbPEtTsnIsdMc9/WgBtIsrrSS4euLvajOydlXGuHeQAiDQNofGe 5P8tRbrXo2SvYfcYS4HRZWSA8Ed5sfaCRjHs2Twy3clMkRHrJuxJqzA0xGmeEvs/Qo3U BSmDi6HmFsofFPOfI9H285Oa4F4wHOoENnwUSz88DtUjCPG/gTmsJbJl9WyVo/bwLmjj GmyzVo9pIEq41qLCJ8Hd18jU69uUdkDElvYWCYBx0FfGzK6qGFEFvpgzDJWo2awUQmSD GX3Edt1nEzrGT596ASQ6Rya11hicYBuZiTJeUvFy1COl7o5+9fU55wSFEB66vrtk/tRQ OzEg== X-Gm-Message-State: AJIora9a7hix9qD9isDkLKSUP+dp8i9RCZ9E6O3YRXQ14v32urCqhRu5 5cyS+o+uJJrMN283rvgFQOR41hOAJelNf5MHE5KZvA== X-Received: by 2002:a05:6512:2a8e:b0:48a:6b7d:617d with SMTP id dt14-20020a0565122a8e00b0048a6b7d617dmr10219035lfb.167.1659001064322; Thu, 28 Jul 2022 02:37:44 -0700 (PDT) MIME-Version: 1.0 References: <20220609150851.23084-1-max.oss.09@gmail.com> <20220726160337.GA41736@francesco-nb.int.toradex.com> In-Reply-To: <20220726160337.GA41736@francesco-nb.int.toradex.com> From: Ulf Hansson Date: Thu, 28 Jul 2022 11:37:07 +0200 Message-ID: Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls To: Francesco Dolcini Cc: Max Krummenacher , Linus Walleij , Max Krummenacher , Linux PM list , Mark Brown , "Rafael J . Wysocki" , Kevin Hilman , Andrejs Cainikovs , Biju Das , Bjorn Andersson , Catalin Marinas , Dmitry Baryshkov , Fabio Estevam , Geert Uytterhoeven , Krzysztof Kozlowski , 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 autolearn=unavailable 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 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. > > > If it's a powerail that is shared between controllers (devices), used > > to keep their registers values for example, that should be modelled as > > a power domain. Moreover for power domains, we can support > > voltage/frequency (performance) scaling, which isn't really applicable > > to a plain regulator. > > > > However, if the actual powerrail fits well to be modelled as > > regulator, please go ahead. Although, in this case, the regulator must > > only be controlled behind a genpd provider's on/off callback, so you > > still need the power domain approach, rather than using the regulator > > in each driver and for each device. > > Francesco > Kind regards Uffe