Merge "msm: pcie: switch GPIO to sleep state before asserting PERST"

This commit is contained in:
Linux Build Service Account 2017-05-01 23:56:49 -07:00 committed by Gerrit - the friendly Code Review server
commit e575b75923
3 changed files with 19 additions and 3 deletions

View file

@ -585,6 +585,19 @@
bias-pull-down;
};
};
pcie0_wake_sleep: pcie0_wake_sleep {
mux {
pins = "gpio37";
function = "gpio";
};
config {
pins = "gpio37";
drive-strength = <2>;
bias-disable;
};
};
};
hph_en0_ctrl {

View file

@ -2662,10 +2662,13 @@
0x800 0x00 0x00
0x808 0x03 0x00>;
pinctrl-names = "default";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pcie0_clkreq_default
&pcie0_perst_default
&pcie0_wake_default>;
pinctrl-1 = <&pcie0_clkreq_default
&pcie0_perst_default
&pcie0_wake_sleep>;
perst-gpio = <&tlmm 35 0>;
wake-gpio = <&tlmm 37 0>;

View file

@ -6754,12 +6754,12 @@ static int msm_pcie_pm_suspend(struct pci_dev *dev,
PCIE_DBG(pcie_dev, "RC%d: PM_Enter_L23 is NOT received\n",
pcie_dev->rc_idx);
msm_pcie_disable(pcie_dev, PM_PIPE_CLK | PM_CLK | PM_VREG);
if (pcie_dev->use_pinctrl && pcie_dev->pins_sleep)
pinctrl_select_state(pcie_dev->pinctrl,
pcie_dev->pins_sleep);
msm_pcie_disable(pcie_dev, PM_PIPE_CLK | PM_CLK | PM_VREG);
PCIE_DBG(pcie_dev, "RC%d: exit\n", pcie_dev->rc_idx);
return ret;