summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBich Hemon <bich.hemon@st.com>2019-06-04 11:55:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-10 19:47:43 +0300
commitc70669ecef4e34af8913108fae4b8a9b1dc63fa1 (patch)
tree24eea6f8d90cde7b58df969e8a56b5f7a8bf8ba6 /drivers
parent15b3cd8ef46ad1b100e0d3c7e38774f330726820 (diff)
downloadlinux-c70669ecef4e34af8913108fae4b8a9b1dc63fa1.tar.xz
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: Bich Hemon <bich.hemon@st.com> Signed-off-by: Erwan Le Ray <erwan.leray@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/stm32-usart.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 9c2b04e6f5b6..04eda75d671c 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -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);