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 CE892C47258 for ; Wed, 17 Jan 2024 16:46:18 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uuJFZCQz9yB3BwPFIaAVRJTt7JffOQHAtM/4g+zAnDg=; b=wmXGR6W3fOrLcd UE74MfBpATw0Cz9JdSFuweY5IuiNSvyuQ+UB2Alrc8wR42QkhynDUz8gx9lQcLWOBJmW1whDkO0Rp 7care7kNHEXAWf/AgA63B/UUAHA8I6VpvOAWedqXOEtMXm3aKR8ullckCkfE2tNtATsbUjbexV8Nn +Q61w3rm1hRGX4007bv+VLZJ660dbZFSvS3l72YKnl6DgUFWUl/zP8Efcz2ww/ALr/5mFoq1xWfkv kJ5J9DLvtwzTDqEeQPztO+vPyABnwt3WFwjWOxLRROdIWKNHoCXd1KwJrU50HLyDjm/1KZrYUmOZO Cj+tMdHlsOzKc7ARrl0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ92v-0007Ie-1R; Wed, 17 Jan 2024 16:45:45 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ92s-0007HC-1R for linux-arm-kernel@lists.infradead.org; Wed, 17 Jan 2024 16:45:43 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id A3A3EB810DD; Wed, 17 Jan 2024 16:45:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 836F9C433F1; Wed, 17 Jan 2024 16:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705509940; bh=hVbWnNSrHPz6xmHHdaijIuBxcIYaNIZiLi6H6j9b2J8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kM7tz1pDpbypmhPtl655KElT8jZAi+laLUKl4QYPvddIPRavpQM/a0i+LU6Qszs+j EFdz379WU3S/6+gee09gcNF54Sl1uznjojKmOK5BL8nRBXxYoDnQEHOqvIRtpV9i42 DSWx2hFRx4cewa515Or2c+bJxRSarzDFcJB1/3To= Date: Wed, 17 Jan 2024 17:45:37 +0100 From: Greg Kroah-Hartman 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 , Lukas Wunner , Huacai Chen , Alex Elder , Srini Kandagatla , Abel Vesa , 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: [PATCH 4/9] PCI: create platform devices for child OF nodes of the port node Message-ID: <2024011707-alibi-pregnancy-a64b@gregkh> References: <20240117160748.37682-1-brgl@bgdev.pl> <20240117160748.37682-5-brgl@bgdev.pl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240117160748.37682-5-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_084542_762268_4D4EC2A9 X-CRM114-Status: GOOD ( 20.05 ) 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 On Wed, Jan 17, 2024 at 05:07:43PM +0100, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > In order to introduce PCI power-sequencing, we need to create platform > devices for child nodes of the port node. Ick, why a platform device? What is the parent of this device, a PCI device? If so, then this can't be a platform device, as that's not what it is, it's something else so make it a device of that type,. > They will get matched against > the pwrseq drivers (if one exists) and then the actual PCI device will > reuse the node once it's detected on the bus. Reuse it how? > Signed-off-by: Bartosz Golaszewski > --- > drivers/pci/bus.c | 9 ++++++++- > drivers/pci/remove.c | 3 ++- > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c > index 9c2137dae429..8ab07f711834 100644 > --- a/drivers/pci/bus.c > +++ b/drivers/pci/bus.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -342,8 +343,14 @@ void pci_bus_add_device(struct pci_dev *dev) > */ > pcibios_bus_add_device(dev); > pci_fixup_device(pci_fixup_final, dev); > - if (pci_is_bridge(dev)) > + if (pci_is_bridge(dev)) { > of_pci_make_dev_node(dev); > + retval = of_platform_populate(dev->dev.of_node, NULL, NULL, > + &dev->dev); So this is a pci bridge device, not a platform device, please don't do this, make it a real device of a new type. thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel