Set Pin Control Status
By using the pinctrl_select_state interface, you can configure the pin status of a device.
The following code block provides an example.
if (pcie->power_state_active) { ret = pinctrl_select_state(pcie->pinctrl, pcie->power_state_active); if (ret) dev_err(dev, "Cannot set power pin to high\n"); } if (pcie->perst_state_active) { ret = pinctrl_select_state(pcie->pinctrl, pcie->perst_state_active); if (ret) dev_err(dev, "Cannot set reset pin to low\n"); }