Commit 94616d9a authored by Erwan Le Ray's avatar Erwan Le Ray 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>

Link: https://lore.kernel.org/r/1560433800-12255-4-git-send-email-erwan.leray@st.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 96b79ac7
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/pm_wakeirq.h> #include <linux/pm_wakeirq.h>
...@@ -1373,6 +1374,8 @@ static int stm32_serial_suspend(struct device *dev) ...@@ -1373,6 +1374,8 @@ static int stm32_serial_suspend(struct device *dev)
else else
stm32_serial_enable_wakeup(port, false); stm32_serial_enable_wakeup(port, false);
pinctrl_pm_select_sleep_state(dev);
return 0; return 0;
} }
...@@ -1380,6 +1383,8 @@ static int stm32_serial_resume(struct device *dev) ...@@ -1380,6 +1383,8 @@ static int stm32_serial_resume(struct device *dev)
{ {
struct uart_port *port = dev_get_drvdata(dev); struct uart_port *port = dev_get_drvdata(dev);
pinctrl_pm_select_default_state(dev);
if (device_may_wakeup(dev)) if (device_may_wakeup(dev))
stm32_serial_enable_wakeup(port, false); 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