From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12E43C433EF for ; Thu, 23 Jun 2022 16:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Am65pK8GxXjRj+Ga9ehQ3F2wKftCTq3XKxAnD4n0VK4=; b=lsfGU4m7xyCuju Kw1Zd2dvm7abesfuJYCZD1ubSrfNNcmycr7KkY991Ff6p0DUjYSpNFO9BXYyLhTl9h1VECr/ZX3ep ciwgr1P2GVWLaKYGEko7f3xoP95ox86IKpzmarmUVyg9s1SydW/uyX0pDsB2REKd57vOvwEdgsC13 L7onOJnfMeUugVPuKJrxa8tA4AMN03rk2Pn+iANTOO4lnSiasKKZY+/cie7umamalncG4u0ydVEgY Fvj+Lqfa73aBweQn1HkK5wXCKsFT4nKhy5orTegEe6KwlOhcltN5eM0n3SCXnK0zhbrEol4tMxEHg thJRNx9Y94sUlEl1cZ7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4PTq-00FqA0-El; Thu, 23 Jun 2022 16:14:54 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4PTn-00Fq9Q-HX for linux-arm-kernel@lists.infradead.org; Thu, 23 Jun 2022 16:14:52 +0000 Received: by mail-lj1-x229.google.com with SMTP id b7so23911046ljr.6 for ; Thu, 23 Jun 2022 09:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=chAW9yXxTwtCayPDN2K4p2x7rb0AVI/k5FO9A88UkBY=; b=iepp750f1IXDFnBvhK4HM5vyqZCuV/H9B+98+C6wYTafYO5h+NkfZkl1dxzQEBVmyB FaXWPAUHYp0NuDlM31aN6KreHiZ5gKyAy3tRZV2MFtpveYk+Oyx+vkg15GoG1gVj6KLx /KJ44R/NvwfBg2J5gU5GX4FpHFF9uXWXRHyqFCNZTsxPysn+bxGy/2mPl5tyyRF4zCu6 uqSQEG4NhhADABXUy98hg/xetXQgQpEUqCXYuMCXt4WyceOTcq0tbov8gMPr693Jn5iR blCa5AUgMxBXUYv/UZb2N01ZjcT2fZjVJ4UmLn2GN5EYcUftX2R+0QcFvlZ6fwjUq+DT p5/Q== 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=chAW9yXxTwtCayPDN2K4p2x7rb0AVI/k5FO9A88UkBY=; b=UdaEnzCDj8Xsr0nvwYZSduy/GQGWsGJaUBTpzCEmprTW8AThj1QdGjvc/yHBbf7Nm9 dsbnLfbhysqmDASS0J6BkKEsQi63hRxKMkWFJImt7ZEfj4qdiUDE4QjG75wAUBBbFcua JbHOCKa5ifGYqfNsMy8cxhaH1ryZBd8cXibHxEmYjKUOcDYC80ic+cuBoAHSy+51Rall Qj9+8VqO7/ecqj/dSRHELtEBHLFwhWOz6YTUhaic/7fXkcIButTYj+nx+DoMU3EYVdUa QFmwFGMko+6XH6oQSQu32tpsn+0tV/dEBvmejRYyBZ6unSxUEzwpkDE9JkATXZaHVFZT w2QQ== X-Gm-Message-State: AJIora+GQ5XDYfvXE49E67fBj13sL0WJnPHz01VK9oVmefCujELV0Weh V2435cuoJRHnqb9vznrMVG2AEnWvzz4AmWif3aU= X-Google-Smtp-Source: AGRyM1uaOZs3XcqnApOZWDYeXACNwy3jox6uESty97oe5gc4bwE/M1cCoRJ23ADElhT0XKwR5RsMcZQXTxqHpm4Pvco= X-Received: by 2002:a2e:990:0:b0:25a:7c03:eb70 with SMTP id 138-20020a2e0990000000b0025a7c03eb70mr4983157ljj.350.1656000887671; Thu, 23 Jun 2022 09:14:47 -0700 (PDT) MIME-Version: 1.0 References: <20220609150851.23084-1-max.oss.09@gmail.com> In-Reply-To: From: Max Krummenacher Date: Thu, 23 Jun 2022 18:14:36 +0200 Message-ID: Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls To: Linus Walleij Cc: Max Krummenacher , Ulf Hansson , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220623_091451_636908_DD724D63 X-CRM114-Status: GOOD ( 20.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all On Thu, Jun 16, 2022 at 2:51 PM Linus Walleij wrote: > > On Thu, Jun 9, 2022 at 5:10 PM Max Krummenacher wrote: > > > This series adds a PM domain provider driver which enables/disables > > a regulator to control its power state. > > Actually, we did this on the U8500 in 2011. > > 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. > > 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.) > > Yours, > Linus Walleij Thanks for all the feedback. The approach taken with the patchset seems to be architecturally wrong and as Linus pointed out has additionally the flaw that the regulator would need to be controllable in atomic context which depending on the regulator driver / configuration may not be fulfilled. So our plan is to explicitly handle a (shared) regulator in every driver involved, adding that regulator capability for drivers not already having one. The question which remains is on how one would model functionality which by itself does not need a driver but would need regulator support to switch its supply on in run state and off in suspend states and poweroff, like for example a simple level shifter. Any suggestions on this topic? Thanks. Cheers Max _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel