From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5920B606A329 for ; Wed, 2 Dec 2026 08:34:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Q3riZIys; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Oy13NG9i DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=dvXwFjfbCEe9am7l7epfclBRi6VXIY4QcU8ipuiPikQ=; b=Q3riZIysUSTXUkYOOcvRUKfWvl RNv4XUSxTXezT+re+yYswKvj9lX/QwNqp2rHwAQ3WUGcNDeiV0Tno1G/KmZfpe95fmbIGd6eXf7th 1PpVLOJNOv35Bd204tiFgW6PJPapCmtNOxL8RC4h+9P5dbVJqYRBQDrk5YVmxhtNGePkbE5+nCydC /Wh61vDRMsoq5GyuDQjgjbam/CaZx/WMLbv9UKfScLcR3DdH3sAI6wNSF5/+MTuLX44mwqFfFPFiF V83K+i/Xzi+rPUqZPBsHU8BcteL72RKYSot9oJbMAJYvCo2y3pNukJtx5Dbr3n+yIx48nIuVgIQQ8 i45WUjZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYfn6-0000000AffM-1qW7; Wed, 02 Dec 2026 08:34:16 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYfn3-0000000Afeo-3xav for linux-riscv@lists.infradead.org; Wed, 02 Dec 2026 08:34:15 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4bb72b44a97so110194675e9.0 for ; Wed, 02 Dec 2026 00:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796200451; x=1796805251; darn=lists.infradead.org; h=content-type:mime-version:references:in-reply-to:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ywCdLt36Kli6u3HAYlPuEwPjr8pLahxWUnCiKAkHqWM=; b=Oy13NG9i13+Nq2i5X8Lvj8rlMWceJ6qy/q486ThEOCM0uztdJAJ3SFuUSIpv1UKkS4 x5OPGqD8VzNjU1AGVfukYfjVssA7+oCpwYRC8uG9i64NfMcSd7SF1O6q7dHuTFwJG5ys JRG2yHWpFP+KcF99IxaAsfj37e773GHWzbthA8oYrmhii8ruKBh20qhe6gXe5eC6/+ct dHnZY3FqubD9Z6o1BTyr+F1cC2vc3EXcAUYwHPBIahDAwzEbhTpfxxrjjOxmlwEVQZHU LKskJqkKv49AUl9lfZU8ksLb6qmrC5ujD5saapCtX5CmvVJa10yjSUj1RbFpJcBQMqov 7ilQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796200451; x=1796805251; h=content-type:mime-version:references:in-reply-to:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=ywCdLt36Kli6u3HAYlPuEwPjr8pLahxWUnCiKAkHqWM=; b=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+9+oW0BkjEJDCh/NX/Lk+x8anjN dGjbsJFD2caVZYKBoYsCL6+M4xXKncebxxVl0d159QR85Ki5WqoCoVwa8OTBsM0nuirkOpMSwUN 8mXgmC4lTFD2hCBGoxttsGI/pMPs15NvYvHQh13tKg== X-Received: by 2002:a05:600c:4f4b:b0:49f:fd2d:23c7 with SMTP id 5b1f17b1804b1-4bb888226c0mr975031545e9.27.1796200450706; Wed, 02 Dec 2026 00:34:10 -0800 (PST) Received: from strix.localnet ([197.250.161.164]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb8538b09bsm1994920495e9.4.2026.12.02.00.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 00:34:09 -0800 (PST) From: Stefan =?UTF-8?B?RMO2c2luZ2Vy?= To: Ulf Hansson , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Troy Mitchell , spacemit@lists.linux.dev Subject: Re: [PATCH] pmdomain: core: connect consumer with supplier via device link Date: Tue, 01 Dec 2026 22:33:15 +0300 Message-ID: In-Reply-To: <20261112-01-pm-device-link-v1-1-8932e0862378@kernel.org> References: <20261112-01-pm-device-link-v1-1-8932e0862378@kernel.org> X-Archived-By: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_003414_035134_8B2E6D80 X-CRM114-Status: GOOD ( 15.30 ) X-Spam-Score: 2.3 (++) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Yixun Lan , linux-riscv@lists.infradead.org, spacemit@lists.linux.dev Content-Type: multipart/mixed; boundary="===============7413769707301715368==" Sender: "linux-riscv" X-Spam-Status: No, score=0.2 required=3.0 tests=BAYES_00,DATE_IN_PAST_12_24, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 --===============7413769707301715368== Content-Type: multipart/signed; boundary="nextPartwx_dF0mGRYetYMrdRe134g"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPartwx_dF0mGRYetYMrdRe134g Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Stefan =?UTF-8?B?RMO2c2luZ2Vy?= Date: Tue, 01 Dec 2026 22:33:15 +0300 Message-ID: In-Reply-To: <20261112-01-pm-device-link-v1-1-8932e0862378@kernel.org> References: <20261112-01-pm-device-link-v1-1-8932e0862378@kernel.org> MIME-Version: 1.0 Hi, Am Donnerstag, 12. November 2026, 10:45:43 Ostafrikanische Zeit schrieb Yixun Lan: > Connect downstream Power Domain consumer with the supplier through > the device link API, So when the pmdomain driver is unloaded or unbinded, > the consumer can be automatically notified and purged gracefully. I ran into the same issue with the zx297520v3 pmdomain driver I submitted [0]. The issue happens when the pm domain device is an MFD child registered with mfd_add_devices() and the #power-domain-cells rolled into the MFD parent's DTS node. In this case from the DTS's point of view the provider is the MFD parent, whereas the runtime provider is the MFD child. Linking the consumer to the MFD child that actually provides the pmdomain makes sure that the consumer gets unbound when the MFD child gets unbound. Why not make the pmdomain child a DTS node? writing-bindings.rst explicitly discourages it: > - DON'T create nodes just for the sake of instantiating drivers. Multi- > function devices only need child nodes when the child nodes have their own > DT resources. A single node can be multiple providers (e.g. clocks and > resets). In my case Krzysztof Kozlowski reiterated that in [1]. The clk subsystem takes extra care to handle provider registration from a MFD child - see dev_or_parent_of_node(). I don't deeply care about being able to unbind my pmdomain driver and/or build it as module and unload it. I implemented it because Brian Masney asked me to build the clk drivers this way[2]. On my hardware the pmdomain is easy to shut down without crashing/powering off the board, so I might as well. And to me being able to unwind a device registration is a good check that the device registration itself is built the right way. Cheers, Stefan 0: https://lore.kernel.org/linux-arm-kernel/20261120-zx29usb-v1-3-b0433258e51b@gmail.com/ 1: https://lore.kernel.org/linux-arm-kernel/20260717-uncovered-feathered-groundhog-eab16e@quoll/ 2: https://lore.kernel.org/linux-arm-kernel/anPD-I9GDyOZSDO7@redhat.com/ --nextPartwx_dF0mGRYetYMrdRe134g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEQxb0tqoFWyeVMl1sPRO8yFRPGiIFAmsPIPsbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJED0TvMhUTxoiEU8P/1Wdxy/uGvge9JUu6n6H gldbwDUS71pCnZR44VA/LO1IXOuUjSUT+k+TsEaLh4UoJkbqwgO/64Tj+AUtfnsa nhlClFRYf/zkDEHamiO5Uwz2w+LLXYH1k3a/rHxbn4pjL49R8kHzQq1qVBfzptZs jJZsviAG0u3iHZKUUTp9Ng9tnZHWfSmQOYzdmOupAPdgsK637FMCp14U/qFh18NJ OOv6s+IA2xQMrWEALPtil9t7fa9Gr7+kIRgV7afOGtwnWaFl6luPZAGCYhjDGe9+ 7LJPpjBJgY5V0MFnCHOR7wCPPkz2LSuL0UrDRNJjSWLDwMB90FT60FxWwZechvdt ODALqQcKheU3fCI36he+jesaI6XJBZvlEaSirIaOa4ak0P9dZe7Z2v4YSWAIy6vy 4IHSnxWkwvvLvvq8OxyCJXOmkn+8OFUgJXOJWUTZhVSpA39azgZK92r+f5u2AHZs 7PK+fijuqK8vOi/ale8084jqjSySpUx0SZkIfcVzskVhsdQ6GHxLHdbd0dlchBeb Hxf9Xetfetu5uBeAGMbl4d/5HnspbkSbjbzHhCPOEqbAFliiLxzw7llNx3QNeFSw U2N7Y3umiloq2nMBCjZ0R8DbdbCIy1rfoazT64Xab2WonY7ItQ7ZrGchH1F6oamg p4umPsh3JZqcGKeudx/6REtx =V2px -----END PGP SIGNATURE----- --nextPartwx_dF0mGRYetYMrdRe134g-- --===============7413769707301715368== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv --===============7413769707301715368==--