summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
authorFugang Duan <b38611@freescale.com>2015-08-31 11:39:15 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:22:59 +0800
commitcc95143dfcd4fc1d1ac934154e6449586e63c7bf (patch)
tree6be4b1514fe8d44b7d26ab01a4ba9fcb619e164f /drivers/tty/serial/imx.c
parenta8e62d1552a6fe539718649f6df22d295b95d4eb (diff)
MLK-11456-01 tty: serial: imx: add pinctrl sleep mode support
For LPSR mode, UART iomux settings will be lost after resume, so add pinctrl sleep mode support. Signed-off-by: Anson Huang <b20788@freescale.com> Signed-off-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r--drivers/tty/serial/imx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 4274b1a49e4e..db64773d3651 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2324,6 +2324,8 @@ static int imx_serial_port_suspend_noirq(struct device *dev)
clk_disable(sport->clk_ipg);
+ pinctrl_pm_select_sleep_state(dev);
+
return 0;
}
@@ -2333,6 +2335,8 @@ static int imx_serial_port_resume_noirq(struct device *dev)
struct imx_port *sport = platform_get_drvdata(pdev);
int ret;
+ pinctrl_pm_select_default_state(dev);
+
ret = clk_enable(sport->clk_ipg);
if (ret)
return ret;