Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp867480iog; Wed, 15 Jun 2022 14:18:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vCOnRE3vUXoP7zPZzhUxKAKEbWCo6955c/36JgtWA6Jn4zBOSX7tknPTbsC06e4vUl9oys X-Received: by 2002:a17:902:c9d2:b0:168:e92b:62fc with SMTP id q18-20020a170902c9d200b00168e92b62fcmr1269525pld.80.1655327882522; Wed, 15 Jun 2022 14:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655327882; cv=none; d=google.com; s=arc-20160816; b=uhOotvxlEEdEpsFFLpZNod4od5YorsCQ9ph1maq/EghbQ+kw+DC1ky+Hp9yCXWnOJm nAMvKez/3tNlmFeeb0mRJ22fZqnpYCEpA9itNTlWYPk5EfPo6GLAHhuiXKpiY7zPpUlS x9jFpJx/hpZ7D7bMrAT67Iugy2usdIXsavn3WtBxvGypG3z7Mjlb7BuBW+bX+U9rpzs+ JygbqQrggb7RjfHhUP5gQsGx13LxmzU28TwT7HxgTEf05S3yJ6Kt1G2szGv2sBvCyDE3 uiYLW++9bgq/lz2gGV8N8ThXjy8AguKzuwZMNRIU/H4tepIifNdBZOopNauJXpwTLC9P edaQ== 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=U4zrudTfpKSMt98XR2iufEyV1+uGBR6wStGeT3BqOFk=; b=TvWZleQcf8i/mPI5UEj5ijZxm3LAe32eL+zWV8ECBRmWW7SMpYZMC1x8oTZCVxa1Ap fpSfSxc8d9+VJoYAoYdo266HISK/L4wqRQ+rOYPH9bHdl+5z2j0JhVCNsLul3ah1Wsy+ 1PWuXXrW9EQwpGosYVY5chpoeQ9kQnXa4juO0ojli9q4ps5y70NYUQyDDOk1jUAeivFj ZyvodUHI9EguWqDkSDaYNUSKvTGyg/e9fcgYGLQMV7xIlrMfAxrrNLTsGKnAho5oBeyV oSOjJoLkr+L66yGAkkkGApQFMpSFmyRdZtcao6kHCmlOcYprVwMwQuF1pxokLfczoQxu 6pmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iSjexz3m; 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 q1-20020aa78421000000b0050e0d9b0e4dsi221885pfn.166.2022.06.15.14.17.49; Wed, 15 Jun 2022 14:18:02 -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=iSjexz3m; 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 S1349867AbiFOVPR (ORCPT + 99 others); Wed, 15 Jun 2022 17:15:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347606AbiFOVPG (ORCPT ); Wed, 15 Jun 2022 17:15:06 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 419265536B for ; Wed, 15 Jun 2022 14:15:05 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id be31so20801240lfb.10 for ; Wed, 15 Jun 2022 14:15:04 -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=U4zrudTfpKSMt98XR2iufEyV1+uGBR6wStGeT3BqOFk=; b=iSjexz3mLcG79lRlUUZPUPkq8OBBprdOmNRAGkZEcmvAa4eQvTfbPk9WmCpbFPVpE/ 5IjIW1VvqnyWQIMo4gprntm+LphtyDdc7pa9pxQhRyYNbQ3sPypQpGvpVm2goTEqjXnD ZWIHzr9ALIdL8uSDepi8JGqdaUGJ9KO81GTDeglZtZzld+OdfsO6ivUoTALFkKTPaPle EBAdyCHjtkfqlSTu21w/CG11XS8bx7jqZO9mTphBt3RNJEys+Eq0Az+zPC92rLlqpnL4 piH0IU2/m0Nc8T/9Edrwj9ROFMNSzW+SSvqduVjOVc0ysz3DV4UTT7udJAo7v4Z2HhU6 Ud3g== 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=U4zrudTfpKSMt98XR2iufEyV1+uGBR6wStGeT3BqOFk=; b=HF+tSlgc/eruemZ+8WZ6xnqPeMd4PZIoTTCZY4vmwMHbJ6bLKXVz/RL9uqkq6qURE+ 9H/1nYirjWDdIh+Qk4EAFt/atrstLgWJ6NDKGr/py/IA3e/jOvdkPmfCaOQ1TYokq+UT GG/sucdQIEM6Hj1J+Fzwmd5Ffx3F8fa6BbHa54nDQzXtZ6nSPKzRuygqPGatrHqDeq2z CsKKz6dnIBOJ19at/FjlUGVfQhUjuOKP/pdbdXvmfnEetfH2BlUkwI/MOzMjLAdtyQfL W4ETsliMc1cBv7QNn/mYf3IL14N6JUSFMwkOE+HSZAChIOEjz4nrHz1cppEHQHc5BQHW MMQw== X-Gm-Message-State: AJIora9+IlNNOU4v4+1PLcFHsX/NPn1bB2Oh3Dty2bUMlq2sxWu9Q7cg YObM/xRHEEuIcGSUWKiioXjprlDxEGHju3daA2H/1g== X-Received: by 2002:a05:6512:3085:b0:479:3986:1d23 with SMTP id z5-20020a056512308500b0047939861d23mr799565lfd.373.1655327703359; Wed, 15 Jun 2022 14:15:03 -0700 (PDT) MIME-Version: 1.0 References: <20220609150851.23084-1-max.oss.09@gmail.com> In-Reply-To: <20220609150851.23084-1-max.oss.09@gmail.com> From: Ulf Hansson Date: Wed, 15 Jun 2022 14:14:27 -0700 Message-ID: Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls To: Max Krummenacher Cc: max.krummenacher@toradex.com, linux-pm@vger.kernel.org, Francesco Dolcini , 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 , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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=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 Thu, 9 Jun 2022 at 08:09, 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. > > This series adds a PM domain provider driver which enables/disables > a regulator to control its power state. Additionally, marked with RFC, > it adds two commits which actually make use of the new driver to > instantiate a power domain provider and have a number of power > domain consumers use the power domain. > > The perceived use case is to control a common power domain used by > several devices for which not all device drivers nessesarily have > a means to control a regulator. > > It also handles the suspend / resume use case for such devices, > the generic power domain framework will disable the domain once the > last device has been suspend and will enable it again before resuming > the first device. > > The generic power domain code handles a power domain consumer > generically outside of the driver's code. (assuming the 'power-domains' > property references exactly one power domain). > This allows to use the "regulator-pm-pd" driver with an arbitrary > device just by adding the 'power-domains' property to the devices > device tree node. However the device's dt-bindings schema likely does > not allow the property 'power-domains'. > One way to solve this would be to allow 'power-domains' globally > similarly how 'status' and other common properties are allowed as > implicit properties. I don't want to interrupt the discussion, but I still wanted to share my overall thoughts around the suggested approach. Rather than adding some new DT bindings and a new generic DT compatible, I think the current power-domains bindings are sufficient to describe these types of HWs. To me, it looks rather like you are striving towards avoiding open coding for power domain providers that make use of a regulator. Right? To address that problem, I think a better option is to consider introducing a helper library with a set of functions that can be used by these types of power domain providers, in a way to simplify the code. [...] Kind regards Uffe