Re: [PATCH v12 2/9] PCI: stm32: Add PCIe host support for STM32MP25

From: Christian Bruel
Date: Fri Aug 08 2025 - 11:06:54 EST




On 8/7/25 20:09, Bjorn Helgaas wrote:
[+to Linus for pinctrl usage question below]

On Tue, Jun 10, 2025 at 11:07:07AM +0200, Christian Bruel wrote:
Add driver for the STM32MP25 SoC PCIe Gen1 2.5 GT/s and Gen2 5GT/s
controller based on the DesignWare PCIe core.


+
+ return pinctrl_pm_select_sleep_state(dev);

Isn't there some setup required before we can use
pinctrl_select_state(), pinctrl_pm_select_sleep_state(),
pinctrl_pm_select_default_state(), etc?

I expected something like devm_pinctrl_get() in the .probe() path, but
I don't see anything. I don't know how pinctrl works, but I don't see
how dev->pins gets set up.

Linus knows better, but the dev->pins states are attached to the dev struct before probe by the pinctrl driver

/**
* pinctrl_bind_pins() - called by the device core before probe
* @dev: the device that is just about to probe
*/
int pinctrl_bind_pins(struct device *dev)

Christian