Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp785336iog; Wed, 15 Jun 2022 12:15:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uJamo+7M0thGwA6aoaker+1ru05yPhCs3kwg5NILUPDzqBEscNRrTgeRZwAfZ9yrtd9pFg X-Received: by 2002:aa7:c4ce:0:b0:42d:d5ef:2bd6 with SMTP id p14-20020aa7c4ce000000b0042dd5ef2bd6mr1571545edr.237.1655320530015; Wed, 15 Jun 2022 12:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655320530; cv=none; d=google.com; s=arc-20160816; b=M0GYzw+CD6XFwWURu6wm4aYZ2ZH8ftpWB/MSLd/U6tnmYnbTaINrD0o2q6sBtRvAWU BfZ2eUqUqysjnpJsVA7QbNBPV0hTayA0Ik/veOLDtjRssdxeZ3RvZoraetlfUJ5J/0Qr 0Ed2H//c6cf8MMukYW4c6UCe5l7+e5JQovgSZGQVJaKS9cuna5kLFSe3TZV5s+53xugs k+Ivd7YaKjfUdlwnNWbOic9YIZfor3bhZUfAbxKlXlwyBkQi5OM5s0gWuEG+tVt+MIZs LFVFT6chcTyi6/xOq3qqH4NdticzVYgVEPkyhgRT88k3xrJ4/IB4drcawjWZ0URd+RXw fFxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=fY+LSoGCCLiie8FGshDbxlLaaoWRgtUnztAPG5B113A=; b=syUnnL8gjRYvlNCXbvnYQdGekGfF9F3AbLOxt+vc3LEydMI9gKv6hb3yef0RG7Gal+ i9UVxOT6gEXawu6/KQqtuf2El1tl6CuuSOA2/GxRKtNP678MHpyyfe+V0kw95RZdTTQf /o0YQADLRz5Xb6vjiZnbICZNMLKMV4wPs9sBdraPjni3ljNu0LdKZR9rtzz+GVr2gF44 ULvz8yjTcnbN0P3LdyjfaFzXE0wA0+LAFDaA5uYeuemHrJixlqKTe/OKw+xeZUpeFbKz PGTxCdXuRUzPWTf84n78YAiw0E/8pnmeC4UD+bBYAsim9cmhSBzntZTtEnwu8jlxaH3t 5ZVQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v16-20020a17090651d000b006fed5b3f5fbsi15191109ejk.941.2022.06.15.12.15.04; Wed, 15 Jun 2022 12:15:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358360AbiFOSZE (ORCPT + 99 others); Wed, 15 Jun 2022 14:25:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241899AbiFOSZB (ORCPT ); Wed, 15 Jun 2022 14:25:01 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 88A4725588; Wed, 15 Jun 2022 11:25:00 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6638D153B; Wed, 15 Jun 2022 11:25:00 -0700 (PDT) Received: from [10.57.82.209] (unknown [10.57.82.209]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D9B243F73B; Wed, 15 Jun 2022 11:24:55 -0700 (PDT) Message-ID: Date: Wed, 15 Jun 2022 19:24:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls Content-Language: en-GB To: Marcel Ziswiler , "max.oss.09@gmail.com" , "krzysztof.kozlowski@linaro.org" , "geert@linux-m68k.org" Cc: "linux-imx@nxp.com" , Francesco Dolcini , "robh@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "ulf.hansson@linaro.org" , "linux-arm-kernel@lists.infradead.org" , "dmitry.baryshkov@linaro.org" , "biju.das.jz@bp.renesas.com" , "catalin.marinas@arm.com" , "geert+renesas@glider.be" , "bjorn.andersson@linaro.org" , "vkoul@kernel.org" , "shawnguo@kernel.org" , "kernel@pengutronix.de" , "khilman@kernel.org" , "s.hauer@pengutronix.de" , Andrejs Cainikovs , "will@kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-pm@vger.kernel.org" , "rafael@kernel.org" , "festevam@gmail.com" , Max Krummenacher , "broonie@kernel.org" References: <20220609150851.23084-1-max.oss.09@gmail.com> <20220613191549.GA4092455-robh@kernel.org> <12e3bb72-af2d-653f-b342-c6b4d6a1f292@linaro.org> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,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 2022-06-15 18:31, Marcel Ziswiler wrote: > Hi > > On Wed, 2022-06-15 at 10:15 -0700, Krzysztof Kozlowski wrote: >> On 15/06/2022 09:10, Max Krummenacher wrote: >>> Hi >>> >>> On Tue, Jun 14, 2022 at 9:22 AM Geert Uytterhoeven wrote: >>>> >>>> Hi Rob, >>>> >>>> On Mon, Jun 13, 2022 at 9:15 PM Rob Herring wrote: >>>>> On Thu, Jun 09, 2022 at 05:08:46PM +0200, Max Krummenacher wrote: >>>>>> From: Max Krummenacher >>>>>> >>>>>> its power enable by using a regulator. >>>>>> >>>>>> The currently implemented PM domain providers are all specific to >>>>>> a particular system on chip. >>>>> >>>>> Yes, power domains tend to be specific to an SoC... 'power-domains' is >>>>> supposed to be power islands in a chip. Linux 'PM domains' can be >>>>> anything... >>> >>> I don't see why such power islands should be restricted to a SoC. You can >>> build the exact same idea on a PCB or even more modular designs. >> >> In the SoC these power islands are more-or-less defined. These are real >> regions gated by some control knob. >> >> Calling few devices on a board "power domain" does not make it a power >> domain. There is no grouping, there is no control knob. >> >> Aren't you now re-implementing regulator supplies? How is this different >> than existing supplies? > > I believe the biggest difference between power-domains and regulator-supplies lays in the former being driver > agnostic while the later is driver specific. Meaning with power-domains one can just add such arbitrary > structure to the device tree without any further driver specific changes/handling required. While with > regulator-supplies each and every driver actually needs to have driver specific handling thereof added. Or do I > miss anything? > > We are really trying to model something where a single GPIO pin (via a GPIO regulator or whatever) can control > power to a variety of on-board peripherals. And, of course, we envision runtime PM actually making use of it > e.g. when doing suspend/resume. FWIW, this really seems to beg the question of PM support in the drivers for those peripherals. If they'll need to be modified to add suspend/resume routines anyway, then adding a handful more lines to control a supply regulator at the same time shouldn't be too big a deal. Conversely, I'd be surprised if they *did* have PM support if there wasn't already some way to make use of it. Multiple consumers sharing a voltage rail provided by a single regulator is so standard and well-supported that it barely seems worth pointing out, but for the avoidance of doubt I shall. Adding a new non-standard way to hide a specific subset of regulator functionality behind behind a magic driver because it seems like slightly less work than handling it the well-known established way sounds like a great recipe for technical debt and future compatibility headaches. What if down the line you end up with a situation where if device A is suspended, devices B and C are happy to save some power by running the "domain" at a lower voltage? Do we stubbornly start duplicating more of the regulator framework in the magic power domain driver, or is that the point where we have to switch all the consumers to explicit supplies, and get to regret having "saved" that effort in the first place... Cheers, Robin.