[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR0402MB3911C74F62B845CF83644D6DF50C0@AM6PR0402MB3911.eurprd04.prod.outlook.com>
Date: Mon, 3 Sep 2018 08:51:23 +0000
From: Anson Huang <anson.huang@....com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"jslaby@...e.com" <jslaby@...e.com>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH 2/2] tty: serial: imx: add pinctrl sleep/default mode
switch for suspend
Gentle Ping...
Anson Huang
Best Regards!
> -----Original Message-----
> From: Anson Huang
> Sent: Thursday, August 9, 2018 6:06 PM
> To: gregkh@...uxfoundation.org; jslaby@...e.com;
> linux-serial@...r.kernel.org; linux-kernel@...r.kernel.org
> Cc: dl-linux-imx <linux-imx@....com>
> Subject: [PATCH 2/2] tty: serial: imx: add pinctrl sleep/default mode switch for
> suspend
>
> On some i.MX SoCs' low power mode, UART iomux settings may be lost, need
> to add pinctrl sleep/default mode switch during suspend/resume to make sure
> UART iomux settings are correct after resume.
>
> Signed-off-by: Anson Huang <Anson.Huang@....com>
> ---
> drivers/tty/serial/imx.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index
> a09ccef..c280d43 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -24,6 +24,7 @@
> #include <linux/serial.h>
> #include <linux/clk.h>
> #include <linux/delay.h>
> +#include <linux/pinctrl/consumer.h>
> #include <linux/rational.h>
> #include <linux/slab.h>
> #include <linux/of.h>
> @@ -2447,6 +2448,8 @@ static int imx_uart_suspend_noirq(struct device
> *dev)
>
> clk_disable(sport->clk_ipg);
>
> + pinctrl_pm_select_sleep_state(dev);
> +
> return 0;
> }
>
> @@ -2455,6 +2458,8 @@ static int imx_uart_resume_noirq(struct device
> *dev)
> struct imx_port *sport = dev_get_drvdata(dev);
> int ret;
>
> + pinctrl_pm_select_default_state(dev);
> +
> ret = clk_enable(sport->clk_ipg);
> if (ret)
> return ret;
> --
> 2.7.4
Powered by blists - more mailing lists