[PATCH 1/3] PCI/pwrctrl: Bind a pwrctrl device if clocks are present
From: Sean Anderson
Date: Fri Dec 19 2025 - 12:23:01 EST
Since commit 66db1d3cbdb0 ("PCI/pwrctrl: Add optional slot clock for PCI
slots"), power supplies are not the only resource PCI slots may create.
Also create a pwrctrl device if there are any clocks.
Signed-off-by: Sean Anderson <sean.anderson@xxxxxxxxx>
---
drivers/pci/of.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index 3579265f1198..07546a16ac86 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -847,7 +847,7 @@ void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge)
* @np: Device tree node
*
* Check if the power supply for the PCI device is present in the device tree
- * node or not.
+ * node or not. Clocks may also create a device.
*
* Return: true if at least one power supply exists; false otherwise.
*/
@@ -860,6 +860,9 @@ bool of_pci_supply_present(struct device_node *np)
return false;
for_each_property_of_node(np, prop) {
+ if (!strcmp(prop->name, "clocks"))
+ return true;
+
supply = strrchr(prop->name, '-');
if (supply && !strcmp(supply, "-supply"))
return true;
--
2.35.1.1320.gc452695387.dirty