diff options
author | Peter Chen <peter.chen@nxp.com> | 2018-11-01 14:47:20 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@nxp.com> | 2020-09-03 16:32:07 +0800 |
commit | 71ac680e6339e744d87647a1ca27b2e87dba2eac (patch) | |
tree | 49f80acd1aa69222b468ba5d90894450fe2f7c0a /drivers | |
parent | 58a3cefb3840b17f0eba357d8e82536135a1257b (diff) |
usb: chipidea: ci_hdrc_imx: restore pinctrl
The pinctrl setting may lost during the system suspend
(eg, imx7ulp), it needs to restore them after system resume.
Meanwhile, some platforms may need to set special pinctrl
for power comsumption.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/chipidea/ci_hdrc_imx.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index d6085f46772f..25c65accf089 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -614,7 +614,12 @@ static int __maybe_unused ci_hdrc_imx_suspend(struct device *dev) } } - return imx_controller_suspend(dev); + ret = imx_controller_suspend(dev); + if (ret) + return ret; + + pinctrl_pm_select_sleep_state(dev); + return ret; } static int __maybe_unused ci_hdrc_imx_resume(struct device *dev) @@ -622,6 +627,7 @@ static int __maybe_unused ci_hdrc_imx_resume(struct device *dev) struct ci_hdrc_imx_data *data = dev_get_drvdata(dev); int ret; + pinctrl_pm_select_default_state(dev); ret = imx_controller_resume(dev); if (!ret && data->supports_runtime_pm) { pm_runtime_disable(dev); |