Commit c70669ec authored by Bich Hemon's avatar Bich Hemon Committed by Greg Kroah-Hartman

serial: stm32: select pinctrl state in each suspend/resume function

Select either pinctrl sleep state in suspend function or default state in
resume function.
Signed-off-by: default avatarBich Hemon <bich.hemon@st.com>
Signed-off-by: default avatarErwan Le Ray <erwan.leray@st.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15b3cd8e
......@@ -1298,6 +1298,8 @@ static int stm32_serial_suspend(struct device *dev)
else
stm32_serial_enable_wakeup(port, false);
pinctrl_pm_select_sleep_state(dev);
return 0;
}
......@@ -1305,6 +1307,8 @@ static int stm32_serial_resume(struct device *dev)
{
struct uart_port *port = dev_get_drvdata(dev);
pinctrl_pm_select_default_state(dev);
if (device_may_wakeup(dev))
stm32_serial_enable_wakeup(port, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment