Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp366895rdd; Tue, 9 Jan 2024 06:43:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqLLZJGh0kL5Y2B7o0xFvTTmMFuF73vjjctA4f10He4wx3s2J5kQc9oJvyp5jfmg/GbpXa X-Received: by 2002:a05:622a:1819:b0:429:8791:c804 with SMTP id t25-20020a05622a181900b004298791c804mr6376496qtc.48.1704811427453; Tue, 09 Jan 2024 06:43:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704811427; cv=none; d=google.com; s=arc-20160816; b=izjWkuBtN6kOeDV7HqcXHzUFPoM0FuWef98M8gv3SZxab+XfoKcbxZ1El8Y38TyZ+/ jxgIJRmIr/2sAzUdk24p3z4qJOH1LSdpWEJzmPsZfxqe9dhpk8EVQG2k699uWKJIIAlx 1j9rhK0p+EU0W5tp2zdh8lOm/mYY7TYf56PcI23Hl7dqdTOTW8HMG6R0tBrtLnkXHfc8 zG1N8WTioCrfZJaUnw+k9/v3vk1xXgrvaw9XLsUZQghmIA/FyoZh+v6pXDzXdWm7veBK ZirUYZNH3/HY0rVwWeZr1mCWdx/BPhFVZXcSTQR9jWxH+mdrBRWB5CM4MGyr9SgyLg7P wVTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=4P1moXOZUcz75f6JJ7R0X+ObHt/CEFQp6GNQo95p4r4=; fh=J0fXr2XTQazfk/QHL/kMggvUdvjoAwM8TFsoE7HFOlw=; b=oW+Sh+PNkjq5G8v8SUrXUIxud7BtRu4fgp+EtZh7W1rg+smmZD68V/FhIKeoMYoKcI tLcdiEpkrHg/1r0to0M82iA32t3tHSbIsXcJ5bN9rVAVC76N+jDNOhdisVJX5MRRhIfb /7ynQFEImBzKCTg0e+enfXIw30RqwvvDycIruQSGbfn7KWUsnkyBcdqjU221wI2ISk3T ACiLBp2Hpwps47Xmydi1uE1LBHwxKKFe6q/iT34NvOY+apZ0cAX2Vlt2RrmzXqjK8XQi RV1ZD9nRurAQGsWt98v0CgwToM43ljRM+OCRfBgJnHttEHsmNnX+bmB+/Qvkzjsz/LQA VBDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-1633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1633-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y15-20020a05622a120f00b0042588fe5ea0si2236378qtx.360.2024.01.09.06.43.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:43:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-1633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1633-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B177C1C245A8 for ; Tue, 9 Jan 2024 14:43:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4827539AD5; Tue, 9 Jan 2024 14:43:40 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FDE1A41; Tue, 9 Jan 2024 14:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id B616B100DA1A2; Tue, 9 Jan 2024 15:43:27 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 875212C3E10; Tue, 9 Jan 2024 15:43:27 +0100 (CET) Date: Tue, 9 Jan 2024 15:43:27 +0100 From: Lukas Wunner To: Bartosz Golaszewski Cc: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?iso-8859-1?Q?N=EDcolas_F_=2E_R_=2E_A_=2E?= Prado , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: Re: [RFC 3/9] PCI/portdrv: create platform devices for child OF nodes Message-ID: <20240109144327.GA10780@wunner.de> References: <20240104130123.37115-1-brgl@bgdev.pl> <20240104130123.37115-4-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240104130123.37115-4-brgl@bgdev.pl> User-Agent: Mutt/1.10.1 (2018-07-13) On Thu, Jan 04, 2024 at 02:01:17PM +0100, Bartosz Golaszewski wrote: > In order to introduce PCIe power-sequencing, we need to create platform > devices for child nodes of the port driver node. They will get matched > against the pwrseq drivers (if one exists) and then the actuak PCIe > device will reuse the node once it's detected on the bus. [...] > --- a/drivers/pci/pcie/portdrv.c > +++ b/drivers/pci/pcie/portdrv.c > @@ -715,7 +716,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev, > pm_runtime_allow(&dev->dev); > } > > - return 0; > + return devm_of_platform_populate(&dev->dev); > } I think this belongs in of_pci_make_dev_node(), portdrv seems totally the wrong place. Note that you're currently calling this for RCECs (Root Complex Event Collectors) as well, which is likely not what you want. devm functions can't be used in the PCI core, so symmetrically call of_platform_unpopulate() from of_pci_remove_node(). Thanks, Lukas