From: Wei Fang <wei.fang@nxp.com>
To: devnull+manivannan.sadhasivam.linaro.org@kernel.org
Cc: bartosz.golaszewski@linaro.org, bhelgaas@google.com,
brgl@bgdev.pl, conor+dt@kernel.org, devicetree@vger.kernel.org,
krzk+dt@kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, manivannan.sadhasivam@linaro.org,
robh@kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v3 3/5] PCI/pwrctrl: Skip scanning for the device further if pwrctrl device is created
Date: Fri, 21 Mar 2025 10:59:40 +0800 [thread overview]
Message-ID: <20250321025940.2103854-1-wei.fang@nxp.com> (raw)
In-Reply-To: <20250116-pci-pwrctrl-slot-v3-3-827473c8fbf4@linaro.org>
@@ -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. 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.
next prev parent reply other threads:[~2025-03-21 2:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 14:09 [PATCH v3 0/5] PCI/pwrctrl: Rework pwrctrl driver integration and add driver for PCI slot Manivannan Sadhasivam via B4 Relay
2025-01-16 14:09 ` [PATCH v3 1/5] PCI/pwrctrl: Move creation of pwrctrl devices to pci_scan_device() Manivannan Sadhasivam via B4 Relay
2025-01-16 14:09 ` [PATCH v3 2/5] PCI/pwrctrl: Move pci_pwrctrl_unregister() to pci_destroy_dev() Manivannan Sadhasivam via B4 Relay
2025-04-13 21:08 ` Lukas Wunner
2025-01-16 14:09 ` [PATCH v3 3/5] PCI/pwrctrl: Skip scanning for the device further if pwrctrl device is created Manivannan Sadhasivam via B4 Relay
2025-02-20 23:24 ` Bjorn Helgaas
2025-02-21 17:38 ` Manivannan Sadhasivam
2025-02-20 23:35 ` Bjorn Helgaas
2025-02-21 17:40 ` Manivannan Sadhasivam
2025-03-21 2:59 ` Wei Fang [this message]
2025-03-21 4:42 ` Manivannan Sadhasivam
2025-03-21 7:04 ` Wei Fang
2025-03-22 3:23 ` Manivannan Sadhasivam
2025-03-22 11:39 ` Wei Fang
2025-03-24 8:15 ` Manivannan Sadhasivam
2025-03-27 6:02 ` Wei Fang
2025-04-02 8:14 ` Manivannan Sadhasivam
2025-01-16 14:09 ` [PATCH v3 4/5] dt-bindings: vendor-prefixes: Document the 'pciclass' prefix Manivannan Sadhasivam via B4 Relay
2025-01-16 14:09 ` [PATCH v3 5/5] PCI/pwrctrl: Add pwrctrl driver for PCI Slots Manivannan Sadhasivam via B4 Relay
2025-02-20 14:24 ` [PATCH v3 0/5] PCI/pwrctrl: Rework pwrctrl driver integration and add driver for PCI slot Krzysztof Wilczyński
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250321025940.2103854-1-wei.fang@nxp.com \
--to=wei.fang@nxp.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+manivannan.sadhasivam.linaro.org@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox