On Fri, Jan 19, 2024 at 10:34 AM Lukas Wunner <lukas@xxxxxxxxx> wrote: > > On Fri, Jan 19, 2024 at 12:52:00PM +0100, Bartosz Golaszewski wrote: > > We have two separate issues: one is powering-up a PCI device so that > > it can be detected > > Just wondering, I note in really_probe() we configure the pin controller, > active the pm_domain etc before probing a driver. > > Would it make sense for the issue you mention above to similarly > amend pci_scan_device() to enable whatever clocks or regulators > are described in the devicetree as providers for the given PCI device? If you mean via a callback to some device specific code, then yes, I think that's exactly what should be done here. That's roughly what MDIO does. If firmware says there is a device present, then probe it anyways even if not detected. I don't think that will work for PCI because it accesses a lot of registers before probe. We'd need some sort of pre-probe hook instead called after reading vendor and device ID, but before anything else. If you mean PCI core just enable whatever clocks and regulators (and GPIOs), then no, because what is the correct order and timing for each of those? You don't know because that is device specific information just as how to program a device is. Rob