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: 759960 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B336322EEB for ; Thu, 4 Jan 2024 13:02:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="zESwugOz" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-336c9acec03so365509f8f.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=vger.kernel.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=zESwugOzZQWroLH3AzdFt7/hlzlCWNPWAY42tOmmQ1m+tQ1HgQT13NHkIGN54DaX3O w1aYnbe//4y09pGoNAkqCGL45RrOrRJQBEkvTkizscaQkkbH7nJA/HXjqdYkssHhCUzG aWLRnX93EEBj8JC2RHltW+mnbFvDKrfA8TSLxDjpo0xofw0MTHAsJsnEG1T0PSl90ZHY uX35iKTLEbTNFcMkes0gJ7taDIqUR06yYePDmN1YjJO6/0nlWcxgt5iIHWNAXfwXePJX n3mTT8jWJkaCoGeZ2n2uE2FQ85t68XGguhZCYoSMf0glh68o34oOtdEF21pVeDD2+Dyv iRKQ== 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=JgwKcrExQjtELxmZKF5TiMW8/Ed/g2q7OrGTwCS6LuV2uGf9tpvOeHvQiTMIf7lHxT fTd6WQ008izCLuF4Y6BfGSeOSXDEjF/7Uh7cNhgnEHSV/cO4Q++1v7qbcXWfGVSTe2R9 BJ/tj/UF7mW+1Xjzpf21dOIPlSoxw0aQwV/CJ8AwmHbbh+PeSerBFDFzNO9HIEAccime 4k6HkxT8fnyzyFWP71+85Kotzk4wkcAczBpvqHznXaIFihH8Jl2wMzYjquxTMnbfa6rK paUmN2yhmz/8qjg0xhSkk4V2ZqsIHxOPQ98EbTd54jOxhSeR2vdJrtU301AoDlle+UQl QJ+A== X-Gm-Message-State: AOJu0Ywob28haea8IS8URuDTAGh18UU8KIV7pDO0Z5C0E56VO2B8TYQs YxgZRbziLpcmttrvGtwCm5wq5llPsKUtZg== 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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)