projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96b79ac
)
serial: stm32: select pinctrl state in each suspend/resume function
author
Erwan Le Ray
<erwan.leray@st.com>
Thu, 13 Jun 2019 13:49:53 +0000
(15:49 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 4 Sep 2019 10:43:45 +0000
(12:43 +0200)
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>
Link:
https://lore.kernel.org/r/1560433800-12255-4-git-send-email-erwan.leray@st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/stm32-usart.c
b/drivers/tty/serial/stm32-usart.c
index 24a2261f879a16aabbf4484fa84952f107dca101..7bb2bb9fffbc1804f44ad05c10b441d250812404 100644
(file)
--- a/
drivers/tty/serial/stm32-usart.c
+++ b/
drivers/tty/serial/stm32-usart.c
@@
-24,6
+24,7
@@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
+#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/pm_wakeirq.h>
@@
-1373,6
+1374,8
@@
static int stm32_serial_suspend(struct device *dev)
else
stm32_serial_enable_wakeup(port, false);
+ pinctrl_pm_select_sleep_state(dev);
+
return 0;
}
@@
-1380,6
+1383,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);