From patchwork Thu Jan 4 13:01:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511073 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 23742C47074 for ; Thu, 4 Jan 2024 13:02:43 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DhHc5/S3YGCX1meqTFpDKiYGFJ0ClVBPpo0q7zxjTaE=; b=NHWAIdbwldPFev enI5TWW+HQIWuNTQr2nR3w83cisXdPrdD2TneoeDQQ39letsNOOiLfmlsp5nmF5zIcUWvbu2AcwqE dAlMSjC1Dcd6AVfpkFzmzQfYYTwmPyDFyHuiFvKXLfPDR07zteSyNekMq+JLbPkXDDi1EfRSA/gRm irTik9KmwXgbkFeurzsKF1bW4yTEPeQn5VZmcwZOmaH7BCM9bZXCdLYUcQ9Zw9uUDvs0cNmzqtmcE 95FmTKc1HSJ0wRiWp0z4+ERo9F26oy72Lox2CWVEqnDAIFl2KqsNfJQptXGbAasjsqRgxkfmLWdtZ ZJ/jqHcqHa2SAgWhuubQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMT-00E2tT-0R; Thu, 04 Jan 2024 13:02:13 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMP-00E2oe-2q for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:11 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-336c9acec03so365507f8f.2 for ; Thu, 04 Jan 2024 05:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373327; x=1704978127; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dm8mMOJsxux6ZmWUG3F7cuu+H2vgOte3WZWDy9og3kI=; b=APOn6HAwKc9GlZ7C/Zu9wfhrDK9GlrvJ/EJG84rbHFSJ1ZfBZy1/kptmn1QvOcqihL XythlXVhzlp1oddWOCtTQch0c4ja8FDMCcv8wXfvvrkNlETd0zHjIaTx3uYJDXkii9Cq 4AbxnaG7YeEj7dXxMmDwI/i76WcZy5Bcn4tJBS1AnnbBJIKFduwSthSUYBqqjhhmhXp+ S7o1Xpyg4f+j6Vzrp3fwBt4CUnFv+LmR4qlgvjInq++RTZ/MI6TMHFYeUKGiVphG9UWu jgEBWHAyduF6WimHQ1ISLscWkp0/hOm2HKlMWNh22Xrx+/A8DvLyf97xMCl05Ttb6gZ9 OAbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373327; x=1704978127; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dm8mMOJsxux6ZmWUG3F7cuu+H2vgOte3WZWDy9og3kI=; b=nfBD6M2j6hOq4FvYA1k+oRiHXXSqJY9BHheuSv+xXad+Cwh/kve2FP9qzP8oi3ILGa P0l+k7bHlxPa/fKzgEe4Py2CCyXhV+tB8c4j+h5JAhe0LvqIrjTrVyzgRvQfsmmyn7rl tiw1Aq+urJJOJGiNjNkJhnHasnkSVqPmrNoIwUCfRrOlp8OKqWUzkaTqwHf+ji2/dDHb dmO1eRFyi9EEp3vLOSDKM1zRZ506E9hRlDecf6GsHKtsUOv/edWD2NMdny8p4I1SlFwJ MgoOLcvP/k7ox4T7s7ccyu9oqqNdXOSPaY/X4upPIAUDmbmBjbd0SQkBnK/mVc9qyIdk c+8g== X-Gm-Message-State: AOJu0Ywrz/CXe02zpp7LMpZVv6J/Y8JBC7wYbPwy5JnZ3BvmVwGKqSgK lP7xXJ+htYCOCzqXXqCXN4Bw2FwDkM42qQ== X-Google-Smtp-Source: AGHT+IEAmqT1dLhz8yMZPRNlwfwkfnr08tFlrQ2qx2EHGz1pEWzlFjlA+PDg16ga3IpH7ARH2S4IxQ== X-Received: by 2002:adf:b199:0:b0:337:175:a079 with SMTP id q25-20020adfb199000000b003370175a079mr327095wra.80.1704373327126; Thu, 04 Jan 2024 05:02:07 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:06 -0800 (PST) From: Bartosz Golaszewski To: 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 , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: 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: [RFC 3/9] PCI/portdrv: create platform devices for child OF nodes Date: Thu, 4 Jan 2024 14:01:17 +0100 Message-Id: <20240104130123.37115-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050209_927963_DDFD1DAB X-CRM114-Status: GOOD ( 14.28 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski 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. Signed-off-by: Bartosz Golaszewski --- drivers/pci/pcie/portdrv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c index 14a4b89a3b83..401fb731009d 100644 --- a/drivers/pci/pcie/portdrv.c +++ b/drivers/pci/pcie/portdrv.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -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); } static void pcie_portdrv_remove(struct pci_dev *dev)