[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251125-pci-m2-v3-3-c528042aea47@oss.qualcomm.com>
Date: Tue, 25 Nov 2025 16:42:28 +0530
From: Manivannan Sadhasivam via B4 Relay <devnull+manivannan.sadhasivam.oss.qualcomm.com@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Manivannan Sadhasivam <mani@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Stephan Gerhold <stephan.gerhold@...aro.org>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
linux-pm@...r.kernel.org,
Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: [PATCH v3 3/4] PCI/pwrctrl: Create pwrctrl device if the graph
port is found
From: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
The devicetree node of the PCIe Root Port/Slot could have the graph port
to link the PCIe M.2 connector node. Since the M.2 connectors are modelled
as Power Sequencing devices, they need to be controlled by the pwrctrl
driver as like the Root Port/Slot supplies.
Hence, create the pwrctrl device if the graph port is found in the node.
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
---
drivers/pci/probe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c83e75a0ec12..9c8669e2fe72 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -9,6 +9,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/msi.h>
+#include <linux/of_graph.h>
#include <linux/of_pci.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
@@ -2555,7 +2556,7 @@ static struct platform_device *pci_pwrctrl_create_device(struct pci_bus *bus, in
* not. This is decided based on at least one of the power supplies
* being defined in the devicetree node of the device.
*/
- if (!of_pci_supply_present(np)) {
+ if (!of_pci_supply_present(np) && !of_graph_is_present(np)) {
pr_debug("PCI/pwrctrl: Skipping OF node: %s\n", np->name);
goto err_put_of_node;
}
--
2.48.1
Powered by blists - more mailing lists