Hi, On March 21, 2025 8:29:40 AM GMT+05:30, Wei Fang <wei.fang@xxxxxxx> wrote: >@@ -2487,7 +2487,14 @@ static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn) > struct pci_dev *dev; > u32 l; > >- pci_pwrctrl_create_device(bus, devfn); >+ /* >+ * Create pwrctrl device (if required) for the PCI device to handle the >+ * power state. If the pwrctrl device is created, then skip scanning >+ * further as the pwrctrl core will rescan the bus after powering on >+ * the device. >+ */ >+ if (pci_pwrctrl_create_device(bus, devfn)) >+ return NULL; > >Hi Manivannan, > >The current patch logic is that if the pcie device node is found to have >the "xxx-supply" property, the scan will be skipped, and then the pwrctrl >driver will rescan and enable the regulators. However, after merging this >patch, there is a problem on our platform. The .probe() of our device >driver will not be called. The reason is that CONFIG_PCI_PWRCTL_SLOT is >not enabled at all in our configuration file, and the compatible string >of the device is also not added to the pwrctrl driver. Hmm. So I guess the controller driver itself is enabling the supplies I believe (which I failed to spot). May I know what platforms are affected? > I think other >platforms should also have similar problems, which undoubtedly make these >platforms be unstable. This patch has been applied, and I am not familiar >with this. Can you fix this problem? I mean that those platforms that do >not use pwrctrl can avoid skipping the scan. Sure. It makes sense to add a check to see if the pwrctrl driver is enabled or not. If it is not enabled, then the pwrctrl device creation could be skipped. I'll send a patch once I'm infront of my computer. But in the long run, we would like to move all platforms to use pwrctrl instead of fiddling the power supplies in the controller driver (well that was the motivation to introduce it in the first place). Once you share the platform details, I'll try to migrate it to use pwrctrl. Also, please note that we are going to enable pwrctrl in ARM64 defconfig very soon. So I'll try to fix the affected platforms before that happens. - Mani மணிவண்ணன் சதாசிவம்