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
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:20:30 +0300
commit3700f76fb5838e84a99b4f6859f5e48b3f5396e3 (patch)
treede072749c635d5d7d339427643b2ec81d036d9ca /drivers/tty/serial/imx.c
parent5eb2408a360179f026b1ce233ab8021bcf4c7f00 (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 0f764ebf176b..8e72fe41f11a 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2300,6 +2300,8 @@ static int imx_serial_port_suspend_noirq(struct device *dev)
clk_disable(sport->clk_ipg);
+ pinctrl_pm_select_sleep_state(dev);
+
return 0;
}
@@ -2309,6 +2311,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;