Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3161419imw; Mon, 18 Jul 2022 03:16:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saMcx5vDavdj46NL3DXISMAOm7CFYD3xUjYC/5RO8qrPy4z/xn/5cwReabfSEIxDq1tMZh X-Received: by 2002:a05:6870:e24c:b0:101:3426:de67 with SMTP id d12-20020a056870e24c00b001013426de67mr15937186oac.268.1658139392736; Mon, 18 Jul 2022 03:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658139392; cv=none; d=google.com; s=arc-20160816; b=amEWUjUqfXxOkDE/aPZ486X7jAn2N2H+idd9pAcS0tWRyiNKQ3MHfx15W1GLm0Uq5L LN48ga3oTGhLWAslG0T5f63PvUBI9J7hAfjJAa2aryw0djaBUZbuP4qAq2R1x/IcHNYc oYmM7jfYmtQDL1IlFpXfd10MfMmwP5upSKp9nYILsJmmr3zW3bg4WVrBKkbuNTjKMc1g gSmFpNPgdKt/jhasfdxRyXDs02563NTqyZuqG/rhgjoVlvQAPCzsj8kdhuvxWPPfQoMD 11hEaeaEeLaEcrh9jjIm/4rEC6mUE6YrqgxBufOI/EA5FjJJxBZKFvcsjvWXqlqLLB1s Z7lg== 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=SW/5uuPhfEIiVcFOfH8vJMrT6q6SXd8wiWSNhlWVZXE=; b=iGFQE3F5zX75p1UGwXiO16PJERnS7OhqI1OAmaT7Od2kGBVrpHKCwb0nAzAgklOlVl Uk7CeqvMh79gazJmsNx8ydhfvTahZdpXOhuXDLg0BOfVmnYZ4apUTH6owitQU9kcOhd5 NzQDNj85iFEA2/fi4ehUHdMKg3xzE3rBIb9UDiDmMb3pcCTYdlni4yO/u6UXBoBZ+VgC A6D/HvBHEe91eXVCe9NxqJn9wzlnjC5trYtvvMPq+/pxwg14MFWondZSl07QNF8uYtuR KtWp/axxlvMuqDkYZ5x2AbsL4NsrmBTVmR212YieFCjoWc+sREki7w0IMjhGnHk+GTkQ FlfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yzDwRyaJ; 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 t130-20020aca5f88000000b0033a4d59d168si8449801oib.297.2022.07.18.03.16.17; Mon, 18 Jul 2022 03:16:32 -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=yzDwRyaJ; 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 S234251AbiGRJt0 (ORCPT + 99 others); Mon, 18 Jul 2022 05:49:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234221AbiGRJtZ (ORCPT ); Mon, 18 Jul 2022 05:49:25 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F28B2FE for ; Mon, 18 Jul 2022 02:49:23 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-31cf1adbf92so101091167b3.4 for ; Mon, 18 Jul 2022 02:49:23 -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=SW/5uuPhfEIiVcFOfH8vJMrT6q6SXd8wiWSNhlWVZXE=; b=yzDwRyaJYFlLD4KeR1jik570FoO+psDVavgR6382KBUsTWFF27tRs7D/1LwT+HWJjT mDwjVM11MqgWhebI3orsvkCbbf2YP1wtIhQzDKUjD5BSOOBjO5AIHhhORzCbJMC7BiYS gbgcKcBOUcarwDFW48tUxVcfkQKjoOJDB4GlHkG3YVk4r20YIfiF+bOuFKVS0k+Fc4Wc o3b0kT/hRM1PkrLNjtK22jrtMiF50msOUsJ2ckaOm0IQH+kug8RmFM2Bsnuyh6PuUCw+ 4kkK2pxWY0/C9h0kC3MTVzzTBzR1x/BmWQVDfIzgnkAYK/WbhpBlOiG6ouABV4qkL/zZ RE4Q== 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=SW/5uuPhfEIiVcFOfH8vJMrT6q6SXd8wiWSNhlWVZXE=; b=Ir7iyy2lq2T7kLx0IrKuMaYDRoMFtggEyLRN7SjJnUgNMVuoJV2oPiIap8Uiy6b1ii P7csnUeVX0EsgUPWOw39Ace5Fy0YqAssCnWtxSssjpdsdAXdkFMIfRhpMRU2gjeMRJGk zz6ycVbq/WdQKf1+eBFI9QGWisY0eqyzjXXQQwalGoaGrM3aBYTjpzu47zrZrUoV2UtT Mit5nRdsWT3crTE1d8sA9C6TSffQWfPzSKLDO6an8XK+3ey5Vrt0hYg7O5y6zzcabZDw 04m0OlrfHWo5dEsDDGf00BXv3+fVZVViTMqEPNPsOZHiHheOPHNla0/55OAq0yOavOMe J9yw== X-Gm-Message-State: AJIora/1DpxagZJk357Jzggr1IxsLCPF2OTGjqrnrcsq+Xf1yX8I+FFe cFWHG3XZclQl8a62XAnFLKJR6p7i2YPV6SpShD3G6g== X-Received: by 2002:a0d:e885:0:b0:31c:e456:c054 with SMTP id r127-20020a0de885000000b0031ce456c054mr29022869ywe.299.1658137762876; Mon, 18 Jul 2022 02:49:22 -0700 (PDT) MIME-Version: 1.0 References: <20220609150851.23084-1-max.oss.09@gmail.com> In-Reply-To: From: Linus Walleij Date: Mon, 18 Jul 2022 11:49:11 +0200 Message-ID: Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls To: Ulf Hansson Cc: Max Krummenacher , Max Krummenacher , Linux PM list , 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 , "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=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 Wed, Jul 13, 2022 at 1:44 PM Ulf Hansson wrote: > > > IIRC this led to problems because we had to invent "atomic regulators" > > > because regulators use kernel abstractions that assume slowpath > > > (process context) and power domains does not, i.e. they execute in > > > fastpath, such as an interrupt handler. > > This isn't entirely correct. The callbacks of a genpd, *may* execute > in atomic context, but that depends on whether the GENPD_FLAG_IRQ_SAFE > is set for it or not. > > Similar to what we have for runtime PM callbacks, with pm_runtime_irq_safe(). Aha I stand corrected! > > > The atomic regulator was a subset of regulator that only handled > > > regulators that would result in something like an atomic register write. > > > > > > In the end it was not worth trying to upstream this approach, and > > > as I remember it, Ulf Hansson intended to let the power domains poke > > > these registers directly, which was easier. (It's on Ulfs TODO list to > > > actually implement this, hehe.) > > Yep, unfortunately I never got to the point. However, poking the > registers directly from the genpd provider's on/off callbacks has > never been my plan. > > Instead I would rather expect us to call into a Ux500 specific > interface for the prcmu FW. Simply because it's not really a regulator > and must not be modelled like it. Instead it is a voltage/frequency > domain that is managed behind a FW interface. We should take a stab at this, PostmarketOS just added support for three more U8500 phones so they support all the Samsung models and we have actual users of these systems. I think this would save them quite a lot of power. Also I use these targets for a lot of misc testing (like Kasan etc). Yours, Linus Walleij