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>
This commit is contained in:
Peter Chen 2018-11-01 14:47:20 +08:00
Родитель 58a3cefb38
Коммит 71ac680e63
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4859298150D671BB
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -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);