Obtain Pin Control Resources
Usually by using the devm_pinctrl_get interface, you can obtain all the pin resources of a device.
The following code block provides an example.
struct device *dev = &pcie->pdev->dev;
pcie->pinctrl = devm_pinctrl_get(dev);
if (IS_ERR_OR_NULL(pcie->pinctrl)) {
dev_err(dev, "Getting pinctrl handle failed\n");
return -EINVAL;
}